Эх сурвалжийг харах

拆解处理新增不良代码界面修改

Hcsy 8 жил өмнө
parent
commit
7eb30e59f3

+ 32 - 12
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.Designer.cs

@@ -28,7 +28,8 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_NewBadCode));
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_NewBadCode_DE));
             this.ChoosedRejectList = new System.Windows.Forms.ListView();
             this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.bg_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@@ -56,7 +57,10 @@
             this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
+            this.Filter = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.BadInfo = new System.Windows.Forms.BindingSource(this.components);
             this.groupBoxWithBorder1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).BeginInit();
             this.SuspendLayout();
             // 
             // ChoosedRejectList
@@ -190,7 +194,7 @@
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
             this.headBar1.Name = "headBar1";
             this.headBar1.Size = new System.Drawing.Size(548, 32);
             this.headBar1.TabIndex = 98;
@@ -201,7 +205,7 @@
             // 
             this.badgroup.FormattingEnabled = true;
             this.badgroup.Location = new System.Drawing.Point(123, 134);
-            this.badgroup.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.badgroup.Margin = new System.Windows.Forms.Padding(2);
             this.badgroup.Name = "badgroup";
             this.badgroup.Size = new System.Drawing.Size(153, 20);
             this.badgroup.TabIndex = 95;
@@ -217,9 +221,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.ms_sncode_label);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.groupBoxWithBorder1.Location = new System.Drawing.Point(0, 35);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Size = new System.Drawing.Size(548, 80);
             this.groupBoxWithBorder1.TabIndex = 94;
             this.groupBoxWithBorder1.TabStop = false;
@@ -294,7 +298,7 @@
             this.Cancel.Image = null;
             this.Cancel.IsShowBorder = true;
             this.Cancel.Location = new System.Drawing.Point(289, 449);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(2);
             this.Cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("Cancel.MoveImage")));
             this.Cancel.Name = "Cancel";
             this.Cancel.NormalImage = ((System.Drawing.Image)(resources.GetObject("Cancel.NormalImage")));
@@ -313,7 +317,7 @@
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
             this.Save.Location = new System.Drawing.Point(200, 449);
-            this.Save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Save.Margin = new System.Windows.Forms.Padding(2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
@@ -344,12 +348,25 @@
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
             // 
-            // Make_NewBadCode
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(123, 167);
+            this.Filter.Margin = new System.Windows.Forms.Padding(2);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(116, 22);
+            this.Filter.TabIndex = 101;
+            this.Filter.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
+            // 
+            // Make_NewBadCode_DE
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.HighlightText;
             this.ClientSize = new System.Drawing.Size(548, 486);
+            this.Controls.Add(this.Filter);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.headBar1);
             this.Controls.Add(this.label2);
@@ -364,14 +381,15 @@
             this.Controls.Add(this.WaitReject);
             this.Controls.Add(this.WaitRejectList);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.Name = "Make_NewBadCode";
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Make_NewBadCode_DE";
             this.Tag = "ShowDialogWindow";
             this.Text = "新增不良代码";
             this.Load += new System.EventHandler(this.Make_NewBadCode_Load);
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).EndInit();
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -405,5 +423,7 @@
         private System.Windows.Forms.ColumnHeader bg_name1;
         private System.Windows.Forms.ColumnHeader bc_code1;
         private System.Windows.Forms.ColumnHeader bc_name;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private System.Windows.Forms.BindingSource BadInfo;
     }
 }

+ 31 - 0
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -209,6 +209,7 @@ namespace UAS_MES.Make
             sql.Append("select bg_code,bg_name,bc_code,bc_name,bc_note from badgroupdetail left join badgroup on bgd_bgid=bg_id ");
             sql.Append("left join badcode on bgd_badcode=bc_code where bg_code='" + ((bg_id != "" && bg_id != "System.Data.DataRowView") ? bg_id.ToString() : "") + "' and bg_code is not null ");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfo.DataSource = dt;
             //往listview中添加数据
             WaitRejectList.Items.Clear();
             WaitRejectList.BeginUpdate();
@@ -229,5 +230,35 @@ namespace UAS_MES.Make
             ReleaseCapture();
             SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
         }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfo.DataSource as DataTable).Select(" bc_name like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfo.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+                WaitRejectList.EndUpdate();
+            }
+            catch (Exception)
+            {
+
+            }
+        }
     }
 }

+ 3 - 0
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.resx

@@ -232,4 +232,7 @@
         fgAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="BadInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>