Browse Source

修改索引BUG

章政 7 years ago
parent
commit
b0b67c0c58
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

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

@@ -1075,6 +1075,7 @@ namespace UAS_LabelMachine
         {
             if (EnablePrint)
             {
+                int selectedindex = OutBoxCombox.SelectedIndex;
                 for (int i = 0; i < OutBoxCombox.Items.Count; i++)
                 {
                     OutBoxCombox.SelectedIndex = i;
@@ -1099,6 +1100,7 @@ namespace UAS_LabelMachine
                     OutReport.PrintSettings.Printer = OutBoxPrinter.Text;
                     OutReport.Print();
                 }
+                OutBoxCombox.SelectedIndex = selectedindex;
                 Properties.Settings.Default.OPrinter = OutBoxPrinter.Text;
                 Properties.Settings.Default.Save();
                 dh.UpdateByCondition("prodiobarcode", "pib_outifprint=-1", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + pib_outboxcode2 + "'");