|
|
@@ -93,7 +93,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
//勾选是修改已转换的序列,矫正修改错了的序列号
|
|
|
case CheckState.Checked:
|
|
|
- if (dh.CheckExist("MakeSerial", "ms_beforesn='" + sncode.Text + "'"))
|
|
|
+ if (dh.CheckExist("MakeSerial", "ms_beforesn='" + sncode.Text + "' and ms_id='"+oMsId+"' and ms_stepcode='"+User.CurrentStepCode+"'"))
|
|
|
{
|
|
|
bsncode = sncode.Text;
|
|
|
sncode.Text = "";
|
|
|
@@ -108,9 +108,9 @@ namespace UAS_MES.Make
|
|
|
break;
|
|
|
case CheckState.Unchecked:
|
|
|
|
|
|
- string beforesn = dh.getFieldDataByCondition("makeserial", "ms_beforesn", "ms_sncode='" + sncode.Text + "'").ToString().Trim();
|
|
|
+ //string beforesn = dh.getFieldDataByCondition("makeserial", "ms_beforesn", "ms_sncode='" + sncode.Text + "'").ToString().Trim();
|
|
|
//为空,就说明,没有进行过序列号的转换
|
|
|
- if (beforesn == "" || beforesn == null)
|
|
|
+ if (dh.CheckExist("makeserial","ms_sncode='"+sncode.Text+"' and ms_id='"+oMsId+"'"))
|
|
|
{
|
|
|
//记录转换前的序列号
|
|
|
bsncode = sncode.Text;
|
|
|
@@ -120,7 +120,7 @@ namespace UAS_MES.Make
|
|
|
else
|
|
|
//不为空,进行过转换。不勾选修改结果,就不能再修改
|
|
|
{
|
|
|
- OperateResult.AppendText(">>序列号" + sncode.Text + "已进行了转换\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>序列号" + sncode.Text + "错误\n", Color.Red);
|
|
|
sncode.Text = "";
|
|
|
OperateResult.AppendText("<<请重新输入序列号\n", Color.Green);
|
|
|
}
|
|
|
@@ -197,7 +197,10 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
OperateResult.AppendText(">>相同序列号不能进行转换\n", Color.Red);
|
|
|
+ }
|
|
|
+ sncode.Text = "";
|
|
|
}
|
|
|
}
|
|
|
else
|