|
|
@@ -744,27 +744,27 @@ namespace UAS_LabelMachine
|
|
|
//用标签本身的变量作为最外层的循环条件去匹配;
|
|
|
string pib_id = LabelInf.Rows[CurrentRowIndex].Cells["pib_id1"].Value.ToString();
|
|
|
sql.Clear();
|
|
|
- for (int i = 0; i < SingleDoc.Variables.FreeVariables.Count; i++)
|
|
|
+ for (int i = 0; i < SingleDoc.Variables.FormVariables.Count; i++)
|
|
|
{
|
|
|
- DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
}
|
|
|
DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_id=" + pib_id, "select");
|
|
|
- for (int i = 0; i < SingleDoc.Variables.FreeVariables.Count; i++)
|
|
|
+ for (int i = 0; i < SingleDoc.Variables.FormVariables.Count; i++)
|
|
|
{
|
|
|
- DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
- SingleDoc.Variables.FreeVariables.Item(i + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
+ SingleDoc.Variables.FormVariables.Item(i + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
}
|
|
|
- if (SingleDoc.Variables.FreeVariables.Item(i + 1).Value == "")
|
|
|
+ if (SingleDoc.Variables.FormVariables.Item(i + 1).Value == "")
|
|
|
{
|
|
|
- dr1 = Attach.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
+ dr1 = Attach.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(i + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
- SingleDoc.Variables.FreeVariables.Item(i + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
+ SingleDoc.Variables.FormVariables.Item(i + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
}
|
|
|
}
|
|
|
SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
|
|
|
@@ -972,7 +972,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if (SingleDoc.Variables.FreeVariables.Count == 0) { }
|
|
|
+ if (SingleDoc.Variables.FormVariables.Count == 0) { }
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -982,7 +982,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if (MidDoc.Variables.FreeVariables.Count == 0) { }
|
|
|
+ if (MidDoc.Variables.FormVariables.Count == 0) { }
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -1048,27 +1048,27 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
string pib_id = LabelInf.Rows[i].Cells["pib_id1"].Value.ToString();
|
|
|
sql.Clear();
|
|
|
- for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < SingleDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
}
|
|
|
DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_id=" + pib_id, "select");
|
|
|
- for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < SingleDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
- SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
+ SingleDoc.Variables.FormVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
}
|
|
|
- if (SingleDoc.Variables.FreeVariables.Item(j + 1).Value == "")
|
|
|
+ if (SingleDoc.Variables.FormVariables.Item(j + 1).Value == "")
|
|
|
{
|
|
|
- dr1 = Attach.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ dr1 = Attach.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
- SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
+ SingleDoc.Variables.FormVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
}
|
|
|
}
|
|
|
SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
|
|
|
@@ -1329,27 +1329,27 @@ namespace UAS_LabelMachine
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < MidDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
}
|
|
|
DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + (pib_outboxcode1 == "" ? "0" : pib_outboxcode1), "select");
|
|
|
- for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < MidDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
- MidDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
+ MidDoc.Variables.FormVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
}
|
|
|
- if (MidDoc.Variables.FreeVariables.Item(j + 1).Value == "")
|
|
|
+ if (MidDoc.Variables.FormVariables.Item(j + 1).Value == "")
|
|
|
{
|
|
|
- dr1 = Attach.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ dr1 = Attach.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
- MidDoc.Variables.FreeVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
+ MidDoc.Variables.FormVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
}
|
|
|
}
|
|
|
MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
|
|
|
@@ -1366,9 +1366,9 @@ namespace UAS_LabelMachine
|
|
|
string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
|
|
|
string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
|
|
|
sql.Clear();
|
|
|
- for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < OutBoxDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
@@ -1377,18 +1377,18 @@ namespace UAS_LabelMachine
|
|
|
DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2=" + (pib_outboxcode2 == "" ? "0" : pib_outboxcode2), "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
- for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
|
|
|
+ for (int j = 0; j < OutBoxDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
- DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
{
|
|
|
- OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
+ OutBoxDoc.Variables.FormVariables.Item(j + 1).Value = dt.Rows[0][dr1[0]["lp_sql"].ToString()].ToString();
|
|
|
}
|
|
|
- if (OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value == "")
|
|
|
+ if (OutBoxDoc.Variables.FormVariables.Item(j + 1).Value == "")
|
|
|
{
|
|
|
- dr1 = Attach.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
+ dr1 = Attach.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
if (dr1.Length > 0)
|
|
|
- OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
+ OutBoxDoc.Variables.FormVariables.Item(j + 1).Value = dr1[0]["lp_sql"].ToString();
|
|
|
}
|
|
|
}
|
|
|
OutBoxDoc.Printer.SwitchTo(OutBoxPrinter.Text);
|