|
|
@@ -1368,6 +1368,8 @@ namespace UAS_LabelMachine
|
|
|
for (int j = 0; j < MidDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name + "'");
|
|
|
+ if (dr1.Length == 0)
|
|
|
+ dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name.Replace("_1", "") + "'");
|
|
|
if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串")
|
|
|
{
|
|
|
MidDoc.Variables.FormVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
@@ -1380,12 +1382,12 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
for (int k = 0; k < MidDoc.Variables.FormVariables.Count; k++)
|
|
|
{
|
|
|
- if (i == 0 & MidDoc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == dr1[0]["lp_name"].ToString().ToUpper())
|
|
|
+ if (i == 0 & MidDoc.Variables.FormVariables.Item(k + 1).Name == dr1[0]["lp_name"].ToString())
|
|
|
{
|
|
|
MidDoc.Variables.FormVariables.Item(k + 1).Value = dt1.Rows[0][0].ToString();
|
|
|
}
|
|
|
//使用SN开头的参数赋值SN1,SN2,SN3等参数
|
|
|
- if (MidDoc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == (dr1[0]["lp_name"].ToString() + (i + 1)).ToUpper())
|
|
|
+ if (MidDoc.Variables.FormVariables.Item(k + 1).Name == (dr1[0]["lp_name"].ToString() + "_" + (i + 1)))
|
|
|
{
|
|
|
MidDoc.Variables.FormVariables.Item(k + 1).Value = dt1.Rows[i][0].ToString();
|
|
|
}
|
|
|
@@ -1455,6 +1457,10 @@ namespace UAS_LabelMachine
|
|
|
for (int j = 0; j < OutBoxDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name + "'");
|
|
|
+ //多参数命名
|
|
|
+ Console.WriteLine(OutBoxDoc.Variables.FormVariables.Item(j + 1).Name.Replace("_1", ""));
|
|
|
+ if (dr1.Length == 0)
|
|
|
+ dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name.Replace("_1", "") + "'");
|
|
|
if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串")
|
|
|
{
|
|
|
OutBoxDoc.Variables.FormVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
@@ -1467,12 +1473,12 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
for (int k = 0; k < OutBoxDoc.Variables.FormVariables.Count; k++)
|
|
|
{
|
|
|
- if (i == 0 & OutBoxDoc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == dr1[0]["lp_name"].ToString().ToUpper())
|
|
|
+ if (i == 0 & OutBoxDoc.Variables.FormVariables.Item(k + 1).Name == dr1[0]["lp_name"].ToString())
|
|
|
{
|
|
|
OutBoxDoc.Variables.FormVariables.Item(k + 1).Value = dt1.Rows[0][0].ToString();
|
|
|
}
|
|
|
//使用SN开头的参数赋值SN1,SN2,SN3等参数
|
|
|
- if (OutBoxDoc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == (dr1[0]["lp_name"].ToString() + (i + 1)).ToUpper())
|
|
|
+ if (OutBoxDoc.Variables.FormVariables.Item(k + 1).Name == (dr1[0]["lp_name"].ToString() + "_" + (i + 1)))
|
|
|
{
|
|
|
OutBoxDoc.Variables.FormVariables.Item(k + 1).Value = dt1.Rows[i][0].ToString();
|
|
|
}
|
|
|
@@ -1900,7 +1906,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void RefreshDBConnect_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void ButtonSetting_Click(object sender, EventArgs e)
|