|
|
@@ -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 != "")
|