Przeglądaj źródła

出货标签修改

callm 6 miesięcy temu
rodzic
commit
d6a2046c29

+ 2 - 2
UAS-出货标签管理/Program.cs

@@ -84,8 +84,8 @@ namespace UAS_LabelMachine
                 sb.AppendLine(ex.Message);
                 LogManager.DoLog(ex.StackTrace);
                 LogManager.DoLog(ex.TargetSite.ToString());
-                //sb.AppendLine(ex.StackTrace);
-                //sb.AppendLine("【异常方法】:" + ex.TargetSite);
+                sb.AppendLine(ex.StackTrace);
+                sb.AppendLine("【异常方法】:" + ex.TargetSite);
             }
             LogManager.DoLog(sb.ToString());
             return sb.ToString();

+ 5 - 18
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -167,11 +167,11 @@ namespace UAS_LabelMachine
         private void 贴标机条码打印_Load(object sender, EventArgs e)
         {
             //杀死之前全部未关闭的进程
-            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
-            for (int i = 0; i < processes.Length; i++)
-            {
-                processes[i].Kill();
-            }
+            //Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            //for (int i = 0; i < processes.Length; i++)
+            //{
+            //    processes[i].Kill();
+            //}
             //用计时器重置数据库链接
             LogManager.DoLog("程序启动,登陆人员【" + User.UserName + "】");
             dh = SystemInf.dh;
@@ -1196,11 +1196,8 @@ namespace UAS_LabelMachine
                     stw = new SetLoadingWindow(thread, "正在获取打印标签");
                     BaseUtil.SetFormCenter(stw);
                     stw.ShowDialog();
-                    MessageBox.Show("获取单盘数据!");
                     GetSingleBoxData();
-                    MessageBox.Show("获取中盒数据!");
                     GetMidBoxData();
-                    MessageBox.Show("获取数据结束!");
                     //重置采集项次
                     CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
@@ -1390,7 +1387,6 @@ namespace UAS_LabelMachine
         /// </summary>
         private void GetSingleBoxData()
         {
-            MessageBox.Show("1");
             if (SingleDoc == null)
                 return;
             for (int i = 0; i < LabelInf.Rows.Count; i++)
@@ -1401,7 +1397,6 @@ namespace UAS_LabelMachine
                 if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
                     MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
             }
-            MessageBox.Show("2");
             //id数组
             string[] pib_id_arr = SingleID.ToArray();
             //将所有的列存在在这里
@@ -1411,11 +1406,9 @@ namespace UAS_LabelMachine
             DataColumn datacolumn = new DataColumn("pib_id");
             if (!SingleBoxCacheData.Columns.Contains("pib_id"))
                 SingleBoxCacheData.Columns.Add(datacolumn);
-            MessageBox.Show("3");
             //获取打印的SQL
             try
             {
-                MessageBox.Show(SingleDoc.Variables.FreeVariables.Count+" "+ SingleLabelParam.Rows.Count);
                 for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
                 {
                     //将维护的模板参数和模板本身的参数名称进行比对
@@ -1432,15 +1425,11 @@ namespace UAS_LabelMachine
                             sql = sql.Substring(0, sql.LastIndexOf("="));
                             MessageLog.AppendText(sql.Replace(" from ", " ,pib_id PIBID from ") + " in (select pib_id from PRODIOBARCODE where pib_inoutno='" + pi_inoutno.Text + "') ORDER by pib_id\n");
                             DataTable temp = dh.getFieldsDatasByCondition(sql.Replace(" from ", " ,pib_id PIBID from ") + " in (select pib_id from PRODIOBARCODE where pib_inoutno='" + pi_inoutno.Text + "') ORDER by pib_id");
-                            MessageBox.Show("获取到数据");
                             temp.Columns[0].ColumnName = SingleDoc.Variables.FreeVariables.Item(j + 1).Name;
-                            MessageBox.Show("添加数据");
                             AllSingleBoxCacheData.Add(temp);
-                            MessageBox.Show("添加数据成功");
                         }
                     }
                 }
-                MessageBox.Show("4");
                 DataTable[] Temp = AllSingleBoxCacheData.ToArray();
                 //将所有数据写入到CacheData中
                 if (Temp.Length > 0)
@@ -1456,11 +1445,9 @@ namespace UAS_LabelMachine
                         SingleBoxCacheData.Rows.Add(dr);
                     }
 
-                MessageBox.Show("5");
             }
             catch (Exception )
             {
-                MessageBox.Show("EX");
                 SingleBoxArgument.Clear();
                 SingleBoxCacheData.Clear();
                 BaseUtil.CleanDataTable(SingleBoxCacheData);