|
@@ -8,6 +8,7 @@ using System.Drawing;
|
|
|
using System.IO;
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
using System.Text;
|
|
|
|
|
+using System.Text.RegularExpressions;
|
|
|
using System.Threading;
|
|
using System.Threading;
|
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms;
|
|
|
using UAS_MES.DataOperate;
|
|
using UAS_MES.DataOperate;
|
|
@@ -160,7 +161,12 @@ namespace UAS_MES.Make
|
|
|
{
|
|
{
|
|
|
//取sql拿值赋给变量
|
|
//取sql拿值赋给变量
|
|
|
string sql = paramsInfo.Rows[currentIndex - 1]["lp_sql"].ToString();
|
|
string sql = paramsInfo.Rows[currentIndex - 1]["lp_sql"].ToString();
|
|
|
- sql = sql.Substring(0, sql.IndexOf("{")) + "'" + inputText.Text + "'";
|
|
|
|
|
|
|
+ Regex ConnoteA = new Regex("{\\w+}");
|
|
|
|
|
+ foreach (Match mch in ConnoteA.Matches(sql))
|
|
|
|
|
+ {
|
|
|
|
|
+ string x = mch.Value.Trim();
|
|
|
|
|
+ sql = sql.Replace(x, "'" + inputText.Text + "'");
|
|
|
|
|
+ }
|
|
|
doc.Variables.FormVariables.Item(i + 1).Value = dh.GetLabelParam(sql).ToString();
|
|
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);
|
|
sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
|
|
|
}
|
|
}
|