瀏覽代碼

抽样数据采集修改

章政 8 年之前
父節點
當前提交
9ae8bd33b5

+ 3 - 2
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -413,6 +413,7 @@
             // 
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
             this.LockMakeCode.Location = new System.Drawing.Point(271, 48);
             this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2);
             this.LockMakeCode.Name = "LockMakeCode";
@@ -499,7 +500,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(338, 417);
+            this.ChooseedReject.Location = new System.Drawing.Point(339, 351);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 45;
@@ -509,7 +510,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(338, 353);
+            this.WaitReject.Location = new System.Drawing.Point(339, 414);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 44;

+ 52 - 47
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -56,9 +56,6 @@
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
@@ -89,9 +86,12 @@
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.or_reasoncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_description = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -409,8 +409,8 @@
             this.ChoosedDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ChoosedDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.or_id,
-            this.or_reasoncode,
-            this.oi_description});
+            this.bc_code1,
+            this.bc_name1});
             this.ChoosedDGV.Location = new System.Drawing.Point(810, 204);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
@@ -433,31 +433,10 @@
             this.WaitChooseDGV.Size = new System.Drawing.Size(268, 256);
             this.WaitChooseDGV.TabIndex = 204;
             this.WaitChooseDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.WaitChooseDGV_CellContentClick);
+            this.WaitChooseDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.WaitChooseDGV_CellValueChanged);
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             this.WaitChooseDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.WaitChooseDGV_RowHeaderMouseClick);
             // 
-            // Column3
-            // 
-            this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Column3.HeaderText = "勾选";
-            this.Column3.Name = "Column3";
-            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.Column3.Width = 60;
-            // 
-            // bg_code
-            // 
-            this.bg_code.DataPropertyName = "bg_code";
-            this.bg_code.HeaderText = "不良分组";
-            this.bg_code.Name = "bg_code";
-            this.bg_code.Width = 93;
-            // 
-            // bg_name
-            // 
-            this.bg_name.DataPropertyName = "bg_name";
-            this.bg_name.HeaderText = "分组名称";
-            this.bg_name.Name = "bg_name";
-            this.bg_name.Width = 93;
-            // 
             // ob_remark
             // 
             this.ob_remark.AllPower = null;
@@ -564,7 +543,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(750, 357);
+            this.ChooseedReject.Location = new System.Drawing.Point(750, 295);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 195;
@@ -574,7 +553,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(750, 293);
+            this.WaitReject.Location = new System.Drawing.Point(750, 354);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 194;
@@ -843,6 +822,30 @@
             this.obd_id.Name = "obd_id";
             this.obd_id.Visible = false;
             // 
+            // Column3
+            // 
+            this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Column3.HeaderText = "勾选";
+            this.Column3.Name = "Column3";
+            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column3.Width = 60;
+            // 
+            // bg_code
+            // 
+            this.bg_code.DataPropertyName = "bg_code";
+            this.bg_code.HeaderText = "不良分组";
+            this.bg_code.Name = "bg_code";
+            this.bg_code.ReadOnly = true;
+            this.bg_code.Width = 93;
+            // 
+            // bg_name
+            // 
+            this.bg_name.DataPropertyName = "bg_name";
+            this.bg_name.HeaderText = "分组名称";
+            this.bg_name.Name = "bg_name";
+            this.bg_name.ReadOnly = true;
+            this.bg_name.Width = 93;
+            // 
             // or_id
             // 
             this.or_id.DataPropertyName = "or_id";
@@ -850,19 +853,21 @@
             this.or_id.Name = "or_id";
             this.or_id.Visible = false;
             // 
-            // or_reasoncode
+            // bc_code1
             // 
-            this.or_reasoncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.or_reasoncode.DataPropertyName = "or_reasoncode";
-            this.or_reasoncode.HeaderText = "不良代码";
-            this.or_reasoncode.Name = "or_reasoncode";
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_code1.DataPropertyName = "bg_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.ReadOnly = true;
             // 
-            // oi_description
+            // bc_name1
             // 
-            this.oi_description.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.oi_description.DataPropertyName = "oi_description";
-            this.oi_description.HeaderText = "不良原因";
-            this.oi_description.Name = "oi_description";
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_name1.DataPropertyName = "bg_name";
+            this.bc_name1.HeaderText = "不良原因";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.ReadOnly = true;
             // 
             // OQC_SamplingDataCollection
             // 
@@ -916,7 +921,7 @@
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "OQC_SamplingDataCollection";
             this.Tag = "OQC!SamplingDataCollection";
-            this.Text = "抽样数据采集";
+            this.Text = " ";
             this.Load += new System.EventHandler(this.抽样数据采集_Load);
             this.SizeChanged += new System.EventHandler(this.抽样数据采集_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).EndInit();
@@ -977,9 +982,6 @@
         private System.Windows.Forms.Label ob_aqlcode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_ng;
@@ -989,7 +991,10 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_id;
         private System.Windows.Forms.Label ob_projectcode_label;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn or_reasoncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn oi_description;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
     }
 }

+ 53 - 25
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -24,6 +24,8 @@ namespace UAS_MES.OQC
 
         DataTable TempForCheckType = new DataTable();
 
+        DataTable TempForBadGroup = new DataTable();
+
         public OQC_SamplingDataCollection()
         {
             InitializeComponent();
@@ -65,7 +67,7 @@ namespace UAS_MES.OQC
             {
                 if (CheckSnCode())
                 {
-                    dt = (DataTable)dh.ExecuteSql("select or_reasoncode, oi_description from OQCNGReason where or_checkno='" + ob_checkno.Text + "' and or_sncode='" + sncode.Text + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select or_id,or_reasoncode bg_code, oi_description bg_name from OQCNGReason where or_checkno='" + ob_checkno.Text + "' and or_sncode='" + sncode.Text + "'", "select");
                     BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
                     GetBatchTypeGridData();
                 }
@@ -162,6 +164,7 @@ namespace UAS_MES.OQC
                         //将布尔值转换为0,-1
                         if (TempForCheckType.Rows[i]["ois_id"].ToString() != "" && TempForCheckType.Rows[i]["ois_id"].ToString() != "0")
                         {
+                            Console.WriteLine("ioi_ng" + TempForCheckType.Rows[i]["oi_ng"].ToString());
                             ois_ifng_update.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_defectlevel_update.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_remark_update.Add(TempForCheckType.Rows[i]["ois_remark"].ToString());
@@ -169,6 +172,7 @@ namespace UAS_MES.OQC
                         }
                         else
                         {
+                            Console.WriteLine("uoi_ng" + TempForCheckType.Rows[i]["oi_ng"].ToString());
                             oi_itemcode_insert.Add(TempForCheckType.Rows[i]["oi_itemcode"].ToString());
                             ois_ifng_insert.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_defectlevel_insert.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
@@ -177,15 +181,17 @@ namespace UAS_MES.OQC
                     }
                     //判断是否含不通过的内容
                     bool AllPass = true;
+                    Console.WriteLine(ois_ifng_insert.Count);
                     for (int i = 0; i < ois_ifng_insert.Count; i++)
                     {
-                        Console.WriteLine("ois_ifng_insert" + ois_ifng_insert[i]);
+                        Console.WriteLine(ois_ifng_insert[i]);
                         if (ois_ifng_insert[i] == "-1")
                             AllPass = false;
                     }
+                    Console.WriteLine(ois_ifng_update.Count);
                     for (int i = 0; i < ois_ifng_update.Count; i++)
                     {
-                        Console.WriteLine("ois_ifng_update" + ois_ifng_update[i]);
+                        Console.WriteLine(ois_ifng_update[i]);
                         if (ois_ifng_update[i] == "-1")
                             AllPass = false;
                     }
@@ -218,15 +224,19 @@ namespace UAS_MES.OQC
                         List<string> bc_name = new List<string>();
                         for (int i = 0; i < ChoosedDGV.RowCount; i++)
                         {
-                            bc_code.Add(ChoosedDGV.Rows[i].Cells[0].Value.ToString());
-                            bc_name.Add(ChoosedDGV.Rows[i].Cells[1].Value.ToString());
+                            bc_code.Add(ChoosedDGV.Rows[i].Cells[1].Value.ToString());
+                            bc_name.Add(ChoosedDGV.Rows[i].Cells[2].Value.ToString());
+                        }
+                        if (bc_name.Count > 0)
+                        {
+                            dh.ExecuteSql("delete from OQCNGReason where or_sncode='" + sncode.Text + "' and or_checkno='" + ob_checkno.Text + "'", "delete");
+                            sql.Clear();
+                            sql.Append("insert into OQCNGReason(or_id, or_checkno, or_makecode, or_sncode, or_reasoncode, oi_description, oi_remark)");
+                            sql.Append("values (OQCNGReason_seq.nextval,'" + ob_checkno.Text + "','" + ob_makecode.Text + "','" + sncode.Text + "',:a,:b,'" + ob_remark.Text + "')");
+                            dh.BatchInsert(sql.GetString(), new string[] { "a", "b" }, bc_code.ToArray(), bc_name.ToArray());
                         }
-                        sql.Clear();
-                        sql.Append("insert into OQCNGReason(or_id, or_checkno, or_makecode, or_sncode, or_reasoncode, oi_description, oi_remark)");
-                        sql.Append("values (OQCNGReason_seq.nextval,'" + ob_checkno.Text + "','" + ob_makecode.Text + "','" + sncode.Text + "',:a,:b,'" + ob_remark.Text + "')");
-                        dh.BatchInsert(sql.GetString(), new string[] { "a", "b" }, bc_code.ToArray(), bc_name.ToArray());
-                        sql.Clear();
                         //更新项目编号中的抽检数、不合格数,根据采样项目记录
+                        sql.Clear();
                         sql.Append("UPDATE OQCItems SET (oi_ngqty,oi_checkqty)=(select nvl(sum(case when ");
                         sql.Append("nvl(ois_ifng,0)=0 then 0 else 1 end),0) ,count(1) from OQCItemSamples where ois_checkno=oi_checkno ");
                         sql.Append("and ois_itemcode=oi_itemcode)where oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode ='" + ob_projectcode.Text + "'");
@@ -239,8 +249,10 @@ namespace UAS_MES.OQC
                         GetBatch.PerformClick();
                         ChoosedDGV.DataSource = null;
                         BaseUtil.CleanDGVData(CheckTypeDGV);
+                        BaseUtil.CleanDGVData(WaitChooseDGV);
                         sncode.Text = "";
                         TempForCheckType.Clear();
+                        TempForBadGroup.Clear();
                     }
                     else OperateResult.AppendText(">>含有未通过项请勾选不良明细\n", Color.Red);
                 }
@@ -329,9 +341,15 @@ namespace UAS_MES.OQC
 
         private void ChooseedReject_Click(object sender, EventArgs e)
         {
-            dt = BaseUtil.DGVIfChecked(WaitChooseDGV);
-            if (dt != null)
-                BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
+            if (TempForBadGroup != null)
+            {
+                for (int i = TempForBadGroup.Rows.Count - 1; i >= 0; i--)
+                {
+                    if (TempForBadGroup.Rows[i][0].ToString() != "True")
+                        TempForBadGroup.Rows.RemoveAt(i);
+                }
+                BaseUtil.FillDgvWithDataTable(ChoosedDGV, TempForBadGroup.Copy());
+            }
             else
                 OperateResult.AppendText(">>请先勾选不良明细\n", Color.Red);
         }
@@ -343,7 +361,7 @@ namespace UAS_MES.OQC
                 string checkkind = CheckTypeDGV.Rows[e.RowIndex].Cells["oi_itemcode"].Value.ToString();
                 sql.Clear();
                 sql.Append("select oi_checkkind,ois_sncode,nvl(ois_id,0) ois_id ,oi_itemcode ,nvl(ois_ifng,0) oi_ng,nvl(ois_defectlevel,'-1')");
-                sql.Append("oi_leveldefect,ois_remark,case ois_id when 0 then '未检验' else '已检验' end ois_status from OQCItems ");
+                sql.Append("oi_leveldefect,ois_remark,case nvl(ois_id,0) when 0 then '未检验' else '已检验' end ois_status from OQCItems ");
                 sql.Append("left join OQCItemSamples on  ois_sncode='" + sncode.Text + "' and ois_checkno=oi_checkno and ");
                 sql.Append("ois_itemcode=oi_itemcode and ois_projectcode = oi_projectcode where oi_checkno ='" + ob_checkno.Text + "' ");
                 sql.Append("and oi_checkkind='" + checkkind + "'");
@@ -383,7 +401,6 @@ namespace UAS_MES.OQC
                 {
 
                 }
-
                 cl.Rows.Add(headerRow);
 
                 for (int i = 0; i < dt.Rows.Count; i++)
@@ -467,6 +484,7 @@ namespace UAS_MES.OQC
                     //标记展开的子行
                     dataRow.Tag = "SonRow";
                     DataGridViewCheckBoxCell checkcell = new DataGridViewCheckBoxCell();
+                    checkcell.Tag = "SonRow";
                     dataRow.Cells.Add(checkcell);
 
                     textcell = new DataGridViewTextBoxCell();
@@ -489,13 +507,10 @@ namespace UAS_MES.OQC
                 CheckTypeDGV.Rows[e.RowIndex].Cells[0].Value = true;
             try
             {
-                if (e.ColumnIndex == 0)
+                if (CheckTypeDGV.Rows[e.RowIndex].Cells[0].Tag != null)
                 {
-                    if (CheckTypeDGV.Rows[e.RowIndex].Cells[0].Tag != null)
-                    {
-                        if (CheckTypeDGV.Rows[e.RowIndex].Cells[0].Tag.ToString() == "SonRow")
-                            BaseUtil.GetExpandDGVCheckedRow(CheckTypeDGV, TempForCheckType, e.RowIndex, 1);
-                    }
+                    if (CheckTypeDGV.Rows[e.RowIndex].Cells[0].Tag.ToString() == "SonRow")
+                        BaseUtil.GetExpandDGVCheckedRow(CheckTypeDGV, TempForCheckType, e.RowIndex, 1);
                 }
             }
             catch (Exception)
@@ -513,7 +528,6 @@ namespace UAS_MES.OQC
         private void CheckTypeDGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
         {
             BaseUtil.ExpandDGVCheck(CheckTypeDGV, e);
-
         }
 
         private void bccode_KeyDown(object sender, KeyEventArgs e)
@@ -545,16 +559,30 @@ namespace UAS_MES.OQC
         private void ms_sncode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetBatch.PerformClick();
-            }
         }
 
         private void obd_outboxcode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetBatch.PerformClick();
+        }
+
+        private void WaitChooseDGV_CellValueChanged(object sender, DataGridViewCellEventArgs e)
+        {
+            try
+            {
+                if (e.ColumnIndex == 0)
+                {
+                    if (WaitChooseDGV.Rows[e.RowIndex].Cells[0].Tag != null)
+                    {
+                        if (WaitChooseDGV.Rows[e.RowIndex].Cells[0].Tag.ToString() == "SonRow")
+                            BaseUtil.GetExpandDGVCheckedRow(WaitChooseDGV, TempForBadGroup, e.RowIndex, 1);
+                    }
+                }
+            }
+            catch (Exception)
+            {
             }
         }
     }

+ 2 - 2
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -252,10 +252,10 @@
   <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="or_reasoncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="bc_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="oi_description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

+ 0 - 2
UAS-MES/PublicMethod/BaseUtil.cs

@@ -873,9 +873,7 @@ namespace UAS_MES.PublicMethod
             if (dt.Columns.Count == 0)
             {
                 for (int i = 0; i < dgv.Columns.Count; i++)
-                {
                     dt.Columns.Add(dgv.Columns[i].Name);
-                }
             }
             //是展开的子行的数据
             if (dgv.Rows[RowIndex].Tag != null && dgv.Rows[RowIndex].Tag.ToString() == "SonRow")

+ 1 - 1
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>253</ApplicationRevision>
+    <ApplicationRevision>256</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>