章政 8 жил өмнө
parent
commit
24d5bba8bd

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -162,7 +162,7 @@ namespace UAS_MES.Make
                         string sp_ifforsn = ListA.Rows[RemainIndex]["sp_ifforsn"].ToString();
                         string sp_tracekind = ListA.Rows[RemainIndex]["sp_tracekind"].ToString();
                         string sp_barcoderule = ListA.Rows[RemainIndex]["sp_barcoderule"].ToString();
-                        if (LogicHandler.CheckSNBeforeLoad(code.Text, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
+                        if (LogicHandler.CheckSNBeforeLoad(ma_code,code.Text, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
                         {
                             CollectData.Add(code.Text);
                             CollectDataSonCode.Add(ListA.Rows[RemainIndex]["sp_soncode"].ToString());

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -258,7 +258,7 @@ namespace UAS_MES.Make
                             string sp_prefix = dtbar.Rows[0]["sp_prefix"].ToString();
                             string length = dtbar.Rows[0]["sp_length"].ToString();
                             string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
-                            if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
+                            if (!LogicHandler.CheckSNBeforeLoad("",LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
                             {
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));

+ 5 - 4
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -35,6 +35,9 @@ namespace UAS_MES.Make
         //提醒序列的索引
         int RemainIndex = 0;
 
+        string oMakeCode = "";
+        string oMsid = "";
+
         DataHelper dh;
         LogStringBuilder sql = new LogStringBuilder();
         DataTable DBFind;
@@ -103,9 +106,7 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                string ErrorMessage = "";
-                string oMakeCode = "";
-                string oMsid = "";
+             
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
                     if (Loading.Checked)
@@ -215,7 +216,7 @@ namespace UAS_MES.Make
                             string sp_ifforsn = dt1.Rows[RemainIndex]["sp_ifforsn"].ToString();
                             string sp_tracekind = dt1.Rows[RemainIndex]["sp_tracekind"].ToString();
                             string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
-                            if(LogicHandler.CheckSNBeforeLoad(code.Text,sp_soncode,sp_barcoderule,sp_prefix,length,out ErrorMessage))
+                            if(LogicHandler.CheckSNBeforeLoad(oMakeCode,code.Text,sp_soncode,sp_barcoderule,sp_prefix,length,out ErrorMessage))
                                 Save_OtherCode(sp_soncode, make_code, sn_code.Text, sp_id);
                             else
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);