|
|
@@ -165,7 +165,7 @@ namespace UAS_MES.Make
|
|
|
doc.Variables.FormVariables.Item(i + 1).Value = dh.GetLabelParam(sql).ToString();
|
|
|
sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
|
|
|
}
|
|
|
- inputValues[currentIndex - 1] = inputText.Text;
|
|
|
+ inputValues[currentIndex - 1] = doc.Variables.FormVariables.Item(i + 1).Value;
|
|
|
}
|
|
|
}
|
|
|
if (currentIndex == paramsInfo.Rows.Count)
|
|
|
@@ -275,19 +275,8 @@ namespace UAS_MES.Make
|
|
|
//找到对应的变量名
|
|
|
if (doc.Variables.FormVariables.Item(i + 1).Name == paramsInfo.Rows[j]["lp_name"].ToString())
|
|
|
{
|
|
|
- //如果当时采集行的 lp_valuetype=’INPUT’,并且lp_sql 为空,则直接将采集的值赋给标签打印
|
|
|
- if (paramsInfo.Rows[j]["lp_valuetype"].ToString() == "INPUT" && paramsInfo.Rows[j]["lp_sql"].ToString() == "")
|
|
|
- {
|
|
|
- doc.Variables.FormVariables.Item(i + 1).Value = inputValues[j];
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- //取sql拿值赋给变量
|
|
|
- string sql = paramsInfo.Rows[j]["lp_sql"].ToString();
|
|
|
- sql = sql.Substring(0, sql.IndexOf("{")) + "'" + inputValues[j] + "'";
|
|
|
- doc.Variables.FormVariables.Item(i + 1).Value = dh.GetLabelParam(sql).ToString();
|
|
|
- sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
|
|
|
- }
|
|
|
+ //直接赋值
|
|
|
+ doc.Variables.FormVariables.Item(i + 1).Value = inputValues[j];
|
|
|
}
|
|
|
}
|
|
|
}
|