Browse Source

撤销注释的代码

callm 2 months ago
parent
commit
e1c82bae48
1 changed files with 39 additions and 39 deletions
  1. 39 39
      UAS_MES_BG/FunctionCode/Make/Make_TestCollection.cs

+ 39 - 39
UAS_MES_BG/FunctionCode/Make/Make_TestCollection.cs

@@ -399,45 +399,45 @@ namespace UAS_MES_NEW.Make
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                         return;
                     }
-                    //int RejectCount = ChoosedRejectList.Items.Count;
-                    //string[] bccode = new string[RejectCount];
-                    //string[] bcremark = new string[RejectCount];
-                    //string[] bgcode = new string[RejectCount];
-                    //string[] bgname = new string[RejectCount];
-                    //string[] bcname = new string[RejectCount];
-                    //if (AutoBadCode.Checked)
-                    //{
-                    //    string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
-                    //    bccode = new string[] { defaultvalue };
-                    //    bcremark = new string[] { defaultvalue };
-                    //    bgcode = new string[] { defaultvalue };
-                    //    bgname = new string[] { defaultvalue };
-                    //    bcname = new string[] { defaultvalue };
-                    //}
-                    //else
-                    //{
-                    //    if (ChoosedRejectList.Items.Count == 0)
-                    //    {
-                    //        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
-                    //        return;
-                    //    }
-                    //    else
-                    //    {
-                    //        for (int i = 0; i < RejectCount; i++)
-                    //        {
-                    //            //获取不良代码组
-                    //            bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
-                    //            //获取不良代码组名称
-                    //            bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
-                    //            //获取所有的不良代码
-                    //            bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
-                    //            //获取不良名称
-                    //            bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
-                    //            //获取所有的不良备注
-                    //            bcremark[i] = bc_remark.Text;
-                    //        }
-                    //    }
-                    //}
+                    int RejectCount = ChoosedRejectList.Items.Count;
+                    string[] bccode = new string[RejectCount];
+                    string[] bcremark = new string[RejectCount];
+                    string[] bgcode = new string[RejectCount];
+                    string[] bgname = new string[RejectCount];
+                    string[] bcname = new string[RejectCount];
+                    if (AutoBadCode.Checked)
+                    {
+                        string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
+                        bccode = new string[] { defaultvalue };
+                        bcremark = new string[] { defaultvalue };
+                        bgcode = new string[] { defaultvalue };
+                        bgname = new string[] { defaultvalue };
+                        bcname = new string[] { defaultvalue };
+                    }
+                    else
+                    {
+                        if (ChoosedRejectList.Items.Count == 0)
+                        {
+                            OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                            return;
+                        }
+                        else
+                        {
+                            for (int i = 0; i < RejectCount; i++)
+                            {
+                                //获取不良代码组
+                                bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                                //获取不良代码组名称
+                                bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                                //获取所有的不良代码
+                                bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                                //获取不良名称
+                                bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                                //获取所有的不良备注
+                                bcremark[i] = bc_remark.Text;
+                            }
+                        }
+                    }
                     //如果之前是良品的
                     dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
                     if (dt.Rows.Count > 0)