|
|
@@ -38,7 +38,7 @@ namespace UAS_MES.Make
|
|
|
ma_code.TableName = "make left join product on ma_prodcode=pr_code";
|
|
|
ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,pr_detail # 产品名称";
|
|
|
ma_code.FormName = Name;
|
|
|
- ma_code.SetValueField = new string[] { "ma_code","ma_prodcode","pr_detail" };
|
|
|
+ ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "pr_detail" };
|
|
|
ma_code.Condition = "ma_statuscode='STARTED'";
|
|
|
}
|
|
|
|
|
|
@@ -66,11 +66,13 @@ namespace UAS_MES.Make
|
|
|
if (bsncode == "")
|
|
|
{
|
|
|
//判断用户是否锁定输入转换前序列号长度,
|
|
|
- if (!checkLengthOrPre(beforeTransSNLength_checkBox, beforeTransSNLength, "长度")) {
|
|
|
+ if (!checkLengthOrPre(beforeTransSNLength_checkBox, beforeTransSNLength, "长度"))
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
//判断用户是否锁定输入转换前序列号前缀,
|
|
|
- if (!checkLengthOrPre(beforeTransSNPre_checkBox, beforeTransSNPre, "前缀")) {
|
|
|
+ if (!checkLengthOrPre(beforeTransSNPre_checkBox, beforeTransSNPre, "前缀"))
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
//核对工序
|
|
|
@@ -96,7 +98,7 @@ namespace UAS_MES.Make
|
|
|
case CheckState.Unchecked:
|
|
|
string beforesn = dh.getFieldDataByCondition("makeserial", "ms_beforesn", "ms_sncode='" + sncode.Text + "'").ToString().Trim();
|
|
|
//为空,就说明,没有进行过序列号的转换
|
|
|
- if ( beforesn== ""||beforesn==null)
|
|
|
+ if (beforesn == "" || beforesn == null)
|
|
|
{
|
|
|
//记录转换前的序列号
|
|
|
bsncode = sncode.Text;
|
|
|
@@ -149,12 +151,12 @@ namespace UAS_MES.Make
|
|
|
//记录本次修改,存入makesnrelation表中
|
|
|
dh.ExecuteSql("insert into makesnrelation (BEFORESN,SN,FIRSTSN,MAKECODE,msr_indate, msr_inman)values('" + bsncode + "','" + sncode + "','" + firstsn + "','" + ma_code.Text + "', sysdate ,'" + User.UserCode + "')", "insert");
|
|
|
//写入日志
|
|
|
- LogManager.DoLog("修改序列号:"+bsncode+"为"+sncode.Text+"成功!"+"操作人:"+User.UserCode);
|
|
|
+ LogManager.DoLog("修改序列号:" + bsncode + "为" + sncode.Text + "成功!" + "操作人:" + User.UserCode);
|
|
|
OperateResult.AppendText(">>请输入转换前的序列号\n", Color.Green);
|
|
|
//置空
|
|
|
bsncode = "";
|
|
|
//更新数量
|
|
|
- changenum.Text = int.Parse(changenum.Text) + 1+"";
|
|
|
+ changenum.Text = int.Parse(changenum.Text) + 1 + "";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -166,7 +168,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
if (!dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "'"))
|
|
|
{
|
|
|
- dh.UpdateByCondition("makeserial", "ms_sncode='" + sncode.Text + "' and ms_beforesn='"+bsncode+"'", "ms_sncode='" + bsncode + "'");
|
|
|
+ dh.UpdateByCondition("makeserial", "ms_sncode='" + sncode.Text + "' and ms_beforesn='" + bsncode + "'", "ms_sncode='" + bsncode + "'");
|
|
|
OperateResult.AppendText(">>转换成功", Color.Green);
|
|
|
//查询ms_firstsn
|
|
|
string firstsn = dh.getFieldDataByCondition("makeserial", "ms_firstsn", "ms_sncode='" + sncode.Text + "'").ToString();
|
|
|
@@ -331,7 +333,8 @@ namespace UAS_MES.Make
|
|
|
/// <param name="checkbox"></param>
|
|
|
/// <param name="c"></param>
|
|
|
/// <param name="info"></param>
|
|
|
- private bool checkLengthOrPre(CheckBox checkbox,EnterTextBox textbox,string type) {
|
|
|
+ private bool checkLengthOrPre(CheckBox checkbox, EnterTextBox textbox, string type)
|
|
|
+ {
|
|
|
if (checkbox.Checked == true)
|
|
|
{
|
|
|
if (type == "长度")
|