소스 검색

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 7 년 전
부모
커밋
8f91f87051
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

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

@@ -475,6 +475,20 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
                         return false;
                     }
+                    //验证是否MAC和BT重复
+                    if (hs.ContainsValue(macOrBt))
+                    {
+                        foreach (DictionaryEntry de in hs)
+                        {
+                            //拿到重复的项
+                            if (de.Value.ToString()==macOrBt)
+                            {
+                                OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误," + de.Key+ "已录\n", Color.Red);
+                                OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
+                                return false;
+                            }
+                        }
+                    }
                     //验证是否已被使用
                     string temSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + macOrBt + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'").ToString();
                     if (temSn != "")
@@ -496,6 +510,20 @@ namespace UAS_MES.Make
                     }
                     break;
                 case "NETCODE":
+                    //验证是否MAC和BT重复
+                    if (hs.ContainsValue(imeif))
+                    {
+                        foreach (DictionaryEntry de in hs)
+                        {
+                            //拿到重复的项
+                            if (de.Value.ToString() == imeif)
+                            {
+                                OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
+                                OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
+                                return false;
+                            }
+                        }
+                    }
                     //校验网标是否存在
                     string teSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'").ToString();
                     if (teSn != "")