فهرست منبع

切换回维修界面时不为空自动刷新数据

章政 8 سال پیش
والد
کامیت
db296915df
4فایلهای تغییر یافته به همراه30 افزوده شده و 12 حذف شده
  1. 5 0
      UAS-MES/FunctionCode/Make/Make_Repair.cs
  2. 0 12
      UAS-MES/FunctionCode/Make/Make_Repair.resx
  3. 1 0
      UAS-MES/Main.Designer.cs
  4. 24 0
      UAS-MES/Main.cs

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -786,5 +786,10 @@ namespace UAS_MES.Make
             //设置工序的条件
             cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
         }
+
+        public void RefreshData()
+        {
+            GetSNCode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
+        }
     }
 }

+ 0 - 12
UAS-MES/FunctionCode/Make/Make_Repair.resx

@@ -129,18 +129,6 @@
   <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 1 - 0
UAS-MES/Main.Designer.cs

@@ -79,6 +79,7 @@
             this.MainTabControl.SelectedIndex = 0;
             this.MainTabControl.Size = new System.Drawing.Size(1095, 700);
             this.MainTabControl.TabIndex = 7;
+            this.MainTabControl.Selected += new System.Windows.Forms.TabControlEventHandler(this.MainTabControl_Selected);
             this.MainTabControl.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.MainTabControl_ControlRemoved);
             // 
             // inf_name_label

+ 24 - 0
UAS-MES/Main.cs

@@ -390,5 +390,29 @@ namespace UAS_MES
             Inf_db_label.Location = new Point(Inf_source.Location.X + Inf_source.Width + 45, Inf_source.Location.Y);
             Inf_db.Location = new Point(Inf_db_label.Location.X + Inf_db_label.Width + 5, Inf_db_label.Location.Y);
         }
+
+        private void MainTabControl_Selected(object sender, TabControlEventArgs e)
+        {
+            try
+            {
+                for (int i = 0; i < e.TabPage.Controls.Count; i++)
+                {
+                    if (e.TabPage.Controls[i] is Form)
+                    {
+                        if (e.TabPage.Controls[i].Name == "Make_Repair")
+                        {
+                            Make.Make_Repair repair = e.TabPage.Controls[i] as Make.Make_Repair;
+                            if (repair.Controls["GetSNCode"].Text != "")
+                            {
+                                repair.RefreshData();
+                            }
+                        }
+                    }
+                }
+            }
+            catch (Exception)
+            {
+            }
+        }
     }
 }