Browse Source

修改外箱自动新增

callm 4 years ago
parent
commit
df256f920f
1 changed files with 36 additions and 36 deletions
  1. 36 36
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

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

@@ -398,7 +398,7 @@ namespace UAS_LabelMachine
             string pib_outboxcode2 = "";
 
             int BoxNum = LabelInfDataTable.Select("pib_outboxcode2='" + OutBoxNum.Text + "'").Length;
-            if (ConnectToMachine)
+            //if (!ConnectToMachine)
             {
                 if (BoxNum + CodeCount > OutboxCapacity.Value && AutoSetOutBox.Checked)
                 {
@@ -472,38 +472,38 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            else
-            {
-                if (OutBoxNum.Text == "新增")
-                {
-                    string maxoutbox = dh.getFieldDataByCondition("prodiobarcode", "max(to_number(pib_outboxcode2))", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
-                    //如果没有则从开始插入
-                    if (maxoutbox == "")
-                    {
-                        pib_outboxcode2 = "1";
-                    }
-                    else
-                    {
-                        pib_outboxcode2 = (int.Parse(maxoutbox) + 1).ToString();
-                    }
-                }
-                else
-                {
-                    pib_outboxcode2 = OutBoxNum.Text;
-                }
-                if (!AutoPrintOutBox.Checked)
-                {
-                    if (BoxNum + CodeCount > OutboxCapacity.Value)
-                    {
-                        string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
-                        if (close != "Yes")
-                        {
-                            Input.SelectAll();
-                            return;
-                        }
-                    }
-                }
-            }
+            //else
+            //{
+            //    if (OutBoxNum.Text == "新增")
+            //    {
+            //        string maxoutbox = dh.getFieldDataByCondition("prodiobarcode", "max(to_number(pib_outboxcode2))", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
+            //        //如果没有则从开始插入
+            //        if (maxoutbox == "")
+            //        {
+            //            pib_outboxcode2 = "1";
+            //        }
+            //        else
+            //        {
+            //            pib_outboxcode2 = (int.Parse(maxoutbox) + 1).ToString();
+            //        }
+            //    }
+            //    else
+            //    {
+            //        pib_outboxcode2 = OutBoxNum.Text;
+            //    }
+            //    if (!AutoPrintOutBox.Checked)
+            //    {
+            //        if (BoxNum + CodeCount > OutboxCapacity.Value)
+            //        {
+            //            string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            //            if (close != "Yes")
+            //            {
+            //                Input.SelectAll();
+            //                return;
+            //            }
+            //        }
+            //    }
+            //}
             if (OutBoxNum.Text == "全部")
             {
                 MessageBox.Show("请选择指定箱号或者新增");
@@ -707,7 +707,7 @@ namespace UAS_LabelMachine
                         pibid += PIBID[i];
                 }
                 if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                    SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                     SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                 for (int j = 0; j < SingleReport.Parameters.Count; j++)
                 {
                     SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
@@ -950,7 +950,7 @@ namespace UAS_LabelMachine
                     if (pibid != "")
                     {
                         if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                            SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                             SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                         for (int j = 0; j < SingleReport.Parameters.Count; j++)
                         {
                             SingleReport.SetParameterValue(SingleReport.Parameters[j].Name, "");
@@ -1563,7 +1563,7 @@ namespace UAS_LabelMachine
                 if (ComBoxClickChangeLabelDoc)
                 {
                     if (!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
-                        SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
+                         SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
                 }
             }
             catch (Exception) { }