소스 검색

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

shim 8 년 전
부모
커밋
ede36ee27a
2개의 변경된 파일18개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 2
      UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs
  2. 9 2
      UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

+ 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);
+                }     
             }
         }
     }