Browse Source

彩盒称重增加标签未维护处理

shim 8 years ago
parent
commit
0541614415
1 changed files with 8 additions and 1 deletions
  1. 8 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

+ 8 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -197,7 +197,14 @@ namespace UAS_MES.Make
 
         private void Confirm_Click(object sender, EventArgs e)
         {
-            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+            if (PrintLabel.Items.Count != 0)
+            {
+                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+            }
+            else
+            {
+                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
+            }
         }
 
         private void StartWeight_Click(object sender, EventArgs e)