Sfoglia il codice sorgente

Merge remote-tracking branch 'refs/remotes/origin/master'

章政 8 anni fa
parent
commit
2b64eda28e

+ 9 - 2
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -279,8 +279,15 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 {
                     sql += " and " + condition;
                 }
-                dt = (DataTable)dh.ExecuteSql(sql, "select");
-                ReturnDataToFrom();
+                try
+                {
+                    dt = (DataTable)dh.ExecuteSql(sql, "select");
+                    if (dt.Rows.Count > 0)
+                        ReturnDataToFrom();
+                }
+                catch(Exception e){
+                    LogManager.DoLog(e.Message);
+                }  
                 //不允许工单号为空的情况
                 LockCheckBox.Checked = true;
             }

+ 9 - 2
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -337,8 +337,15 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 {
                     sql += " and " + condition;
                 }
-                dt = (DataTable)dh.ExecuteSql(sql, "select");
-                ReturnDataToForm();          
+                try
+                {
+                    dt = (DataTable)dh.ExecuteSql(sql, "select");
+                    if (dt.Rows.Count > 0)
+                        ReturnDataToForm();
+                }
+                catch(Exception e){
+                    LogManager.DoLog(e.Message);
+                }     
             }
         }
     }

+ 6 - 2
UAS_MesInterface/LogicHandler.cs

@@ -138,7 +138,9 @@ namespace UAS_MesInterface
             oCode2 = "";
             oCdoe3 = "";
             oErrorMessage = "";
-            string[] param = new string[] { iSnCode, "", oMac, oBT, oCode1, oCode2, oCdoe3, oErrorMessage };
+            string omakeCode = "";
+            GetRcardMOInfo(iSnCode,out omakeCode,out oErrorMessage);
+            string[] param = new string[] { iSnCode, omakeCode, oMac, oBT, oCode1, oCode2, oCdoe3, oErrorMessage };
             dh.CallProcedure("CS_GETADDRESSBYMAKECODE", ref param);
             oMac = param[2];
             oBT = param[3];
@@ -401,7 +403,9 @@ namespace UAS_MesInterface
         /// <returns></returns>
         public bool SetMobileData(string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, out string oErrorMessage)
         {
-            return SetStepFinish("", iSourceCode, iSN, iMPKind, iResult, "", iErrCode, out oErrorMessage);
+            string omakecode = "";
+            GetRcardMOInfo(iSN,out omakecode,out oErrorMessage);
+            return SetStepFinish(omakecode, iSourceCode, iSN, iMPKind, iResult, "", iErrCode, out oErrorMessage);
         }
 
         private bool CS_SetFinish(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)