章政 vor 7 Jahren
Ursprung
Commit
cb1eb3c08a
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

+ 3 - 3
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -1282,7 +1282,7 @@ namespace UAS_LabelMachine
         private void OutBoxNum_Click(object sender, EventArgs e)
         {
             OutBoxNum.Items.Clear();
-            DataTable dt = (DataTable)dh.ExecuteSql("select distinct pib_outboxcode2 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_outboxcode2", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select distinct pib_outboxcode2 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by to_number(pib_outboxcode2)", "select");
             ItemObject io = new ItemObject("新增", "新增");
             OutBoxNum.Items.Add(io);
             for (int i = 0; i < dt.Rows.Count; i++)
@@ -1461,7 +1461,7 @@ namespace UAS_LabelMachine
 
         private void PrintFooter_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select pib_outboxcode2,max(pib_id) pib_id from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' group by pib_outboxcode2 order by pib_outboxcode2", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select pib_outboxcode2,max(pib_id) pib_id from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' group by pib_outboxcode2 order by to_number(pib_outboxcode2)", "select");
             string SQL = "select pib_outboxcode2||'/'||(select max(to_number(pib_outboxcode2)) from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "') from prodiobarcode  where pib_id=";
             for (int i = 0; i < dt.Rows.Count; i++)
             {
@@ -1535,7 +1535,7 @@ namespace UAS_LabelMachine
         {
             if (LabelInf.Rows.Count > 0)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select distinct pib_outboxcode2 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_outboxcode2", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select distinct pib_outboxcode2 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by to_number(pib_outboxcode2)", "select");
                 string pibcustoutboxcode = dh.getFieldDataByCondition("prodiobarcode", "pib_custoutboxcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + LabelInf.Rows[LabelInf.Rows.Count - 1].Cells["pib_outboxcode2"].Value.ToString() + "' and pib_custoutboxcode is not null").ToString();
                 GetBarCodeRule(out Prefix, out Suffix, out MaxNum, out NumLength, out Radix);
                 if (Radix > 0)