Browse Source

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

章政 8 years ago
parent
commit
5e382469dd

+ 3 - 4
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -264,12 +264,11 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
 
         public void GetData()
         public void GetData()
         {
         {
-            if (TextBox.Text != "")
-            {
+
                 DataHelper dh = new DataHelper();
                 DataHelper dh = new DataHelper();
                 string sql;
                 string sql;
                 //将查询到的结果返回界面
                 //将查询到的结果返回界面
-                if (TextBox.Text != null) { 
+                if (TextBox.Text != "") { 
                  sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
                  sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
                 }
                 }
                 else { 
                 else { 
@@ -290,7 +289,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 }  
                 }  
                 //不允许工单号为空的情况
                 //不允许工单号为空的情况
                 LockCheckBox.Checked = true;
                 LockCheckBox.Checked = true;
-            }
+            
         }
         }
 
 
         private void fillControl(int i, Control ct)
         private void fillControl(int i, Control ct)

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

@@ -321,12 +321,10 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
 
         public void GetData()
         public void GetData()
         {
         {
-            if (TextBox.Text != "")
-            {
                 DataHelper dh = new DataHelper();
                 DataHelper dh = new DataHelper();
                 string sql;
                 string sql;
                 //将查询到的结果返回界面
                 //将查询到的结果返回界面
-                if (TextBox.Text != null)
+                if (TextBox.Text != "")
                 {
                 {
                      sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
                      sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
                 }
                 }
@@ -346,7 +344,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 catch(Exception e){
                 catch(Exception e){
                     LogManager.DoLog(e.Message);
                     LogManager.DoLog(e.Message);
                 }     
                 }     
-            }
+            
         }
         }
     }
     }
 }
 }

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_LabelCheck.cs

@@ -60,7 +60,8 @@ namespace UAS_MES.Make
         {
         {
             //关闭当前页面
             //关闭当前页面
             showResult.Clear();
             showResult.Clear();
-            this.Close();
+            //this.Close();
+            (this.Parent.Parent as TabControl).TabPages.Remove(this.Parent as TabPage);
         }
         }
 
 
         private void sncode_KeyDown(object sender, KeyEventArgs e)
         private void sncode_KeyDown(object sender, KeyEventArgs e)

+ 6 - 0
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -220,6 +220,12 @@ namespace UAS_MES.Make
         {
         {
             if (checkbox.Checked == true)
             if (checkbox.Checked == true)
             {
             {
+                //如果勾选没有填值
+                if (textbox.Text == "")
+                {
+                    OperateResult.AppendText(">>勾选长度或者前缀需要填写内容\n", Color.Red);
+                    return false;
+                }
                 if (type == "长度")
                 if (type == "长度")
                 {
                 {
                     //则判断输入转换前的序列号长度是否合法,不合法则提示
                     //则判断输入转换前的序列号长度是否合法,不合法则提示

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -350,6 +350,11 @@ namespace UAS_MES.Make
         {
         {
             if (checkbox.Checked == true)
             if (checkbox.Checked == true)
             {
             {
+                //如果勾选没有填值
+                if (textbox.Text=="") {
+                    OperateResult.AppendText(">>勾选长度或者前缀需要填写内容\n", Color.Red);
+                    return false;
+                }
                 if (type == "长度")
                 if (type == "长度")
                 {
                 {
                     //则判断输入转换前的序列号长度是否合法,不合法则提示
                     //则判断输入转换前的序列号长度是否合法,不合法则提示