Browse Source

长度判断修改

shim 8 years ago
parent
commit
1cbafb6f59

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

@@ -404,7 +404,7 @@ namespace UAS_MES.Make
                 macOrBt = code.Text.Replace(":", "").Replace("-", "");
             }
             //如果前缀和长度都满足的话
-            if ((ListA.Rows[step - 2]["psr_length"].ToString() == "0" ? true : code.Text.Length != int.Parse(ListA.Rows[step - 2]["psr_length"].ToString())))
+            if ((ListA.Rows[step - 2]["psr_length"].ToString() == "0" ? false : code.Text.Length != int.Parse(ListA.Rows[step - 2]["psr_length"].ToString())))
             {
                 OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"] + "长度校验不通过,请重新输入\n", Color.Red);
                 OperateResult.AppendText(">>请重新输入" + ListA.Rows[step - 2]["psr_type"] + "\n", Color.Black, code);

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

@@ -268,7 +268,7 @@ namespace UAS_MES.Make
                 if ((((CheckBox)list[step - 1]).Text.Split('/')[0] == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text.Split('/')[0]) == info.Rows[i]["psr_type"].ToString())
                 {
                     //校验长度
-                    if ((info.Rows[i]["psr_length"].ToString() == "0" ? true : inputValue.Text.Length != int.Parse(info.Rows[i]["psr_length"].ToString())))
+                    if ((info.Rows[i]["psr_length"].ToString() == "0" ? false : inputValue.Text.Length != int.Parse(info.Rows[i]["psr_length"].ToString())))
                     {
                         OperateResult.AppendText(">>" + info.Rows[i]["psr_type"] + "长度校验不通过,请重新输入\n", Color.Red);
                         OperateResult.AppendText(">>请重新输入" + info.Rows[i]["psr_type"] + "\n", Color.Black, inputValue);