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

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

caosy 5 жил өмнө
parent
commit
c26f9a6025

+ 66 - 64
UAS_MES_NEW/FunctionCode/Make/Make_SMTBind.Designer.cs

@@ -44,12 +44,17 @@
             this.ma_craftcode = new System.Windows.Forms.Label();
             this.ma_craftcode = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
             this.label2 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.ProdNum = new System.Windows.Forms.NumericUpDown();
+            this.pr_pcbacount = new System.Windows.Forms.NumericUpDown();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_maincode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
@@ -64,14 +69,9 @@
             this.code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_maincode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.ProdNum)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pr_pcbacount)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // mcd_restqty_label
             // mcd_restqty_label
@@ -254,21 +254,23 @@
             this.label2.TabIndex = 200;
             this.label2.TabIndex = 200;
             this.label2.Text = "拼板数";
             this.label2.Text = "拼板数";
             // 
             // 
-            // ProdNum
+            // pr_pcbacount
             // 
             // 
-            this.ProdNum.Location = new System.Drawing.Point(695, 728);
-            this.ProdNum.Name = "ProdNum";
-            this.ProdNum.Size = new System.Drawing.Size(120, 35);
-            this.ProdNum.TabIndex = 199;
+            this.pr_pcbacount.Location = new System.Drawing.Point(695, 728);
+            this.pr_pcbacount.Name = "pr_pcbacount";
+            this.pr_pcbacount.ReadOnly = true;
+            this.pr_pcbacount.Size = new System.Drawing.Size(120, 35);
+            this.pr_pcbacount.TabIndex = 199;
             // 
             // 
             // dataGridViewTextBoxColumn1
             // dataGridViewTextBoxColumn1
             // 
             // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
             this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
             this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
             this.dataGridViewTextBoxColumn1.HeaderText = "上料料号";
             this.dataGridViewTextBoxColumn1.HeaderText = "上料料号";
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
             this.dataGridViewTextBoxColumn1.ReadOnly = true;
             this.dataGridViewTextBoxColumn1.ReadOnly = true;
             this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn1.Width = 50;
+            this.dataGridViewTextBoxColumn1.Width = 64;
             // 
             // 
             // dataGridViewTextBoxColumn2
             // dataGridViewTextBoxColumn2
             // 
             // 
@@ -310,6 +312,54 @@
             this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn5.Width = 112;
             this.dataGridViewTextBoxColumn5.Width = 112;
             // 
             // 
+            // 序号
+            // 
+            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.序号.DataPropertyName = "rownum";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 64;
+            // 
+            // sb_maincode
+            // 
+            this.sb_maincode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.sb_maincode.DataPropertyName = "sb_maincode";
+            this.sb_maincode.HeaderText = "关联条码号";
+            this.sb_maincode.Name = "sb_maincode";
+            this.sb_maincode.ReadOnly = true;
+            this.sb_maincode.Width = 175;
+            // 
+            // sb_barcode
+            // 
+            this.sb_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.sb_barcode.DataPropertyName = "sb_barcode";
+            this.sb_barcode.HeaderText = "条码号";
+            this.sb_barcode.Name = "sb_barcode";
+            this.sb_barcode.ReadOnly = true;
+            this.sb_barcode.Width = 127;
+            // 
+            // sb_prodcode
+            // 
+            this.sb_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.sb_prodcode.DataPropertyName = "sb_prodcode";
+            this.sb_prodcode.HeaderText = "产品编号";
+            this.sb_prodcode.Name = "sb_prodcode";
+            this.sb_prodcode.ReadOnly = true;
+            this.sb_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.sb_prodcode.Width = 112;
+            // 
+            // sb_indate
+            // 
+            this.sb_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.sb_indate.DataPropertyName = "sb_indate";
+            this.sb_indate.HeaderText = "录入日期";
+            this.sb_indate.Name = "sb_indate";
+            this.sb_indate.ReadOnly = true;
+            this.sb_indate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.sb_indate.Width = 112;
+            // 
             // StepCount
             // StepCount
             // 
             // 
             this.StepCount.LineCode = null;
             this.StepCount.LineCode = null;
@@ -506,61 +556,13 @@
             this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn6.Width = 300;
             this.dataGridViewTextBoxColumn6.Width = 300;
             // 
             // 
-            // 序号
-            // 
-            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.序号.DataPropertyName = "rownum";
-            this.序号.HeaderText = "序号";
-            this.序号.Name = "序号";
-            this.序号.ReadOnly = true;
-            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.序号.Width = 64;
-            // 
-            // sb_maincode
-            // 
-            this.sb_maincode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.sb_maincode.DataPropertyName = "sb_maincode";
-            this.sb_maincode.HeaderText = "关联条码号";
-            this.sb_maincode.Name = "sb_maincode";
-            this.sb_maincode.ReadOnly = true;
-            this.sb_maincode.Width = 175;
-            // 
-            // sb_barcode
-            // 
-            this.sb_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.sb_barcode.DataPropertyName = "sb_barcode";
-            this.sb_barcode.HeaderText = "条码号";
-            this.sb_barcode.Name = "sb_barcode";
-            this.sb_barcode.ReadOnly = true;
-            this.sb_barcode.Width = 127;
-            // 
-            // sb_prodcode
-            // 
-            this.sb_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.sb_prodcode.DataPropertyName = "sb_prodcode";
-            this.sb_prodcode.HeaderText = "产品编号";
-            this.sb_prodcode.Name = "sb_prodcode";
-            this.sb_prodcode.ReadOnly = true;
-            this.sb_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.sb_prodcode.Width = 112;
-            // 
-            // sb_indate
-            // 
-            this.sb_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.sb_indate.DataPropertyName = "sb_indate";
-            this.sb_indate.HeaderText = "录入日期";
-            this.sb_indate.Name = "sb_indate";
-            this.sb_indate.ReadOnly = true;
-            this.sb_indate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.sb_indate.Width = 112;
-            // 
             // Make_SMTBind
             // Make_SMTBind
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1796, 974);
             this.ClientSize = new System.Drawing.Size(1796, 974);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.ProdNum);
+            this.Controls.Add(this.pr_pcbacount);
             this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.ma_craftcode);
             this.Controls.Add(this.ma_craftcode);
@@ -597,7 +599,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.ProdNum)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pr_pcbacount)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
@@ -638,7 +640,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.NumericUpDown ProdNum;
+        private System.Windows.Forms.NumericUpDown pr_pcbacount;
         private System.Windows.Forms.DataGridViewTextBoxColumn 序号;
         private System.Windows.Forms.DataGridViewTextBoxColumn 序号;
         private System.Windows.Forms.DataGridViewTextBoxColumn sb_maincode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sb_maincode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sb_barcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sb_barcode;

+ 26 - 5
UAS_MES_NEW/FunctionCode/Make/Make_SMTBind.cs

@@ -46,10 +46,10 @@ namespace UAS_MES_NEW.Make
             ma_code.SetLockCheckBox(LockMakeCode);
             ma_code.SetLockCheckBox(LockMakeCode);
             //工单号放大镜配置
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号,pr_pcbacount # 拼版数";
             ma_code.FormName = Name;
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode", "pr_pcbacount" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DBChange;
             ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
             code.Focus();
@@ -117,11 +117,14 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText(">>条码已绑定至工单" + sb_makecode + "\n", Color.Red, code);
                                         OperateResult.AppendText(">>条码已绑定至工单" + sb_makecode + "\n", Color.Red, code);
                                         return;
                                         return;
                                     }
                                     }
-                                    sn_code.Text = dt1.Rows[0]["sb_maincode"].ToString();
                                     ma_code.Text = dt1.Rows[0]["sb_makecode"].ToString();
                                     ma_code.Text = dt1.Rows[0]["sb_makecode"].ToString();
                                     LockMakeCode.Checked = true;
                                     LockMakeCode.Checked = true;
                                     ma_code_UserControlTextChanged(sender, e);
                                     ma_code_UserControlTextChanged(sender, e);
                                     BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
                                     BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
+                                    if (dt1.Rows.Count < pr_pcbacount.Value)
+                                    {
+                                        sn_code.Text = dt1.Rows[0]["sb_maincode"].ToString();
+                                    }
                                     code.Text = "";
                                     code.Text = "";
                                 }
                                 }
                                 else
                                 else
@@ -143,6 +146,8 @@ namespace UAS_MES_NEW.Make
                                     sql.Append("'" + User.UserCode + "',sysdate,0)");
                                     sql.Append("'" + User.UserCode + "',sysdate,0)");
                                     dh.ExecuteSql(sql.GetString(), "insert");
                                     dh.ExecuteSql(sql.GetString(), "insert");
 
 
+                                    RefreshData();
+
                                     sql.Clear();
                                     sql.Clear();
                                     sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                                     sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                                     sql.Append("where sb_barcode='" + code.Text + "')");
                                     sql.Append("where sb_barcode='" + code.Text + "')");
@@ -174,12 +179,14 @@ namespace UAS_MES_NEW.Make
                                 sql.Append("'" + User.UserCode + "',sysdate,0)");
                                 sql.Append("'" + User.UserCode + "',sysdate,0)");
                                 dh.ExecuteSql(sql.GetString(), "insert");
                                 dh.ExecuteSql(sql.GetString(), "insert");
 
 
+                                RefreshData();
+
                                 sql.Clear();
                                 sql.Clear();
                                 sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                                 sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                                 sql.Append("where sb_barcode='" + code.Text + "')");
                                 sql.Append("where sb_barcode='" + code.Text + "')");
                                 dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
                                 BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
-                                if (LabelDataGridView.Rows.Count == ProdNum.Value)
+                                if (LabelDataGridView.Rows.Count == pr_pcbacount.Value)
                                 {
                                 {
                                     sn_code.Text = "";
                                     sn_code.Text = "";
                                 }
                                 }
@@ -221,13 +228,15 @@ namespace UAS_MES_NEW.Make
                     mcd_inqty.Text = "";
                     mcd_inqty.Text = "";
                     mcd_remainqty.Text = "";
                     mcd_remainqty.Text = "";
                     sql.Clear();
                     sql.Clear();
-                    sql.Append("select ma_qty,mcd_inqty,ma_qty-mcd_inqty mcd_remainqty,ma_prodcode,pr_detail ");
+                    sql.Append("select ma_qty,ma_prodcode,pr_detail,pr_pcbacount ");
                     sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join product on ma_prodcode=pr_code where ");
                     sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join product on ma_prodcode=pr_code where ");
                     sql.Append("ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                     sql.Append("ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                     DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
                     if (dt.Rows.Count > 0)
                         BaseUtil.SetFormValue(Controls, dt);
                         BaseUtil.SetFormValue(Controls, dt);
 
 
+                    RefreshData();
+
                     sql.Clear();
                     sql.Clear();
                     sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_makecode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                     sql.Append("select rownum,sb_maincode,sb_barcode,sb_prodcode,sb_makecode,sb_indate from SMTBIND where sb_maincode=(select sb_maincode from SMTBIND ");
                     sql.Append("where sb_barcode='" + code.Text + "')");
                     sql.Append("where sb_barcode='" + code.Text + "')");
@@ -236,5 +245,17 @@ namespace UAS_MES_NEW.Make
                 }
                 }
             }
             }
         }
         }
+
+        /// <summary>
+        /// 刷新采集数据
+        /// </summary>
+        private void RefreshData()
+        {
+            sql.Clear();
+            sql.Append("select count(1) mcd_inqty,max(ma_qty)-count(1) mcd_remainqty from smtbind left join make on ma_code= sb_makecode where sb_makecode='" + ma_code.Text + "' ");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+                BaseUtil.SetFormValue(Controls, dt);
+        }
     }
     }
 }
 }