Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 9 years ago
parent
commit
331bcdb4b0

+ 0 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -57,7 +57,6 @@
             this.TextBox.Lock = false;
             this.TextBox.Lock = false;
             this.TextBox.Name = "TextBox";
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 28);
             this.TextBox.Size = new System.Drawing.Size(178, 21);
             this.TextBox.Size = new System.Drawing.Size(178, 21);
             this.TextBox.Str = null;
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str1 = null;

+ 2 - 2
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -258,7 +258,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             LockCheckBox = ctl;
             LockCheckBox = ctl;
         }
         }
 
 
-        private void GetData()
+        public void GetData()
         {
         {
             if (TextBox.Text != "")
             if (TextBox.Text != "")
             {
             {
@@ -299,7 +299,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                     LeaveFindData = false;
                     LeaveFindData = false;
                 //不允许工单号为空的情况
                 //不允许工单号为空的情况
                 LockCheckBox.Checked = true;
                 LockCheckBox.Checked = true;
-                AfterDBFindSetValue(new object(),new EventArgs());
+                AfterDBFindSetValue(new object(), new EventArgs());
             }
             }
         }
         }
 
 

+ 43 - 1
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -265,11 +265,13 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         public void RefreshDB(object sender, EventArgs e)
         public void RefreshDB(object sender, EventArgs e)
         {
         {
             TextBox_Leave(sender, e);
             TextBox_Leave(sender, e);
+            GetData();
         }
         }
 
 
         public void TextBox_Leave(object sender, EventArgs e)
         public void TextBox_Leave(object sender, EventArgs e)
         {
         {
             TextBox.BackColor = System.Drawing.Color.White;
             TextBox.BackColor = System.Drawing.Color.White;
+            GetData();
         }
         }
 
 
         private void SearchTextBox_Load(object sender, EventArgs e)
         private void SearchTextBox_Load(object sender, EventArgs e)
@@ -281,7 +283,47 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
 
         private void SearchTextBox_SizeChanged(object sender, EventArgs e)
         private void SearchTextBox_SizeChanged(object sender, EventArgs e)
         {
         {
-            TextBox.Width = this.Width - Search_Icon.Width-3;
+            TextBox.Width = this.Width - Search_Icon.Width - 3;
+        }
+
+        public void GetData()
+        {
+            if (TextBox.Text != "")
+            {
+                DataHelper dh = new DataHelper();
+                List<string> fields = new List<string>();
+                //获取查询的字段
+                string[] field = selectField.Replace(",", "#").Trim().Split('#');
+                for (int i = 0; i < field.Length; i++)
+                {
+                    if (i % 2 == 0)
+                        fields.Add(field[i]);
+                }
+                //将查询到的结果返回界面
+                string sql = "select " + BaseUtil.AddField(fields.ToArray()) + " from " + tableName + " where " + Tag + "='" + TextBox.Text + "'";
+                if (condition != null)
+                {
+                    sql += " and " + condition;
+                }
+                DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
+                FormCollection fmCollection = Application.OpenForms;
+                if (dt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < dt.Columns.Count; i++)
+                    {
+                        for (int j = 0; j < SetValueField.Length; j++)
+                        {
+                            object tag = fmCollection[FormName].Controls[SetValueField[j]].Tag;
+                            //利用字段的Tag属性来和列名进行比对
+                            if (SetValueField[j] == dt.Columns[i].ColumnName.ToLower() || (tag != null && tag.ToString() == dt.Columns[i].ColumnName.ToLower()))
+                                fmCollection[FormName].Controls[SetValueField[j]].Text = dt.Rows[0][dt.Columns[i].ColumnName].ToString();
+                        }
+                    }
+                    LeaveFindData = true;
+                }
+                else
+                    LeaveFindData = false;
+            }
         }
         }
     }
     }
 }
 }

+ 14 - 0
UAS-MES/CustomControl/TextBoxWithIcon/TextAreaForm.Designer.cs

@@ -38,6 +38,7 @@
             // 
             // 
             // textBox1
             // textBox1
             // 
             // 
+            this.textBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.textBox1.Location = new System.Drawing.Point(1, 33);
             this.textBox1.Location = new System.Drawing.Point(1, 33);
             this.textBox1.Multiline = true;
             this.textBox1.Multiline = true;
             this.textBox1.Name = "textBox1";
             this.textBox1.Name = "textBox1";
@@ -52,13 +53,20 @@
             this.headBar1.Name = "headBar1";
             this.headBar1.Name = "headBar1";
             this.headBar1.Size = new System.Drawing.Size(522, 32);
             this.headBar1.Size = new System.Drawing.Size(522, 32);
             this.headBar1.TabIndex = 3;
             this.headBar1.TabIndex = 3;
+            this.headBar1.Title = null;
             this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
             this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
             // 
             // 
             // Clean
             // Clean
             // 
             // 
+            this.Clean.AllPower = null;
+            this.Clean.BackColor = System.Drawing.Color.Transparent;
+            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
+            this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(283, 302);
             this.Clean.Location = new System.Drawing.Point(283, 302);
+            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.Name = "Clean";
+            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
             this.Clean.Power = null;
             this.Clean.Size = new System.Drawing.Size(75, 23);
             this.Clean.Size = new System.Drawing.Size(75, 23);
             this.Clean.TabIndex = 2;
             this.Clean.TabIndex = 2;
@@ -68,9 +76,15 @@
             // 
             // 
             // Confirm
             // Confirm
             // 
             // 
+            this.Confirm.AllPower = null;
+            this.Confirm.BackColor = System.Drawing.Color.Transparent;
+            this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
+            this.Confirm.IsShowBorder = true;
             this.Confirm.Location = new System.Drawing.Point(160, 302);
             this.Confirm.Location = new System.Drawing.Point(160, 302);
+            this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.Name = "Confirm";
+            this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
             this.Confirm.Power = null;
             this.Confirm.Size = new System.Drawing.Size(75, 23);
             this.Confirm.Size = new System.Drawing.Size(75, 23);
             this.Confirm.TabIndex = 1;
             this.Confirm.TabIndex = 1;

+ 76 - 0
UAS-MES/CustomControl/TextBoxWithIcon/TextAreaForm.resx

@@ -118,6 +118,18 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
   <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
@@ -209,6 +221,44 @@
         wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
         wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
         ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
         ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
 </value>
   </data>
   </data>
   <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -302,6 +352,32 @@
         wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
         wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
         ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
         ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
 </value>
   </data>
   </data>
 </root>
 </root>

+ 16 - 8
UAS-MES/DataOperate/DataHelper.cs

@@ -32,7 +32,7 @@ namespace UAS_MES.DataOperate
                     connection = new OracleConnection(DBConnectionString);
                     connection = new OracleConnection(DBConnectionString);
                 connection.Open();
                 connection.Open();
             }
             }
-            catch (Exception e) { OracleConnection.ClearPool(connection); LogManager.DoLog(e.Message); }
+            catch (Exception e) { /*OracleConnection.ClearPool(connection);*/ LogManager.DoLog(e.Message); }
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -42,6 +42,7 @@ namespace UAS_MES.DataOperate
         {
         {
             DataTable dt = new DataTable();
             DataTable dt = new DataTable();
             command = new OracleCommand("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", connection);
             command = new OracleCommand("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Fill(dt);
             ad.Dispose();
             ad.Dispose();
@@ -58,7 +59,7 @@ namespace UAS_MES.DataOperate
             string sql = "select " + Field + " from " + TableName + " where " + Condition;
             string sql = "select " + Field + " from " + TableName + " where " + Condition;
             Console.WriteLine(sql);
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
             command = new OracleCommand(sql, connection);
-            command.CommandTimeout = 60000;
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter();
             OracleDataAdapter ad = new OracleDataAdapter();
             ad.SelectCommand = command;
             ad.SelectCommand = command;
             ad.Fill(dt);
             ad.Fill(dt);
@@ -156,7 +157,7 @@ namespace UAS_MES.DataOperate
             sql += " from " + TableName + " where " + Condition + " and rownum=1";
             sql += " from " + TableName + " where " + Condition + " and rownum=1";
             Console.WriteLine(sql);
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
             command = new OracleCommand(sql, connection);
-            command.CommandTimeout = 60000;
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Fill(dt);
             ad.Dispose();
             ad.Dispose();
@@ -234,7 +235,7 @@ namespace UAS_MES.DataOperate
             sql += " from " + TableName + " where " + Condition;
             sql += " from " + TableName + " where " + Condition;
             Console.WriteLine(sql);
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
             command = new OracleCommand(sql, connection);
-            command.CommandTimeout = 60000;
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Fill(dt);
             ad.Dispose();
             ad.Dispose();
@@ -252,6 +253,7 @@ namespace UAS_MES.DataOperate
             sql += Fields;
             sql += Fields;
             sql += " from " + TableName;
             sql += " from " + TableName;
             command = new OracleCommand(sql, connection);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.SelectCommand = command;
             ad.SelectCommand = command;
             ad.Fill(dt);
             ad.Fill(dt);
@@ -352,7 +354,6 @@ namespace UAS_MES.DataOperate
                     sb.Append(dc.Caption + "=:" + dc.Caption + ",");
                     sb.Append(dc.Caption + "=:" + dc.Caption + ",");
                 }
                 }
             }
             }
-
             sb.Remove(sb.Length - 1, 1);
             sb.Remove(sb.Length - 1, 1);
             sb.Append(" where " + PrimaryKey + "=:" + PrimaryKey);
             sb.Append(" where " + PrimaryKey + "=:" + PrimaryKey);
             command = new OracleCommand(sb.ToString(), connection);
             command = new OracleCommand(sb.ToString(), connection);
@@ -559,6 +560,7 @@ namespace UAS_MES.DataOperate
         {
         {
             string sql = "select count(1) from " + TableName + " where " + Condition;
             string sql = "select count(1) from " + TableName + " where " + Condition;
             command = new OracleCommand(sql, connection);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             DataTable dt = new DataTable();
             DataTable dt = new DataTable();
             Console.WriteLine(sql);
             Console.WriteLine(sql);
@@ -578,7 +580,7 @@ namespace UAS_MES.DataOperate
         {
         {
             object result = null;
             object result = null;
             command = new OracleCommand(SQL, connection);
             command = new OracleCommand(SQL, connection);
-            command.CommandTimeout = 600000;
+            Reconnect(command);
             //用来拼接参数的
             //用来拼接参数的
             if (names.Length > 0)
             if (names.Length > 0)
             {
             {
@@ -941,8 +943,9 @@ namespace UAS_MES.DataOperate
         /// <param name="param"></param>
         /// <param name="param"></param>
         public void CallProcedure(string ProcedureName, ref string[] param)
         public void CallProcedure(string ProcedureName, ref string[] param)
         {
         {
-            command = new OracleCommand();
+            command = new OracleCommand(ProcedureName);
             command.Connection = connection;
             command.Connection = connection;
+            //Reconnect(command);
             command.CommandText = ProcedureName;
             command.CommandText = ProcedureName;
             command.CommandType = CommandType.StoredProcedure;
             command.CommandType = CommandType.StoredProcedure;
             for (int i = 0; i < param.Length; i++)
             for (int i = 0; i < param.Length; i++)
@@ -1077,6 +1080,11 @@ namespace UAS_MES.DataOperate
             }
             }
             return param;
             return param;
         }
         }
-        
+
+        private void Reconnect(OracleCommand cmd)
+        {
+            if (cmd.Connection.State == ConnectionState.Closed)
+                cmd.Connection.Open();
+        }
     }
     }
 }
 }

+ 47 - 34
UAS-MES/DbFind.cs

@@ -70,7 +70,6 @@ namespace UAS_MES
                 Caller = caller;
                 Caller = caller;
                 Condition = condition + "";
                 Condition = condition + "";
                 BindTable = tablename;
                 BindTable = tablename;
-
                 SelectField = selectfield.Replace("#", " as ");
                 SelectField = selectfield.Replace("#", " as ");
                 //返回一个带有结构的空的DataTable
                 //返回一个带有结构的空的DataTable
                 dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename + " where ROWNUM<20", "select");
                 dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename + " where ROWNUM<20", "select");
@@ -167,53 +166,67 @@ namespace UAS_MES
                 Boolean groupcontains = false;
                 Boolean groupcontains = false;
                 //先判断DataTable里面是否有这个字段,然后从打开的窗口里面去获取到这个Form,从Form中的指定Panel获取到指定字段的控件
                 //先判断DataTable里面是否有这个字段,然后从打开的窗口里面去获取到这个Form,从Form中的指定Panel获取到指定字段的控件
                 FormCollection fmCollection = Application.OpenForms;
                 FormCollection fmCollection = Application.OpenForms;
+                //SuccessReturnData = true;
+                //ControlCollection controls = (ControlCollection)fmCollection[FormName].Controls;
+                //for (int i = 0; i < dt.Columns.Count; i++)
+                //{
+                //    for (int k = 0; k < controls.Count; k++)
+                //    {
+                //        Control ctl = controls[k];
+                //        if (ctl.Controls.Count > 0)
+                //        {
+                //            for (int j = 0; j < SetValueField.Length; j++)
+                //            {
+                //                Control ct2 = ctl.Controls[SetValueField[j]];
+                //                if (ct2 != null)
+                //                {
+                //                    if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ct2 != null && ct2.Tag != null && ct2.Tag.ToString() == dt.Columns[i].Caption))
+                //                        ct2.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                //                    groupcontains = true;
+                //                }
+                //            }
+                //        }
+                //        break;
+                //    }
+                //}
+                //if (!groupcontains)
+                //{
+                //    for (int i = 0; i < dt.Columns.Count; i++)
+                //    {
+                //        for (int j = 0; j < SetValueField.Length; j++)
+                //        {
+                //            Control ctl = fmCollection[FormName].Controls[SetValueField[j]];
+                //            if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ctl != null && ctl.Tag != null && ctl.Tag.ToString() == dt.Columns[i].Caption))
+                //                fmCollection[FormName].Controls[SetValueField[j]].Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                //        }
+                //    }
+                //}
+                //发起DBFind的控件
                 SuccessReturnData = true;
                 SuccessReturnData = true;
-                ControlCollection controls = (ControlCollection)fmCollection[FormName].Controls;
+                MainControl = fmCollection[FormName].Controls[MainField];
                 for (int i = 0; i < dt.Columns.Count; i++)
                 for (int i = 0; i < dt.Columns.Count; i++)
                 {
                 {
-                    for (int k = 0; k < controls.Count; k++)
+                    if (MainControl.Name == dt.Columns[i].Caption.ToLower() || (MainControl.Tag != null && MainControl.Tag.ToString() == dt.Columns[i].Caption.ToLower()))
                     {
                     {
-                        Control ctl = controls[k];
-                        if (ctl.Controls.Count > 0)
-                        {
-                            for (int j = 0; j < SetValueField.Length; j++)
-                            {
-                                Control ct2 = ctl.Controls[SetValueField[j]];
-                                if (ct2 != null)
-                                {
-                                    if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ct2 != null && ct2.Tag != null && ct2.Tag.ToString() == dt.Columns[i].Caption))
-                                        ct2.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
-                                    groupcontains = true;
-                                }
-                            }
-                        }
+                        MainControl.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
                         break;
                         break;
                     }
                     }
                 }
                 }
-                if (!groupcontains)
-                {
-                    for (int i = 0; i < dt.Columns.Count; i++)
-                    {
-                        for (int j = 0; j < SetValueField.Length; j++)
-                        {
-                            Control ctl = fmCollection[FormName].Controls[SetValueField[j]];
-                            if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ctl != null && ctl.Tag != null && ctl.Tag.ToString() == dt.Columns[i].Caption))
-                                fmCollection[FormName].Controls[SetValueField[j]].Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
-                        }
-                    }
-                }
-                //发起DBFind的控件
-                MainControl = fmCollection[FormName].Controls[MainField];
-                MainControl.Focus();
                 if (MainControl is MaCodeSearchTextBox)
                 if (MainControl is MaCodeSearchTextBox)
                 {
                 {
                     MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
                     MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
+                    ctl.GetData();
                     ctl.AfterDbFind += DbFind_AfterDbFind;
                     ctl.AfterDbFind += DbFind_AfterDbFind;
                     ctl.AfterDBFindSetValue(new object(), new EventArgs());
                     ctl.AfterDBFindSetValue(new object(), new EventArgs());
                 }
                 }
-
+                if (MainControl is SearchTextBox)
+                {
+                    SearchTextBox ctl = (MainControl as SearchTextBox);
+                    ctl.GetData();
+                }
+                MainControl.Focus();
             }
             }
-            catch (Exception exa)
+            catch (Exception)
             {
             {
                 SuccessReturnData = false;
                 SuccessReturnData = false;
             }
             }

+ 84 - 97
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.Designer.cs

@@ -39,6 +39,8 @@
             this.em_code2_label = new System.Windows.Forms.Label();
             this.em_code2_label = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.ug_name_title_label = new System.Windows.Forms.Label();
             this.ug_name_title_label = new System.Windows.Forms.Label();
+            this.em_code2 = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.em_code3 = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.em_name3 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.em_name3 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.em_name2 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.em_name2 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ScreenOutGroup = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ScreenOutGroup = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -56,8 +58,6 @@
             this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_recorder = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_recorder = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.em_code3 = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.em_code2 = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.OutGroupUser)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.OutGroupUser)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.InGroupUser)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.InGroupUser)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
@@ -66,20 +66,18 @@
             // 
             // 
             this.ug_code_title.AutoSize = true;
             this.ug_code_title.AutoSize = true;
             this.ug_code_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ug_code_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_code_title.Location = new System.Drawing.Point(155, 12);
-            this.ug_code_title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ug_code_title.Location = new System.Drawing.Point(116, 10);
             this.ug_code_title.Name = "ug_code_title";
             this.ug_code_title.Name = "ug_code_title";
-            this.ug_code_title.Size = new System.Drawing.Size(0, 27);
+            this.ug_code_title.Size = new System.Drawing.Size(0, 21);
             this.ug_code_title.TabIndex = 235;
             this.ug_code_title.TabIndex = 235;
             // 
             // 
             // ug_code_title_label
             // ug_code_title_label
             // 
             // 
             this.ug_code_title_label.AutoSize = true;
             this.ug_code_title_label.AutoSize = true;
             this.ug_code_title_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ug_code_title_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_code_title_label.Location = new System.Drawing.Point(31, 12);
-            this.ug_code_title_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ug_code_title_label.Location = new System.Drawing.Point(23, 10);
             this.ug_code_title_label.Name = "ug_code_title_label";
             this.ug_code_title_label.Name = "ug_code_title_label";
-            this.ug_code_title_label.Size = new System.Drawing.Size(112, 27);
+            this.ug_code_title_label.Size = new System.Drawing.Size(90, 21);
             this.ug_code_title_label.TabIndex = 236;
             this.ug_code_title_label.TabIndex = 236;
             this.ug_code_title_label.Text = "用户组编号";
             this.ug_code_title_label.Text = "用户组编号";
             // 
             // 
@@ -87,10 +85,9 @@
             // 
             // 
             this.ug_name_title.AutoSize = true;
             this.ug_name_title.AutoSize = true;
             this.ug_name_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ug_name_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_name_title.Location = new System.Drawing.Point(155, 52);
-            this.ug_name_title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ug_name_title.Location = new System.Drawing.Point(116, 42);
             this.ug_name_title.Name = "ug_name_title";
             this.ug_name_title.Name = "ug_name_title";
-            this.ug_name_title.Size = new System.Drawing.Size(0, 27);
+            this.ug_name_title.Size = new System.Drawing.Size(0, 21);
             this.ug_name_title.TabIndex = 238;
             this.ug_name_title.TabIndex = 238;
             // 
             // 
             // label2
             // label2
@@ -98,10 +95,9 @@
             this.label2.AutoSize = true;
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(31, 168);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(23, 134);
             this.label2.Name = "label2";
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 242;
             this.label2.TabIndex = 242;
             this.label2.Text = "组内成员";
             this.label2.Text = "组内成员";
             // 
             // 
@@ -109,10 +105,9 @@
             // 
             // 
             this.em_name3_label.AutoSize = true;
             this.em_name3_label.AutoSize = true;
             this.em_name3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.em_name3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_name3_label.Location = new System.Drawing.Point(31, 130);
-            this.em_name3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.em_name3_label.Location = new System.Drawing.Point(23, 104);
             this.em_name3_label.Name = "em_name3_label";
             this.em_name3_label.Name = "em_name3_label";
-            this.em_name3_label.Size = new System.Drawing.Size(92, 27);
+            this.em_name3_label.Size = new System.Drawing.Size(74, 21);
             this.em_name3_label.TabIndex = 246;
             this.em_name3_label.TabIndex = 246;
             this.em_name3_label.Text = "用户名称";
             this.em_name3_label.Text = "用户名称";
             // 
             // 
@@ -120,10 +115,9 @@
             // 
             // 
             this.em_code3_label.AutoSize = true;
             this.em_code3_label.AutoSize = true;
             this.em_code3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.em_code3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code3_label.Location = new System.Drawing.Point(31, 90);
-            this.em_code3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.em_code3_label.Location = new System.Drawing.Point(23, 72);
             this.em_code3_label.Name = "em_code3_label";
             this.em_code3_label.Name = "em_code3_label";
-            this.em_code3_label.Size = new System.Drawing.Size(92, 27);
+            this.em_code3_label.Size = new System.Drawing.Size(74, 21);
             this.em_code3_label.TabIndex = 244;
             this.em_code3_label.TabIndex = 244;
             this.em_code3_label.Text = "用户编号";
             this.em_code3_label.Text = "用户编号";
             // 
             // 
@@ -131,10 +125,9 @@
             // 
             // 
             this.em_name2_label.AutoSize = true;
             this.em_name2_label.AutoSize = true;
             this.em_name2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.em_name2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_name2_label.Location = new System.Drawing.Point(640, 130);
-            this.em_name2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.em_name2_label.Location = new System.Drawing.Point(480, 104);
             this.em_name2_label.Name = "em_name2_label";
             this.em_name2_label.Name = "em_name2_label";
-            this.em_name2_label.Size = new System.Drawing.Size(92, 27);
+            this.em_name2_label.Size = new System.Drawing.Size(74, 21);
             this.em_name2_label.TabIndex = 251;
             this.em_name2_label.TabIndex = 251;
             this.em_name2_label.Text = "用户名称";
             this.em_name2_label.Text = "用户名称";
             // 
             // 
@@ -142,10 +135,9 @@
             // 
             // 
             this.em_code2_label.AutoSize = true;
             this.em_code2_label.AutoSize = true;
             this.em_code2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.em_code2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code2_label.Location = new System.Drawing.Point(640, 90);
-            this.em_code2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.em_code2_label.Location = new System.Drawing.Point(480, 72);
             this.em_code2_label.Name = "em_code2_label";
             this.em_code2_label.Name = "em_code2_label";
-            this.em_code2_label.Size = new System.Drawing.Size(92, 27);
+            this.em_code2_label.Size = new System.Drawing.Size(74, 21);
             this.em_code2_label.TabIndex = 249;
             this.em_code2_label.TabIndex = 249;
             this.em_code2_label.Text = "用户编号";
             this.em_code2_label.Text = "用户编号";
             // 
             // 
@@ -154,10 +146,9 @@
             this.label6.AutoSize = true;
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.ForeColor = System.Drawing.Color.Blue;
             this.label6.ForeColor = System.Drawing.Color.Blue;
-            this.label6.Location = new System.Drawing.Point(640, 168);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(480, 134);
             this.label6.Name = "label6";
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(92, 27);
+            this.label6.Size = new System.Drawing.Size(74, 21);
             this.label6.TabIndex = 248;
             this.label6.TabIndex = 248;
             this.label6.Text = "组外成员";
             this.label6.Text = "组外成员";
             // 
             // 
@@ -165,23 +156,58 @@
             // 
             // 
             this.ug_name_title_label.AutoSize = true;
             this.ug_name_title_label.AutoSize = true;
             this.ug_name_title_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ug_name_title_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_name_title_label.Location = new System.Drawing.Point(31, 52);
-            this.ug_name_title_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ug_name_title_label.Location = new System.Drawing.Point(23, 42);
             this.ug_name_title_label.Name = "ug_name_title_label";
             this.ug_name_title_label.Name = "ug_name_title_label";
-            this.ug_name_title_label.Size = new System.Drawing.Size(72, 27);
+            this.ug_name_title_label.Size = new System.Drawing.Size(58, 21);
             this.ug_name_title_label.TabIndex = 257;
             this.ug_name_title_label.TabIndex = 257;
             this.ug_name_title_label.Text = "用户组";
             this.ug_name_title_label.Text = "用户组";
             // 
             // 
+            // em_code2
+            // 
+            this.em_code2.AllPower = null;
+            this.em_code2.Caller = null;
+            this.em_code2.Condition = null;
+            this.em_code2.DBTitle = null;
+            this.em_code2.FormName = null;
+            this.em_code2.Location = new System.Drawing.Point(579, 72);
+            this.em_code2.Name = "em_code2";
+            this.em_code2.Power = null;
+            this.em_code2.SelectField = null;
+            this.em_code2.SetValueField = null;
+            this.em_code2.Size = new System.Drawing.Size(164, 20);
+            this.em_code2.TabIndex = 259;
+            this.em_code2.TableName = null;
+            this.em_code2.Tag = "em_code";
+            this.em_code2.TextBoxEnable = false;
+            // 
+            // em_code3
+            // 
+            this.em_code3.AllPower = null;
+            this.em_code3.Caller = null;
+            this.em_code3.Condition = null;
+            this.em_code3.DBTitle = null;
+            this.em_code3.FormName = null;
+            this.em_code3.Location = new System.Drawing.Point(115, 72);
+            this.em_code3.Name = "em_code3";
+            this.em_code3.Power = null;
+            this.em_code3.SelectField = null;
+            this.em_code3.SetValueField = null;
+            this.em_code3.Size = new System.Drawing.Size(167, 21);
+            this.em_code3.TabIndex = 258;
+            this.em_code3.TableName = null;
+            this.em_code3.Tag = "em_code";
+            this.em_code3.TextBoxEnable = false;
+            // 
             // em_name3
             // em_name3
             // 
             // 
             this.em_name3.AllPower = null;
             this.em_name3.AllPower = null;
             this.em_name3.BackColor = System.Drawing.Color.White;
             this.em_name3.BackColor = System.Drawing.Color.White;
             this.em_name3.ID = null;
             this.em_name3.ID = null;
-            this.em_name3.Location = new System.Drawing.Point(153, 135);
-            this.em_name3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.em_name3.Location = new System.Drawing.Point(115, 108);
+            this.em_name3.Margin = new System.Windows.Forms.Padding(2);
             this.em_name3.Name = "em_name3";
             this.em_name3.Name = "em_name3";
             this.em_name3.Power = null;
             this.em_name3.Power = null;
-            this.em_name3.Size = new System.Drawing.Size(200, 25);
+            this.em_name3.Size = new System.Drawing.Size(151, 21);
             this.em_name3.Str = null;
             this.em_name3.Str = null;
             this.em_name3.Str1 = null;
             this.em_name3.Str1 = null;
             this.em_name3.Str2 = null;
             this.em_name3.Str2 = null;
@@ -193,11 +219,11 @@
             this.em_name2.AllPower = null;
             this.em_name2.AllPower = null;
             this.em_name2.BackColor = System.Drawing.Color.White;
             this.em_name2.BackColor = System.Drawing.Color.White;
             this.em_name2.ID = null;
             this.em_name2.ID = null;
-            this.em_name2.Location = new System.Drawing.Point(772, 130);
-            this.em_name2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.em_name2.Location = new System.Drawing.Point(579, 104);
+            this.em_name2.Margin = new System.Windows.Forms.Padding(2);
             this.em_name2.Name = "em_name2";
             this.em_name2.Name = "em_name2";
             this.em_name2.Power = null;
             this.em_name2.Power = null;
-            this.em_name2.Size = new System.Drawing.Size(196, 25);
+            this.em_name2.Size = new System.Drawing.Size(148, 21);
             this.em_name2.Str = null;
             this.em_name2.Str = null;
             this.em_name2.Str1 = null;
             this.em_name2.Str1 = null;
             this.em_name2.Str2 = null;
             this.em_name2.Str2 = null;
@@ -212,13 +238,13 @@
             this.ScreenOutGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ScreenOutGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ScreenOutGroup.Image = null;
             this.ScreenOutGroup.Image = null;
             this.ScreenOutGroup.IsShowBorder = true;
             this.ScreenOutGroup.IsShowBorder = true;
-            this.ScreenOutGroup.Location = new System.Drawing.Point(1043, 90);
-            this.ScreenOutGroup.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ScreenOutGroup.Location = new System.Drawing.Point(782, 72);
+            this.ScreenOutGroup.Margin = new System.Windows.Forms.Padding(2);
             this.ScreenOutGroup.MoveImage = ((System.Drawing.Image)(resources.GetObject("ScreenOutGroup.MoveImage")));
             this.ScreenOutGroup.MoveImage = ((System.Drawing.Image)(resources.GetObject("ScreenOutGroup.MoveImage")));
             this.ScreenOutGroup.Name = "ScreenOutGroup";
             this.ScreenOutGroup.Name = "ScreenOutGroup";
             this.ScreenOutGroup.NormalImage = ((System.Drawing.Image)(resources.GetObject("ScreenOutGroup.NormalImage")));
             this.ScreenOutGroup.NormalImage = ((System.Drawing.Image)(resources.GetObject("ScreenOutGroup.NormalImage")));
             this.ScreenOutGroup.Power = null;
             this.ScreenOutGroup.Power = null;
-            this.ScreenOutGroup.Size = new System.Drawing.Size(75, 34);
+            this.ScreenOutGroup.Size = new System.Drawing.Size(56, 27);
             this.ScreenOutGroup.TabIndex = 254;
             this.ScreenOutGroup.TabIndex = 254;
             this.ScreenOutGroup.Text = "筛选";
             this.ScreenOutGroup.Text = "筛选";
             this.ScreenOutGroup.UseVisualStyleBackColor = false;
             this.ScreenOutGroup.UseVisualStyleBackColor = false;
@@ -232,13 +258,13 @@
             this.ScreenInGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ScreenInGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ScreenInGroup.Image = null;
             this.ScreenInGroup.Image = null;
             this.ScreenInGroup.IsShowBorder = true;
             this.ScreenInGroup.IsShowBorder = true;
-            this.ScreenInGroup.Location = new System.Drawing.Point(425, 88);
-            this.ScreenInGroup.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ScreenInGroup.Location = new System.Drawing.Point(319, 70);
+            this.ScreenInGroup.Margin = new System.Windows.Forms.Padding(2);
             this.ScreenInGroup.MoveImage = ((System.Drawing.Image)(resources.GetObject("ScreenInGroup.MoveImage")));
             this.ScreenInGroup.MoveImage = ((System.Drawing.Image)(resources.GetObject("ScreenInGroup.MoveImage")));
             this.ScreenInGroup.Name = "ScreenInGroup";
             this.ScreenInGroup.Name = "ScreenInGroup";
             this.ScreenInGroup.NormalImage = ((System.Drawing.Image)(resources.GetObject("ScreenInGroup.NormalImage")));
             this.ScreenInGroup.NormalImage = ((System.Drawing.Image)(resources.GetObject("ScreenInGroup.NormalImage")));
             this.ScreenInGroup.Power = null;
             this.ScreenInGroup.Power = null;
-            this.ScreenInGroup.Size = new System.Drawing.Size(75, 34);
+            this.ScreenInGroup.Size = new System.Drawing.Size(56, 27);
             this.ScreenInGroup.TabIndex = 253;
             this.ScreenInGroup.TabIndex = 253;
             this.ScreenInGroup.Text = "筛选";
             this.ScreenInGroup.Text = "筛选";
             this.ScreenInGroup.UseVisualStyleBackColor = false;
             this.ScreenInGroup.UseVisualStyleBackColor = false;
@@ -253,11 +279,11 @@
             this.em_name1,
             this.em_name1,
             this.em_depart,
             this.em_depart,
             this.em_position});
             this.em_position});
-            this.OutGroupUser.Location = new System.Drawing.Point(637, 198);
-            this.OutGroupUser.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OutGroupUser.Location = new System.Drawing.Point(478, 158);
+            this.OutGroupUser.Margin = new System.Windows.Forms.Padding(2);
             this.OutGroupUser.Name = "OutGroupUser";
             this.OutGroupUser.Name = "OutGroupUser";
             this.OutGroupUser.RowTemplate.Height = 27;
             this.OutGroupUser.RowTemplate.Height = 27;
-            this.OutGroupUser.Size = new System.Drawing.Size(500, 555);
+            this.OutGroupUser.Size = new System.Drawing.Size(375, 444);
             this.OutGroupUser.TabIndex = 243;
             this.OutGroupUser.TabIndex = 243;
             // 
             // 
             // em_code1
             // em_code1
@@ -293,10 +319,10 @@
             // UserOut
             // UserOut
             // 
             // 
             this.UserOut.Image = ((System.Drawing.Image)(resources.GetObject("UserOut.Image")));
             this.UserOut.Image = ((System.Drawing.Image)(resources.GetObject("UserOut.Image")));
-            this.UserOut.Location = new System.Drawing.Point(544, 521);
-            this.UserOut.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.UserOut.Location = new System.Drawing.Point(408, 417);
+            this.UserOut.Margin = new System.Windows.Forms.Padding(2);
             this.UserOut.Name = "UserOut";
             this.UserOut.Name = "UserOut";
-            this.UserOut.Size = new System.Drawing.Size(75, 30);
+            this.UserOut.Size = new System.Drawing.Size(56, 24);
             this.UserOut.TabIndex = 241;
             this.UserOut.TabIndex = 241;
             this.UserOut.UseVisualStyleBackColor = true;
             this.UserOut.UseVisualStyleBackColor = true;
             this.UserOut.Click += new System.EventHandler(this.UserOut_Click);
             this.UserOut.Click += new System.EventHandler(this.UserOut_Click);
@@ -304,10 +330,10 @@
             // UserIn
             // UserIn
             // 
             // 
             this.UserIn.Image = ((System.Drawing.Image)(resources.GetObject("UserIn.Image")));
             this.UserIn.Image = ((System.Drawing.Image)(resources.GetObject("UserIn.Image")));
-            this.UserIn.Location = new System.Drawing.Point(544, 445);
-            this.UserIn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.UserIn.Location = new System.Drawing.Point(408, 356);
+            this.UserIn.Margin = new System.Windows.Forms.Padding(2);
             this.UserIn.Name = "UserIn";
             this.UserIn.Name = "UserIn";
-            this.UserIn.Size = new System.Drawing.Size(75, 30);
+            this.UserIn.Size = new System.Drawing.Size(56, 24);
             this.UserIn.TabIndex = 240;
             this.UserIn.TabIndex = 240;
             this.UserIn.UseVisualStyleBackColor = true;
             this.UserIn.UseVisualStyleBackColor = true;
             this.UserIn.Click += new System.EventHandler(this.UserIn_Click);
             this.UserIn.Click += new System.EventHandler(this.UserIn_Click);
@@ -322,11 +348,11 @@
             this.em_name,
             this.em_name,
             this.em_indate,
             this.em_indate,
             this.em_recorder});
             this.em_recorder});
-            this.InGroupUser.Location = new System.Drawing.Point(27, 198);
-            this.InGroupUser.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.InGroupUser.Location = new System.Drawing.Point(20, 158);
+            this.InGroupUser.Margin = new System.Windows.Forms.Padding(2);
             this.InGroupUser.Name = "InGroupUser";
             this.InGroupUser.Name = "InGroupUser";
             this.InGroupUser.RowTemplate.Height = 27;
             this.InGroupUser.RowTemplate.Height = 27;
-            this.InGroupUser.Size = new System.Drawing.Size(500, 555);
+            this.InGroupUser.Size = new System.Drawing.Size(375, 444);
             this.InGroupUser.TabIndex = 239;
             this.InGroupUser.TabIndex = 239;
             // 
             // 
             // em_code
             // em_code
@@ -368,49 +394,11 @@
             this.em_recorder.ReadOnly = true;
             this.em_recorder.ReadOnly = true;
             this.em_recorder.Width = 81;
             this.em_recorder.Width = 81;
             // 
             // 
-            // em_code3
-            // 
-            this.em_code3.AllPower = null;
-            this.em_code3.Caller = null;
-            this.em_code3.Condition = null;
-            this.em_code3.DBTitle = null;
-            this.em_code3.FormName = null;
-            this.em_code3.Location = new System.Drawing.Point(153, 90);
-            this.em_code3.Margin = new System.Windows.Forms.Padding(4);
-            this.em_code3.Name = "em_code3";
-            this.em_code3.Power = null;
-            this.em_code3.SelectField = null;
-            this.em_code3.SetValueField = null;
-            this.em_code3.Size = new System.Drawing.Size(223, 25);
-            this.em_code3.TabIndex = 258;
-            this.em_code3.TableName = null;
-            this.em_code3.Tag = "em_code";
-            this.em_code3.TextBoxEnable = false;
-            // 
-            // em_code2
-            // 
-            this.em_code2.AllPower = null;
-            this.em_code2.Caller = null;
-            this.em_code2.Condition = null;
-            this.em_code2.DBTitle = null;
-            this.em_code2.FormName = null;
-            this.em_code2.Location = new System.Drawing.Point(772, 90);
-            this.em_code2.Margin = new System.Windows.Forms.Padding(4);
-            this.em_code2.Name = "em_code2";
-            this.em_code2.Power = null;
-            this.em_code2.SelectField = null;
-            this.em_code2.SetValueField = null;
-            this.em_code2.Size = new System.Drawing.Size(219, 25);
-            this.em_code2.TabIndex = 259;
-            this.em_code2.TableName = null;
-            this.em_code2.Tag = "em_code";
-            this.em_code2.TextBoxEnable = false;
-            // 
             // Employee_ChooseUserToGroup
             // Employee_ChooseUserToGroup
             // 
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1168, 765);
+            this.ClientSize = new System.Drawing.Size(876, 612);
             this.Controls.Add(this.em_code2);
             this.Controls.Add(this.em_code2);
             this.Controls.Add(this.em_code3);
             this.Controls.Add(this.em_code3);
             this.Controls.Add(this.ug_name_title_label);
             this.Controls.Add(this.ug_name_title_label);
@@ -432,7 +420,6 @@
             this.Controls.Add(this.ug_code_title_label);
             this.Controls.Add(this.ug_code_title_label);
             this.Controls.Add(this.ug_code_title);
             this.Controls.Add(this.ug_code_title);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Employee_ChooseUserToGroup";
             this.Name = "Employee_ChooseUserToGroup";
             this.Tag = "ShowDialogWindow";
             this.Tag = "ShowDialogWindow";
             this.Text = "人员选择";
             this.Text = "人员选择";

+ 0 - 27
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.resx

@@ -206,18 +206,6 @@
   <metadata name="em_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="em_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
-  <metadata name="em_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_depart.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="UserOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   <data name="UserOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
     <value>
         iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
         iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
@@ -271,19 +259,4 @@
   <metadata name="em_recorder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="em_recorder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
-  <metadata name="em_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="eg_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_recorder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>
 </root>

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -124,6 +124,7 @@ namespace UAS_MES.Make
                 {
                 {
                     OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red);
                     OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red);
                 }
                 }
+                outboxcode.Text = "";
             }
             }
         }
         }
 
 

+ 4 - 4
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -89,7 +89,7 @@ namespace UAS_MES.Make
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             if (dt.Rows[0]["CN"].ToString() != "0")
                             if (dt.Rows[0]["CN"].ToString() != "0")
                             {
                             {
-                                OperateResult.AppendText(">>物料:" + pr_code.Text + " ,岗位用料不足\n", Color.Red);
+                                OperateResult.AppendText(">>物料:" + pr_code.Text + " ,岗位用料不足\n", Color.Red,sncode);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -104,17 +104,17 @@ namespace UAS_MES.Make
                             Temp1.Text = sncode.Text;
                             Temp1.Text = sncode.Text;
                         }
                         }
                         else
                         else
-                            OperateResult.AppendText(">>检测未通过\n", Color.Red);
+                            OperateResult.AppendText(">>检测未通过\n", Color.Red,sncode);
                     }
                     }
                     else
                     else
                     {
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red,sncode);
                     }
                     }
                     sncode.Text = "";
                     sncode.Text = "";
                 }
                 }
                 else
                 else
                 {
                 {
-                    OperateResult.AppendText(">>序列号不存在\n", Color.Red);
+                    OperateResult.AppendText(">>序列号不存在\n", Color.Red,sncode);
                     return;
                     return;
                 }
                 }
             }
             }

+ 112 - 110
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.Designer.cs

@@ -32,22 +32,22 @@
             this.PrintLabel = new System.Windows.Forms.ComboBox();
             this.PrintLabel = new System.Windows.Forms.ComboBox();
             this.label2 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.pr_code = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.sncode_label = new System.Windows.Forms.Label();
             this.sncode_label = new System.Windows.Forms.Label();
-            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.label4 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.ma_code = new System.Windows.Forms.Label();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // PrintLabel
             // PrintLabel
@@ -82,10 +82,89 @@
             this.label1.TabIndex = 179;
             this.label1.TabIndex = 179;
             this.label1.Text = "标签";
             this.label1.Text = "标签";
             // 
             // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(686, 67);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
+            this.pr_detail_label.TabIndex = 171;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(29, 678);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(86, 31);
+            this.sncode_label.TabIndex = 170;
+            this.sncode_label.Text = "序列号";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(686, 140);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(110, 31);
+            this.label4.TabIndex = 167;
+            this.label4.Text = "打印张数";
+            // 
+            // mcd_remainqty_label
+            // 
+            this.mcd_remainqty_label.AutoSize = true;
+            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(358, 140);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(86, 31);
+            this.mcd_remainqty_label.TabIndex = 166;
+            this.mcd_remainqty_label.Text = "剩余数";
+            // 
+            // mcd_okqty_label
+            // 
+            this.mcd_okqty_label.AutoSize = true;
+            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty_label.Location = new System.Drawing.Point(29, 140);
+            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty_label.Name = "mcd_okqty_label";
+            this.mcd_okqty_label.Size = new System.Drawing.Size(110, 31);
+            this.mcd_okqty_label.TabIndex = 165;
+            this.mcd_okqty_label.Text = "打印计数";
+            // 
+            // pr_code_label
+            // 
+            this.pr_code_label.AutoSize = true;
+            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_code_label.Location = new System.Drawing.Point(358, 67);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Name = "pr_code_label";
+            this.pr_code_label.Size = new System.Drawing.Size(110, 31);
+            this.pr_code_label.TabIndex = 164;
+            this.pr_code_label.Text = "产品编号";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(29, 67);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
+            this.ms_makecode_label.TabIndex = 163;
+            this.ms_makecode_label.Text = "归属工单";
+            // 
             // Printer
             // Printer
             // 
             // 
             this.Printer.Location = new System.Drawing.Point(1213, 65);
             this.Printer.Location = new System.Drawing.Point(1213, 65);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Printer.Margin = new System.Windows.Forms.Padding(6);
             this.Printer.Name = "Printer";
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(228, 37);
             this.Printer.Size = new System.Drawing.Size(228, 37);
             this.Printer.TabIndex = 178;
             this.Printer.TabIndex = 178;
@@ -112,15 +191,16 @@
             this.mcd_okqty.TabIndex = 176;
             this.mcd_okqty.TabIndex = 176;
             this.mcd_okqty.Text = "0";
             this.mcd_okqty.Text = "0";
             // 
             // 
-            // pr_code
+            // ma_prodcode
             // 
             // 
-            this.pr_code.AutoSize = true;
-            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(501, 67);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 31);
-            this.pr_code.TabIndex = 175;
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(501, 67);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.ma_prodcode.TabIndex = 175;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
             // 
             // pr_detail
             // pr_detail
             // 
             // 
@@ -132,16 +212,6 @@
             this.pr_detail.Size = new System.Drawing.Size(0, 31);
             this.pr_detail.Size = new System.Drawing.Size(0, 31);
             this.pr_detail.TabIndex = 174;
             this.pr_detail.TabIndex = 174;
             // 
             // 
-            // ms_makecode
-            // 
-            this.ms_makecode.AutoSize = true;
-            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(170, 67);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
-            this.ms_makecode.TabIndex = 173;
-            // 
             // PrintNum
             // PrintNum
             // 
             // 
             this.PrintNum.AllPower = null;
             this.PrintNum.AllPower = null;
@@ -160,30 +230,6 @@
             this.PrintNum.TabIndex = 172;
             this.PrintNum.TabIndex = 172;
             this.PrintNum.Text = "1";
             this.PrintNum.Text = "1";
             // 
             // 
-            // pr_detail_label
-            // 
-            this.pr_detail_label.AutoSize = true;
-            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(686, 67);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
-            this.pr_detail_label.TabIndex = 171;
-            this.pr_detail_label.Text = "产品名称";
-            // 
-            // sncode_label
-            // 
-            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.sncode_label.AutoSize = true;
-            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(29, 678);
-            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(86, 31);
-            this.sncode_label.TabIndex = 170;
-            this.sncode_label.Text = "序列号";
-            // 
             // sncode
             // sncode
             // 
             // 
             this.sncode.AllPower = "ifall";
             this.sncode.AllPower = "ifall";
@@ -201,6 +247,7 @@
             this.sncode.Str2 = null;
             this.sncode.Str2 = null;
             this.sncode.TabIndex = 169;
             this.sncode.TabIndex = 169;
             this.sncode.Tag = "ifwrite";
             this.sncode.Tag = "ifwrite";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
             // 
             // OperateResult
             // OperateResult
             // 
             // 
@@ -212,75 +259,30 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             this.OperateResult.Text = "";
             // 
             // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(686, 140);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(110, 31);
-            this.label4.TabIndex = 167;
-            this.label4.Text = "打印张数";
-            // 
-            // mcd_remainqty_label
-            // 
-            this.mcd_remainqty_label.AutoSize = true;
-            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(358, 140);
-            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(86, 31);
-            this.mcd_remainqty_label.TabIndex = 166;
-            this.mcd_remainqty_label.Text = "剩余数";
-            // 
-            // mcd_okqty_label
-            // 
-            this.mcd_okqty_label.AutoSize = true;
-            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(29, 140);
-            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(110, 31);
-            this.mcd_okqty_label.TabIndex = 165;
-            this.mcd_okqty_label.Text = "打印计数";
+            // ma_code
             // 
             // 
-            // pr_code_label
-            // 
-            this.pr_code_label.AutoSize = true;
-            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(358, 67);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(110, 31);
-            this.pr_code_label.TabIndex = 164;
-            this.pr_code_label.Text = "产品编号";
-            // 
-            // ms_makecode_label
-            // 
-            this.ms_makecode_label.AutoSize = true;
-            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(29, 67);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
-            this.ms_makecode_label.TabIndex = 163;
-            this.ms_makecode_label.Text = "归属工单";
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_code.Location = new System.Drawing.Point(157, 67);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 31);
+            this.ma_code.TabIndex = 182;
             // 
             // 
             // Make_FuselageLabelPrint
             // Make_FuselageLabelPrint
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1488, 764);
+            this.AutoSize = true;
+            this.ClientSize = new System.Drawing.Size(1468, 731);
+            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.Printer);
             this.Controls.Add(this.Printer);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.mcd_okqty);
             this.Controls.Add(this.mcd_okqty);
-            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail);
-            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.sncode_label);
             this.Controls.Add(this.sncode_label);
@@ -313,9 +315,8 @@
         private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
         private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
         private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
         private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
         private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
         private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
-        private CustomControl.ValueLabel.ValueLabel pr_code;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
-        private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label sncode_label;
         private System.Windows.Forms.Label sncode_label;
@@ -326,5 +327,6 @@
         private System.Windows.Forms.Label mcd_okqty_label;
         private System.Windows.Forms.Label mcd_okqty_label;
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label ma_code;
     }
     }
 }
 }

+ 219 - 153
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -20,6 +20,7 @@ namespace UAS_MES.Make
         DataTable ListA = new DataTable();
         DataTable ListA = new DataTable();
         //保存make left join makecraftdetail left join product的数据
         //保存make left join makecraftdetail left join product的数据
         // DataTable ListB;
         // DataTable ListB;
+        DataTable mapB;
         //保存ProductLabel数据
         //保存ProductLabel数据
         DataTable ListC;
         DataTable ListC;
         //工序编号
         //工序编号
@@ -29,7 +30,7 @@ namespace UAS_MES.Make
         //工艺路线编号
         //工艺路线编号
         string craftcode;
         string craftcode;
         //制造单号
         //制造单号
-        string ma_code;
+        string make_code;
         //当前工单的序列号
         //当前工单的序列号
         string sn_code;
         string sn_code;
         //当前提示的索引
         //当前提示的索引
@@ -38,6 +39,8 @@ namespace UAS_MES.Make
         string Step = "Loading";
         string Step = "Loading";
 
 
         ApplicationClass lbl;
         ApplicationClass lbl;
+        
+        string oErrorMessage = "";
 
 
         public Make_FuselageLabelPrint()
         public Make_FuselageLabelPrint()
         {
         {
@@ -54,164 +57,237 @@ namespace UAS_MES.Make
 
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
         {
         {
+            //按下enter键
             if (e.KeyCode == Keys.Enter)
             if (e.KeyCode == Keys.Enter)
             {
             {
+                //如果输入的值为空的话,提示不能为空
                 if (sncode.Text == "")
                 if (sncode.Text == "")
                 {
                 {
                     OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
                     OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
                     return;
                     return;
                 }
                 }
-                //通过输入指定字符来设置当前执行的步骤
-                if (sncode.Text == "L")
-                {
-                    Step = " ";
-                    OperateResult.AppendText(">>开始执行上料工序\n", Color.Green);
-                    sncode.Text = "";
-                    return;
-                }
-                else if (sncode.Text == "R")
-                {
-                    Step = "UnLoading";
-                    OperateResult.AppendText(">>开始执行下料工序\n", Color.Green);
-                    sncode.Text = "";
-                    return;
-                }
-                //判断如果该序列号的归属工单和之前查询的是一致的话,就不进行重复数据的查询
-                ma_code = dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode='" + sncode.Text + "'").ToString();
-                if (ms_makecode.Text != ma_code || ma_code == "")
-                {
-                    //ma_code不为空的时候表示不是第一次加载,提示用户切换工单
-                    if (ma_code != "" && ms_makecode.Text != "")
+                //定义临时变量
+                string oMakeCode = "";
+                string oMsId = "";
+                //调用公共方法CheckStepSNAndMacode判断工序是否正确
+                if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text,User.UserCode,out oMakeCode,out oMsId, out oErrorMessage)) {
+                    //IF (如果ma_code 为空)THEN
+                    if (ma_code.Text == "")
                     {
                     {
-                        OperateResult.AppendText(">>切换工单至工单号" + ma_code + "\n", Color.Red);
-                    }
-                    sql.Clear();
-                    sql.Append("select ma_code,mcd_okqty,ma_qty,ma_qty-mcd_inqty as mcd_remainqty,pr_detail,pr_code ");
-                    sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
-                    sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode=:sncode");
-                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", sncode.Text);
-                    if (dt.Rows.Count > 0)
-                    {
-                        BaseUtil.SetFormValue(this.Controls, dt);
-                        sn_code = sncode.Text;
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(">>序列号" + sncode.Text + "不存在\n", Color.Red);
-                        return;
-                    }
+                        //获取工单的其他信息
+                        sql.Clear();
+                        sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode,pr_detail,");
+                        sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+                        sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='"+oMakeCode+"' and mcd_stepcode='"+User.CurrentStepCode+"'");
+                        mapB = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                        //将工单的其他信息赋值到对应的控件
+                        if (mapB.Rows.Count>0) {
+                            BaseUtil.SetFormValue(this.Controls,mapB);
+                        }
 
 
-                    //判断当前的执行状态 ,Loading表示执行上料操作,UnLoading表示执行下料操作
-                    if (Step == "Loading")
-                    {
+                        //获取对应 产品的机身标的打印模板
                         sql.Clear();
                         sql.Clear();
-                        sql.Append("select ma_code,ma_craftcode,ms_nextstepcode, ms_status,ms_stepcode from makeserial ");
-                        sql.Append("left join make on ma_code=ms_makecode where ms_sncode=:sncode or ms_psn=:sncode");
-                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", sncode.Text, sncode.Text);
-                        //记录一些变量
-                        stepcode = dt.Rows[0]["ms_stepcode"].ToString();
-                        nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
-                        craftcode = dt.Rows[0]["ma_craftcode"].ToString();
-                        string ErrorMessage;
-                        bool ifFirst;
-                        //检测当前序列号和岗位资源是否对应
-                        if (LogicHandler.CheckCurrentStepAndIfFirst(sncode.Text, ms_makecode.Text, User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
+                        sql.Append("select * from productlabel where pl_prodcode='"+ma_prodcode.Text+"' and PL_LABELTYPE='彩盒标',");
+                        ListC = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                        //查询没有结果就提示
+                        if (ListC.Rows.Count==0) {
+                            OperateResult.AppendText(">>该序列号对应的产品未维护机身标标签模板\n", Color.Red);
+                        }
+
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
                         {
                         {
-                            //判断当前工序是否是上料工序cd_ifinput或者是否是测试工序cd_iftest
-                            sql.Clear();
-                            sql.Append("select cr_code,cd_stepcode,cd_ifinput,cd_iftest from makeserial left join  craft on ms_craftcode=cr_code left join craftdetail on cd_crid=cr_id and ");
-                            sql.Append("cd_stepcode=ms_nextstepcode where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ms_makecode.Text + "'");
-                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            if (dt.Rows.Count > 0)
+                            //判断打印数量是否合理
+                            //合理
+                            if (int.Parse(PrintNum.Text) <= int.Parse(mcd_remainqty.Text) && int.Parse(PrintNum.Text) > 0)
                             {
                             {
-                                //如果是上料工序
-                                if (dt.Rows[0]["cd_ifinput"].ToString() != "0")
+                                //按照打印张数打印
+                                Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text));
+                                //提示用户打印成功
+                                OperateResult.AppendText(">>打印成功\n", Color.Green);
+                                //更新打印的数据
+                                LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "机身标打印", User.UserSourceCode, User.UserName, "机身标打印成功", out oErrorMessage);
+                                //清空输入框的值,聚焦
+                                sncode.Text = "";
+                                sncode.Focus();
+                                //刷新打印数量和剩余数量
+                                mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - int.Parse(PrintNum.Text) + "";
+                                mcd_okqty.Text = int.Parse(PrintNum.Text)+"";
+
+                                //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
+                                if (int.Parse(mcd_remainqty.Text) == 0)
                                 {
                                 {
-                                    // 查询没有结果,提示该上料工序没有需要上料的数据,请先维护对应的数据
-                                    sql.Clear();
-                                    sql.Append("select sp_id,sp_description,sp_soncode,pr_detail,pr_spec,sp_repcode,pr_id,sp_type,");
-                                    sql.Append("'未采集' sp_ifpick ,sp_prefix,sp_length,sp_regex,sp_regex,sp_ifforsn from stepproduct ");
-                                    sql.Append("left join product on pr_code=sp_soncode  where sp_craftcode='" + dt.Rows[0]["cd_ifinput"].ToString() + "' and sp_stepcode='" + dt.Rows[0]["cd_stepcode"].ToString() + "' ");
-                                    sql.Append("And sp_mothercode='" + pr_code.Text + "' and ((sp_type='物料' and pr_tracekind<>2)or sp_type<>'物料') ");
-                                    sql.Append("order by SP_DETNO asc");
-                                    ListA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                    //获取对应 产品的机身标的打印模板
-                                    if (ListA.Rows.Count > 0)
-                                    {
-                                        OperateResult.AppendText(">>请采集" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n", Color.Green);
-                                    }
-                                    //未查询到数据时标识是测试工序
-                                    else
-                                    {
-                                        DoTestProcedure();
-                                    }
+                                    BaseUtil.CleanForm(this);
+                                    OperateResult.AppendText(">>工单:"+ma_code.Text+"打印完成,>>请输入SN\n", Color.Green);
                                 }
                                 }
-                                //同上,如果,iftest不等于0也进入测试工序
-                                else if (dt.Rows[0]["cd_iftest"].ToString() != "0")
-                                {
-                                    DoTestProcedure();
+                                //剩余数量不为0
+                                else {
+                                    //提示用户“>>请输入SN”
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Green);
                                 }
                                 }
                             }
                             }
+                            //打印数量不合理
+                            else
+                            {
+                                OperateResult.AppendText(">>打印数量不合理\n", Color.Red);
+                            }
                         }
                         }
-                        else
-                        {
-                            Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text);
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                        }
-                    }
-                    //如果执行的是下料操作
-                    else if (Step == "UnLoading")
-                    {
-                        string ErrorMessage1 = "";
-                        if (LogicHandler.SetMaterialDown(sn_code, sncode.Text, User.CurrentStepCode, User.UserName, out ErrorMessage1))
-                        {
-                            OperateResult.AppendText(">>条码" + sncode.Text + "下料成功\n", Color.Green);
-                        }
-                        else
-                        {
-                            OperateResult.AppendText(">>" + ErrorMessage1 + "\n", Color.Red);
+                        //标签为空
+                        else {
+                            OperateResult.AppendText(">>无可用标签\n", Color.Red);
                         }
                         }
                     }
                     }
                 }
                 }
-                else
-                {
-                    //如果ListA中没有数据执行的是测试工序
-                    if (ListA.Rows.Count == 0)
-                    {
-                        DoTestProcedure();
-                    }
-                    //存在数据执行的是上料采集
-                    else
-                    {
-                        //如果当前的索引和长度相等则表示采集完成
-                        if (RemainIndex == ListA.Rows.Count - 1)
-                        {
-                            OperateResult.AppendText(">>序列号对应的工单已经采集完成\n", Color.Green);
-                            sn_code = "";
-                            return;
-                        }
-                        string ErrorMessage;
-                        //获取上料需要传递的参数,sp_soncode,sp_id
-                        string soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
-                        string sonID = ListA.Rows[RemainIndex]["sp_id"].ToString();
-                        //执行上料
-                        if (LogicHandler.SetMaterialUp(sn_code, ms_makecode.Text, sncode.Text, soncode, User.UserSourceCode, User.UserName, sonID, out ErrorMessage))
-                        {
-                            RemainIndex = RemainIndex + 1;
-                            OperateResult.AppendText(">>请采集物料编号为" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n", Color.Green);
-                        }
-                        else
-                        {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                        }
-                    }
+                else {
+                    OperateResult.AppendText(">>"+oErrorMessage+"\n", Color.Red);
                 }
                 }
-            }
-        }
 
 
-        private void 标签打印_SizeChanged(object sender, EventArgs e)
-        {
-            asc.controlAutoSize(this);
+                //    //通过输入指定字符来设置当前执行的步骤
+                //    if (sncode.Text == "L")
+                //    {
+                //        Step = " ";
+                //        OperateResult.AppendText(">>开始执行上料工序\n", Color.Green);
+                //        sncode.Text = "";
+                //        return;
+                //    }
+                //    else if (sncode.Text == "R")
+                //    {
+                //        Step = "UnLoading";
+                //        OperateResult.AppendText(">>开始执行下料工序\n", Color.Green);
+                //        sncode.Text = "";
+                //        return;
+                //    }
+                //    //判断如果该序列号的归属工单和之前查询的是一致的话,就不进行重复数据的查询
+                //    ma_code = dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode='" + sncode.Text + "'").ToString();
+                //    if (ms_makecode.Text != ma_code || ma_code == "")
+                //    {
+                //        //ma_code不为空的时候表示不是第一次加载,提示用户切换工单
+                //        if (ma_code != "" && ms_makecode.Text != "")
+                //        {
+                //            OperateResult.AppendText(">>切换工单至工单号" + ma_code + "\n", Color.Red);
+                //        }
+                //        sql.Clear();
+                //        sql.Append("select ma_code,mcd_okqty,ma_qty,ma_qty-mcd_inqty as mcd_remainqty,pr_detail,pr_code ");
+                //        sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
+                //        sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode=:sncode");
+                //        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", sncode.Text);
+                //        if (dt.Rows.Count > 0)
+                //        {
+                //            BaseUtil.SetFormValue(this.Controls, dt);
+                //            sn_code = sncode.Text;
+                //        }
+                //        else
+                //        {
+                //            OperateResult.AppendText(">>序列号" + sncode.Text + "不存在\n", Color.Red);
+                //            return;
+                //        }
+
+                //        //判断当前的执行状态 ,Loading表示执行上料操作,UnLoading表示执行下料操作
+                //        if (Step == "Loading")
+                //        {
+                //            sql.Clear();
+                //            sql.Append("select ma_code,ma_craftcode,ms_nextstepcode, ms_status,ms_stepcode from makeserial ");
+                //            sql.Append("left join make on ma_code=ms_makecode where ms_sncode=:sncode or ms_psn=:sncode");
+                //            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select", sncode.Text, sncode.Text);
+                //            //记录一些变量
+                //            stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                //            nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                //            craftcode = dt.Rows[0]["ma_craftcode"].ToString();
+                //            string ErrorMessage;
+                //            bool ifFirst;
+                //            //检测当前序列号和岗位资源是否对应
+                //            if (LogicHandler.CheckCurrentStepAndIfFirst(sncode.Text, ms_makecode.Text, User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
+                //            {
+                //                //判断当前工序是否是上料工序cd_ifinput或者是否是测试工序cd_iftest
+                //                sql.Clear();
+                //                sql.Append("select cr_code,cd_stepcode,cd_ifinput,cd_iftest from makeserial left join  craft on ms_craftcode=cr_code left join craftdetail on cd_crid=cr_id and ");
+                //                sql.Append("cd_stepcode=ms_nextstepcode where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ms_makecode.Text + "'");
+                //                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                //                if (dt.Rows.Count > 0)
+                //                {
+                //                    //如果是上料工序
+                //                    if (dt.Rows[0]["cd_ifinput"].ToString() != "0")
+                //                    {
+                //                        // 查询没有结果,提示该上料工序没有需要上料的数据,请先维护对应的数据
+                //                        sql.Clear();
+                //                        sql.Append("select sp_id,sp_description,sp_soncode,pr_detail,pr_spec,sp_repcode,pr_id,sp_type,");
+                //                        sql.Append("'未采集' sp_ifpick ,sp_prefix,sp_length,sp_regex,sp_regex,sp_ifforsn from stepproduct ");
+                //                        sql.Append("left join product on pr_code=sp_soncode  where sp_craftcode='" + dt.Rows[0]["cd_ifinput"].ToString() + "' and sp_stepcode='" + dt.Rows[0]["cd_stepcode"].ToString() + "' ");
+                //                        sql.Append("And sp_mothercode='" + pr_code.Text + "' and ((sp_type='物料' and pr_tracekind<>2)or sp_type<>'物料') ");
+                //                        sql.Append("order by SP_DETNO asc");
+                //                        ListA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                //                        //获取对应 产品的机身标的打印模板
+                //                        if (ListA.Rows.Count > 0)
+                //                        {
+                //                            OperateResult.AppendText(">>请采集" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n", Color.Green);
+                //                        }
+                //                        //未查询到数据时标识是测试工序
+                //                        else
+                //                        {
+                //                            DoTestProcedure();
+                //                        }
+                //                    }
+                //                    //同上,如果,iftest不等于0也进入测试工序
+                //                    else if (dt.Rows[0]["cd_iftest"].ToString() != "0")
+                //                    {
+                //                        DoTestProcedure();
+                //                    }
+                //                }
+                //            }
+                //            else
+                //            {
+                //                Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text);
+                //                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                //            }
+                //        }
+                //        //如果执行的是下料操作
+                //        else if (Step == "UnLoading")
+                //        {
+                //            string ErrorMessage1 = "";
+                //            if (LogicHandler.SetMaterialDown(sn_code, sncode.Text, User.CurrentStepCode, User.UserName, out ErrorMessage1))
+                //            {
+                //                OperateResult.AppendText(">>条码" + sncode.Text + "下料成功\n", Color.Green);
+                //            }
+                //            else
+                //            {
+                //                OperateResult.AppendText(">>" + ErrorMessage1 + "\n", Color.Red);
+                //            }
+                //        }
+                //    }
+                //    else
+                //    {
+                //        //如果ListA中没有数据执行的是测试工序
+                //        if (ListA.Rows.Count == 0)
+                //        {
+                //            DoTestProcedure();
+                //        }
+                //        //存在数据执行的是上料采集
+                //        else
+                //        {
+                //            //如果当前的索引和长度相等则表示采集完成
+                //            if (RemainIndex == ListA.Rows.Count - 1)
+                //            {
+                //                OperateResult.AppendText(">>序列号对应的工单已经采集完成\n", Color.Green);
+                //                sn_code = "";
+                //                return;
+                //            }
+                //            string ErrorMessage;
+                //            //获取上料需要传递的参数,sp_soncode,sp_id
+                //            string soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
+                //            string sonID = ListA.Rows[RemainIndex]["sp_id"].ToString();
+                //            //执行上料
+                //            if (LogicHandler.SetMaterialUp(sn_code, ms_makecode.Text, sncode.Text, soncode, User.UserSourceCode, User.UserName, sonID, out ErrorMessage))
+                //            {
+                //                RemainIndex = RemainIndex + 1;
+                //                OperateResult.AppendText(">>请采集物料编号为" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n", Color.Green);
+                //            }
+                //            else
+                //            {
+                //                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                //            }
+                //        }
+                //    }
+            }
         }
         }
 
 
         //执行测试工序
         //执行测试工序
@@ -220,42 +296,37 @@ namespace UAS_MES.Make
             //局部变量ErrorMessage1
             //局部变量ErrorMessage1
             string ErrorMessage1;
             string ErrorMessage1;
             //由于打印驱动暂时不可用,暂时注释打印方法
             //由于打印驱动暂时不可用,暂时注释打印方法
-            if (LogicHandler.SetCollectionFinish(sncode.Text, ms_makecode.Text, User.UserName, User.UserSourceCode, out ErrorMessage1))
+            if (LogicHandler.SetCollectionFinish(sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, out ErrorMessage1))
             {
             {
                 sncode.Text = "";
                 sncode.Text = "";
                 //如果值为空默认设置为0
                 //如果值为空默认设置为0
                 if (int.Parse(mcd_remainqty.Text) > 0)
                 if (int.Parse(mcd_remainqty.Text) > 0)
                 {
                 {
-                    dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty+1,mcd_inqty=mcd_inqty+1", "mcd_macode='" + ms_makecode.Text + "'");
+                    dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty+1,mcd_inqty=mcd_inqty+1", "mcd_macode='" + ma_code.Text + "'");
                     sql.Clear();
                     sql.Clear();
                     sql.Append("select mcd_okqty,ma_qty-mcd_inqty mcd_remainqty from makecraftdetail left join make on ");
                     sql.Append("select mcd_okqty,ma_qty-mcd_inqty mcd_remainqty from makecraftdetail left join make on ");
-                    sql.Append("ma_code=mcd_macode where mcd_macode='" + ms_makecode.Text + "'");
+                    sql.Append("ma_code=mcd_macode where mcd_macode='" + ma_code.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.SetFormValue(this.Controls, dt);
                     BaseUtil.SetFormValue(this.Controls, dt);
                     if (mcd_remainqty.Text == "0")
                     if (mcd_remainqty.Text == "0")
                     {
                     {
-                        OperateResult.AppendText(">>工单" + ms_makecode.Text + "采集完成\n", Color.Green);
+                        OperateResult.AppendText(">>工单" + ma_code.Text + "采集完成\n", Color.Green);
                         BaseUtil.CleanForm(this);
                         BaseUtil.CleanForm(this);
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
                     BaseUtil.CleanForm(this);
                     BaseUtil.CleanForm(this);
-                    OperateResult.AppendText(">>该序列号所属工单" + ms_makecode.Text + "已全部采集完成\n", Color.Green);
+                    OperateResult.AppendText(">>该序列号所属工单" + ma_code.Text + "已全部采集完成\n", Color.Green);
                 }
                 }
             }
             }
             else
             else
                 MessageBox.Show(ErrorMessage1);
                 MessageBox.Show(ErrorMessage1);
         }
         }
 
 
-        private void 标签打印_Activated(object sender, EventArgs e)
-        {
-            sncode.Focus();
-        }
-
         private void pr_code_TextChanged(object sender, EventArgs e)
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
         {
-            dt = (DataTable)dh.ExecuteSql("select pl_labelname,pl_labelcode from productlabel where pl_prodcode='" + pr_code.Text + "'", "select");
+            dt = (DataTable)dh.ExecuteSql("select pl_labelname,pl_labelcode from productlabel where pl_prodcode='" + ma_prodcode.Text + "'", "select");
             PrintLabel.DataSource = dt;
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "pl_labelname";
             PrintLabel.DisplayMember = "pl_labelname";
             PrintLabel.ValueMember = "pl_labelcode";
             PrintLabel.ValueMember = "pl_labelcode";
@@ -266,11 +337,6 @@ namespace UAS_MES.Make
             }
             }
         }
         }
 
 
-        private void 标签打印_FormClosing(object sender, FormClosingEventArgs e)
-        {
-            lbl.Quit();
-        }
-
         private void Make_FuselageLabelPrint_Activated(object sender, EventArgs e)
         private void Make_FuselageLabelPrint_Activated(object sender, EventArgs e)
         {
         {
             sncode.Focus();
             sncode.Focus();

+ 7 - 4
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -103,7 +103,7 @@ namespace UAS_MES.Make
                     outboxcode.Focus();
                     outboxcode.Focus();
                 }
                 }
                 else
                 else
-                    OperateResult.AppendText(">>" + palletcode_label.Text + palletcode.Text + "不存在\n", Color.Red);
+                    OperateResult.AppendText(">>" + palletcode_label.Text + palletcode.Text + "不存在\n", Color.Red, palletcode);
             }
             }
         }
         }
 
 
@@ -126,7 +126,7 @@ namespace UAS_MES.Make
                 BaseUtil.SetFormValue(Controls, dt);
                 BaseUtil.SetFormValue(Controls, dt);
                 sncode = dh.getFieldDataByCondition("makeserial left join package on ms_prodcode=pa_prodcode", "ms_sncode", "pa_outboxcode='" + outboxcode.Text + "'").ToString();
                 sncode = dh.getFieldDataByCondition("makeserial left join package on ms_prodcode=pa_prodcode", "ms_sncode", "pa_outboxcode='" + outboxcode.Text + "'").ToString();
                 //检测当前岗位资源和对应工序是否一致
                 //检测当前岗位资源和对应工序是否一致
-                if (LogicHandler.CheckCurrentStepAndIfFirst(sncode, pa_makecode.Text,  User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
+                if (LogicHandler.CheckCurrentStepAndIfFirst(sncode, pa_makecode.Text, User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
                 {
                 {
                     if (dt.Rows.Count > 0)
                     if (dt.Rows.Count > 0)
                     {
                     {
@@ -161,13 +161,16 @@ namespace UAS_MES.Make
                         }
                         }
                         //已装满提示用户已装满
                         //已装满提示用户已装满
                         else
                         else
-                            OperateResult.AppendText(">>" + palletcode.Text + "已装满\n", Color.Red);
+                            OperateResult.AppendText(">>" + palletcode.Text + "已装满\n", Color.Red,palletcode);
                     }
                     }
                     else
                     else
-                        OperateResult.AppendText(">>" + palletcode_label.Text + palletcode.Text + "不存在\n", Color.Red);
+                        OperateResult.AppendText(">>" + palletcode_label.Text + palletcode.Text + "不存在\n", Color.Red,palletcode);
                 }
                 }
                 else
                 else
+                {
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                }
+                outboxcode.Text = "";
             }
             }
         }
         }
 
 

+ 6 - 2
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -167,13 +167,17 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Clear();
             sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,bc_name,bg_name,");
             sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,bc_name,bg_name,");
             sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup ");
             sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup ");
-            sql.Append("on bg_code=mb_bgcode where mb_sncode='" + GetSNCode.Text + "' and mb_makecode='" + macode + "'");
+            sql.Append("on bg_code=mb_bgcode where mb_sncode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' and mb_makecode='" + macode + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             for (int i = 0; i < dt.Rows.Count; i++)
             for (int i = 0; i < dt.Rows.Count; i++)
             {
             {
                 //添加根节点
                 //添加根节点
                 TreeNode tnode_0 = new TreeNode();
                 TreeNode tnode_0 = new TreeNode();
-                tnode_0.Text = dt.Rows[i]["bg_name"].ToString() + ":" + dt.Rows[i]["bc_name"].ToString();
+                string bg_name = dt.Rows[i]["bg_name"].ToString();
+                string bc_name = dt.Rows[i]["bc_name"].ToString();
+                string mb_badcode = dt.Rows[i]["mb_badcode"].ToString();
+                string mb_bgcode = dt.Rows[i]["mb_bgcode"].ToString();
+                tnode_0.Text = (bg_name == "" ? mb_bgcode : bg_name) + ":" + (bc_name == "" ? mb_bgcode : bc_name);
                 tnode_0.Name = dt.Rows[i]["mb_bgcode"].ToString();
                 tnode_0.Name = dt.Rows[i]["mb_bgcode"].ToString();
                 //作为Dictionary的主标识
                 //作为Dictionary的主标识
                 string mb_id = dt.Rows[i]["mb_id"].ToString();
                 string mb_id = dt.Rows[i]["mb_id"].ToString();

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -161,6 +161,7 @@
             this.GoodProduct.TabStop = true;
             this.GoodProduct.TabStop = true;
             this.GoodProduct.Text = "良品";
             this.GoodProduct.Text = "良品";
             this.GoodProduct.UseVisualStyleBackColor = true;
             this.GoodProduct.UseVisualStyleBackColor = true;
+            this.GoodProduct.CheckedChanged += new System.EventHandler(this.GoodProduct_CheckedChanged);
             // 
             // 
             // Reject
             // Reject
             // 
             // 

+ 64 - 13
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -164,10 +164,22 @@ namespace UAS_MES.Make
         {
         {
             if (e.KeyCode == Keys.Enter)
             if (e.KeyCode == Keys.Enter)
             {
             {
-                bool ifFirst;
+                WaitRejectList.Items.Clear();
+                ChoosedRejectList.Items.Clear();
+                WaitList.Clear();
+                ChoosedList.Clear();
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
                 {
-                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                    //判断界面工单是否为空时的序列号是否自动归属工单
+                    if (!LogicHandler.GetMakeInfo(ms_sncode.Text, out oMakeCode, out ErrorMessage))
+                    {
+                        if (ma_code.Text == "")
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                    }
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? oMakeCode : ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                     {
                     {
                         dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                         dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                         if (dt.Rows.Count > 0)
                         if (dt.Rows.Count > 0)
@@ -187,7 +199,6 @@ namespace UAS_MES.Make
                                 return;
                                 return;
                             }
                             }
                         }
                         }
-                        bc_code.Focus();
                         SetCollectResult();
                         SetCollectResult();
                     }
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
@@ -225,7 +236,7 @@ namespace UAS_MES.Make
         private void LoadBadCodeListView()
         private void LoadBadCodeListView()
         {
         {
             sql.Clear();
             sql.Clear();
-            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,mb_badremark from makebad  ");
+            sql.Append("select nvl(bg_code,mb_bgcode)||':'||nvl(bg_name,mb_badcode) bg_code,bc_code,mb_badremark from makebad  ");
             sql.Append("left join badgroup on mb_bgcode=bg_code left join badcode on mb_badcode=bc_code ");
             sql.Append("left join badgroup on mb_bgcode=bg_code left join badcode on mb_badcode=bc_code ");
             sql.Append(" where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'");
             sql.Append(" where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -245,9 +256,11 @@ namespace UAS_MES.Make
                 }
                 }
             }
             }
             ChoosedRejectList.EndUpdate();
             ChoosedRejectList.EndUpdate();
-            sql.Clear();
             object bg_code = bc_groupcode.SelectedValue;
             object bg_code = bc_groupcode.SelectedValue;
-            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null");
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_note ");
+            sql.Append("from badcode left join badgroup on bc_groupcode=bg_code  where ");
+            sql.Append("bc_groupcode='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //往listview中添加数据
             //往listview中添加数据
             WaitRejectList.Items.Clear();
             WaitRejectList.Items.Clear();
@@ -277,8 +290,8 @@ namespace UAS_MES.Make
             //如果勾选的是不良品
             //如果勾选的是不良品
             if (Reject.Checked)
             if (Reject.Checked)
             {
             {
-                //加载不良信息
-                LoadBadGroupData();
+                LoadBadCodeListView();
+                bc_code.Focus();
                 //勾选了自动产生代码
                 //勾选了自动产生代码
                 if (AutoBadCode.Checked)
                 if (AutoBadCode.Checked)
                     Save_Click(new object(), new EventArgs());
                     Save_Click(new object(), new EventArgs());
@@ -305,7 +318,7 @@ namespace UAS_MES.Make
             string RejectRecordNum = dh.getFieldDataByCondition("makeBad", "count(1) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status not in (1,-1)").ToString();
             string RejectRecordNum = dh.getFieldDataByCondition("makeBad", "count(1) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status not in (1,-1)").ToString();
             //存在不良记录
             //存在不良记录
             if (int.Parse(RejectRecordNum) > 0)
             if (int.Parse(RejectRecordNum) > 0)
-                OperateResult.AppendText(">>" + ms_sncode.Text + "已经判为不良品,不允许修改!\n", Color.Red);
+                OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.Red);
             else
             else
             {
             {
                 //良品信息采集
                 //良品信息采集
@@ -327,11 +340,33 @@ namespace UAS_MES.Make
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
             else if (Reject.Checked)
             else if (Reject.Checked)
             {
             {
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                {
+                    //判断界面工单是否为空时的序列号是否自动归属工单
+                    if (!LogicHandler.GetMakeInfo(ms_sncode.Text, out oMakeCode, out ErrorMessage))
+                    {
+                        if (ma_code.Text == "")
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                    }
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? oMakeCode : ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            LockMakeCode.Checked = true;
+                        }
+                    }
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                 int RejectCount = ChoosedRejectList.Items.Count;
                 int RejectCount = ChoosedRejectList.Items.Count;
                 string[] bccode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
                 string[] bccode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
                 string[] bcremark = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
                 string[] bcremark = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
                 string[] bgcode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
                 string[] bgcode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
-                string ErrorMessage = "";
                 if (AutoBadCode.Checked)
                 if (AutoBadCode.Checked)
                 {
                 {
                     string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
                     string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
@@ -392,8 +427,6 @@ namespace UAS_MES.Make
                 {
                 {
                     OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green, ms_sncode);
                     OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green, ms_sncode);
                     //清除不良信息
                     //清除不良信息
-                    bc_groupcode.DataSource = null;
-                    bc_groupcode.Text = "";
                     bc_code.Text = "";
                     bc_code.Text = "";
                     WaitRejectList.Items.Clear();
                     WaitRejectList.Items.Clear();
                     ChoosedRejectList.Items.Clear();
                     ChoosedRejectList.Items.Clear();
@@ -427,13 +460,31 @@ namespace UAS_MES.Make
                         lvi.SubItems.Add(dt.Rows[0][j].ToString());
                         lvi.SubItems.Add(dt.Rows[0][j].ToString());
                     ChoosedRejectList.Items.Add(lvi);
                     ChoosedRejectList.Items.Add(lvi);
                 }
                 }
-                else OperateResult.AppendText(">>不良代码" + bc_code.Text + "不存在\n", Color.Red, bc_code);
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
             }
             }
         }
         }
 
 
         private void ma_prodcode_TextChanged(object sender, EventArgs e)
         private void ma_prodcode_TextChanged(object sender, EventArgs e)
         {
         {
+            //加载不良信息
+            LoadBadGroupData();
             LoadCollectedNum();
             LoadCollectedNum();
         }
         }
+
+        private void GoodProduct_CheckedChanged(object sender, EventArgs e)
+        {
+            if (GoodProduct.Checked)
+            {
+                bc_code.Enabled = false;
+                WaitReject.Enabled = false;
+                ChooseedReject.Enabled = false;
+            }
+            else
+            {
+                bc_code.Enabled = true;
+                WaitReject.Enabled = true;
+                ChooseedReject.Enabled = true;
+            }
+        }
     }
     }
 }
 }

+ 2 - 2
UAS-MES/PublicMethod/LogicHandler.cs

@@ -420,6 +420,7 @@ namespace UAS_MES.PublicMethod
 
 
         public static bool CheckStepSNAndMacode(string iMakeCode, string iSource, string iSN, string iUserCode, out string oMakeCode, out string oMsID, out string oErrorMessage)
         public static bool CheckStepSNAndMacode(string iMakeCode, string iSource, string iSN, string iUserCode, out string oMakeCode, out string oMsID, out string oErrorMessage)
         {
         {
+            Console.WriteLine("iMakeCode" + iMakeCode);
             oErrorMessage = "";
             oErrorMessage = "";
             oMakeCode = "";
             oMakeCode = "";
             oMsID = "";
             oMsID = "";
@@ -650,7 +651,7 @@ namespace UAS_MES.PublicMethod
                 return true;
                 return true;
             else
             else
             {
             {
-                oErrorMessage = "当前序列号" + iSnCode + "不存在生产记录";
+                oErrorMessage = "序列号:" + iSnCode + " 未归属工单";
                 return false;
                 return false;
             }
             }
         }
         }
@@ -1105,7 +1106,6 @@ namespace UAS_MES.PublicMethod
             //之前保存的不良就不再调用
             //之前保存的不良就不再调用
             if (ms_status != "3")
             if (ms_status != "3")
                 SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
                 SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
-            //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
             return true;
             return true;
         }
         }
 
 

+ 59 - 59
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>209</ApplicationRevision>
+    <ApplicationRevision>217</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -1175,292 +1175,292 @@
   <ItemGroup>
   <ItemGroup>
     <PublishFile Include="BtSystem.Client">
     <PublishFile Include="BtSystem.Client">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Client.Reader">
     <PublishFile Include="BtSystem.Client.Reader">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Interfaces">
     <PublishFile Include="BtSystem.Interfaces">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Network">
     <PublishFile Include="BtSystem.Network">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Reprint.Support">
     <PublishFile Include="BtSystem.Reprint.Support">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Strings">
     <PublishFile Include="BtSystem.Strings">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.Support">
     <PublishFile Include="BtSystem.Support">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="BtSystem.UI">
     <PublishFile Include="BtSystem.UI">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevComponents.DotNetBar2">
     <PublishFile Include="DevComponents.DotNetBar2">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.Data.v11.1">
     <PublishFile Include="DevExpress.Data.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.Printing.v11.1.Core">
     <PublishFile Include="DevExpress.Printing.v11.1.Core">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.Utils.v11.1">
     <PublishFile Include="DevExpress.Utils.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.Xpo.v11.1">
     <PublishFile Include="DevExpress.Xpo.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraBars.v11.1">
     <PublishFile Include="DevExpress.XtraBars.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraEditors.v11.1">
     <PublishFile Include="DevExpress.XtraEditors.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraGrid.v11.1">
     <PublishFile Include="DevExpress.XtraGrid.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraLayout.v11.1">
     <PublishFile Include="DevExpress.XtraLayout.v11.1">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Interop.BarTender">
     <PublishFile Include="Interop.BarTender">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Include</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Include</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Interop.DriverAutomationLibrary">
     <PublishFile Include="Interop.DriverAutomationLibrary">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Include</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Include</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Interop.NetFwTypeLib">
     <PublishFile Include="Interop.NetFwTypeLib">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Maestro.Interface">
     <PublishFile Include="Maestro.Interface">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Maestro.Library">
     <PublishFile Include="Maestro.Library">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Framework">
     <PublishFile Include="Seagull.Framework">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Framework.Interop">
     <PublishFile Include="Seagull.Framework.Interop">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Interop">
     <PublishFile Include="Seagull.Interop">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Librarian.Core">
     <PublishFile Include="Seagull.Librarian.Core">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Security">
     <PublishFile Include="Seagull.Security">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.Security.Interop">
     <PublishFile Include="Seagull.Security.Interop">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
     <PublishFile Include="Seagull.XpoDataAccess">
     <PublishFile Include="Seagull.XpoDataAccess">
       <Visible>False</Visible>
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       <Group>
       </Group>
       </Group>
       <TargetPath>
       <TargetPath>
       </TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
       <FileType>Assembly</FileType>
     </PublishFile>
     </PublishFile>
   </ItemGroup>
   </ItemGroup>