Browse Source

修改BUG

章政 7 years ago
parent
commit
7280766f70

+ 3 - 3
UAS-出货标签管理/PublicMethod/LogManager.cs

@@ -7,9 +7,9 @@ namespace UAS_LabelMachine.PublicMethod
     {
         public static void DoLog(string Message)
         {
-            //StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
-            //sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
-            //sw.Close();
+            StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+            sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
+            sw.Close();
         }
     }
 }

+ 1 - 3
UAS-出货标签管理/SetLoadingWindow.cs

@@ -27,9 +27,7 @@ namespace UAS_LabelMachine.PublicForm
             loadingCircle1.OuterCircleRadius = 20;
             loadingCircle1.InnerCircleRadius = 12;
             loadingCircle1.Active = true;
-            if (Text != "正在获取打印标签") {
-                CancelThread.Visible = false;
-            }
+            
             LoadingThread.Start();
             //在本窗体新建一个进程用来判断传递的进程是否执行结束
             Thread t1 = new Thread(SetLoadFinish);

+ 25 - 24
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -782,7 +782,7 @@
             // 
             this.Capacity.AutoSize = true;
             this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(80, 83);
+            this.Capacity.Location = new System.Drawing.Point(80, 80);
             this.Capacity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Capacity.Name = "Capacity";
             this.Capacity.Size = new System.Drawing.Size(0, 20);
@@ -792,7 +792,7 @@
             // 
             this.Process_midboxcode.AutoSize = true;
             this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(80, 138);
+            this.Process_midboxcode.Location = new System.Drawing.Point(80, 135);
             this.Process_midboxcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process_midboxcode.Name = "Process_midboxcode";
             this.Process_midboxcode.Size = new System.Drawing.Size(18, 20);
@@ -803,7 +803,7 @@
             // 
             this.Process_outboxcode.AutoSize = true;
             this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(80, 108);
+            this.Process_outboxcode.Location = new System.Drawing.Point(80, 105);
             this.Process_outboxcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process_outboxcode.Name = "Process_outboxcode";
             this.Process_outboxcode.Size = new System.Drawing.Size(18, 20);
@@ -815,7 +815,7 @@
             this.TotalCount.AutoSize = true;
             this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(125, 23);
+            this.TotalCount.Location = new System.Drawing.Point(125, 20);
             this.TotalCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.TotalCount.Name = "TotalCount";
             this.TotalCount.Size = new System.Drawing.Size(18, 20);
@@ -826,7 +826,7 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(108, 23);
+            this.label17.Location = new System.Drawing.Point(108, 20);
             this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(15, 20);
@@ -838,7 +838,7 @@
             this.CollectedCount.AutoSize = true;
             this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(84, 23);
+            this.CollectedCount.Location = new System.Drawing.Point(84, 20);
             this.CollectedCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.CollectedCount.Name = "CollectedCount";
             this.CollectedCount.Size = new System.Drawing.Size(18, 20);
@@ -849,7 +849,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(13, 109);
+            this.label14.Location = new System.Drawing.Point(13, 106);
             this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(39, 20);
@@ -860,7 +860,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(13, 138);
+            this.label11.Location = new System.Drawing.Point(13, 135);
             this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(39, 20);
@@ -871,7 +871,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(13, 58);
+            this.label13.Location = new System.Drawing.Point(13, 55);
             this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(54, 20);
@@ -882,7 +882,7 @@
             // 
             this.Installed.AutoSize = true;
             this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(80, 58);
+            this.Installed.Location = new System.Drawing.Point(80, 55);
             this.Installed.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Installed.Name = "Installed";
             this.Installed.Size = new System.Drawing.Size(0, 20);
@@ -892,7 +892,7 @@
             // 
             this.Process.AutoSize = true;
             this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(13, 23);
+            this.Process.Location = new System.Drawing.Point(13, 20);
             this.Process.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process.Name = "Process";
             this.Process.Size = new System.Drawing.Size(54, 20);
@@ -1012,6 +1012,7 @@
             this.pib_id1.DataPropertyName = "pib_id";
             this.pib_id1.HeaderText = "pib_id";
             this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
             this.pib_id1.Width = 84;
             // 
             // pib_pdno
@@ -1177,7 +1178,7 @@
             // 
             this.ViVoPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ViVoPlate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ViVoPlate.Location = new System.Drawing.Point(122, 203);
+            this.ViVoPlate.Location = new System.Drawing.Point(94, 204);
             this.ViVoPlate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.ViVoPlate.Name = "ViVoPlate";
             this.ViVoPlate.Size = new System.Drawing.Size(91, 33);
@@ -1199,7 +1200,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(122, 250);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(94, 251);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(91, 33);
@@ -1212,7 +1213,7 @@
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(9, 133);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(9, 138);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
@@ -1270,7 +1271,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(8, 209);
+            this.label5.Location = new System.Drawing.Point(8, 206);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(39, 20);
@@ -1281,7 +1282,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(7, 171);
+            this.label4.Location = new System.Drawing.Point(7, 168);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(39, 20);
@@ -1301,7 +1302,7 @@
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(119, 173);
+            this.label15.Location = new System.Drawing.Point(119, 170);
             this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(24, 20);
@@ -1333,7 +1334,7 @@
             // 
             this.MidLabelAutoPrint.AutoSize = true;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(12, 133);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(12, 138);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
@@ -1383,7 +1384,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(166, 10);
+            this.LogingOut.Location = new System.Drawing.Point(166, 7);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(52, 27);
@@ -1421,7 +1422,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(11, 213);
+            this.label10.Location = new System.Drawing.Point(11, 210);
             this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(39, 20);
@@ -1445,7 +1446,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(120, 253);
+            this.label9.Location = new System.Drawing.Point(120, 250);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(39, 20);
@@ -1469,7 +1470,7 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(11, 253);
+            this.label8.Location = new System.Drawing.Point(11, 250);
             this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(39, 20);
@@ -1480,7 +1481,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(8, 169);
+            this.label6.Location = new System.Drawing.Point(8, 166);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(39, 20);
@@ -1538,7 +1539,7 @@
             // 
             this.OutBoxLabelAutoPrint.AutoSize = true;
             this.OutBoxLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(12, 129);
+            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(12, 126);
             this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.OutBoxLabelAutoPrint.Name = "OutBoxLabelAutoPrint";
             this.OutBoxLabelAutoPrint.Size = new System.Drawing.Size(91, 24);

+ 4 - 0
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1744,6 +1744,10 @@ namespace UAS_LabelMachine
             }
         }
 
+        private void LoadGridData() {
+            LoadGridData(new object(), new EventArgs());
+        }
+
         /// <summary>
         /// 自定义函数  加载明细行的数据,多处使用添加进函数
         /// </summary>

+ 1 - 2
UAS-出货标签管理/客户标签维护.cs

@@ -36,7 +36,6 @@ namespace UAS_LabelMachine
         string LabelPath = "";
         //模板编号的ID
         string CL_ID1;
-
         string CL_ID2;
         //Label表的主键,用于弹窗的传参
         string La_id1;
@@ -230,7 +229,7 @@ namespace UAS_LabelMachine
                         LabelDataGridView.Rows[i].Cells["cl_labelsoft"].Value = LabelSoft;
                     }
                 }
-                string sql = "Insert into customerlabel (cl_ID,cl_custCODE,cl_LABELTYPE,cl_LABELCODE,cl_LABELURL,cl_DETNO,cl_LABELSOFT,cl_ISDEFAULT, cl_date) values( customerlabel_seq.nextval,'" + cu_code.Text + "',:cl_LABELTYPE,:cl_LABELCODE,:cl_LABELURL,:cl_DETNO,:cl_LABELSOFT,:cl_ISDEFAULT,sysdate )";
+                string sql = "Insert into customerlabel (cl_ID,cl_custCODE,cl_LABELTYPE,cl_LABELCODE,cl_LABELURL,cl_DETNO,cl_LABELSOFT,cl_ISDEFAULT, cl_date) values(customerlabel_seq.nextval,'" + cu_code.Text + "',:cl_LABELTYPE,:cl_LABELCODE,:cl_LABELURL,:cl_DETNO,:cl_LABELSOFT,:cl_ISDEFAULT,sysdate)";
                 dh.UpDateTableByCondition(dt.GetChanges(), "customerlabel", "cl_id", sql.ToLower());
                 LoadData();
             }