|
|
@@ -4,6 +4,7 @@ using System.Data;
|
|
|
using System.Text;
|
|
|
using System.IO;
|
|
|
using UAS_MES.Entity;
|
|
|
+using System.Windows;
|
|
|
|
|
|
namespace UAS_MES.PublicMethod
|
|
|
{
|
|
|
@@ -38,9 +39,16 @@ namespace UAS_MES.PublicMethod
|
|
|
if (doc.Variables.FormVariables.Item(i + 1).Name == dt.Rows[j]["lp_name"].ToString())
|
|
|
{
|
|
|
string sql = dt.Rows[j]["lp_sql"].ToString();
|
|
|
- sql = sql.Substring(0, sql.IndexOf("{")) + "'" + SnCode + "'";
|
|
|
- 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);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ sql = sql.Substring(0, sql.IndexOf("{")) + "'" + SnCode + "'";
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ catch (System.Exception)
|
|
|
+ {
|
|
|
+ BaseUtil.ShowError("SQL" + sql + "维护不正确");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|