|
@@ -60,8 +60,8 @@ namespace UAS_MES_NEW.Special
|
|
|
|
|
|
|
|
private void pr_code_DbChange1(object sender, EventArgs e)
|
|
private void pr_code_DbChange1(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
- Dbfind = ma_code1.ReturnData;
|
|
|
|
|
- BaseUtil.SetFormValue(this.Controls, Dbfind);
|
|
|
|
|
|
|
+ //Dbfind = ma_code1.ReturnData;
|
|
|
|
|
+ //BaseUtil.SetFormValue(this.Controls, Dbfind);
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code1.Text + "'", "select");
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code1.Text + "'", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
{
|
|
@@ -110,18 +110,20 @@ namespace UAS_MES_NEW.Special
|
|
|
// OperateResult.AppendText("工单号产品编号不对应,不允许切换\n");
|
|
// OperateResult.AppendText("工单号产品编号不对应,不允许切换\n");
|
|
|
// return;
|
|
// return;
|
|
|
//}
|
|
//}
|
|
|
- List<string> sqls = new List<string>();
|
|
|
|
|
- sqls.Add("update CRAFTMATERIAL set cm_makecode='" + ma_code1.Text + "' where cm_makecode= '" + ma_code.Text + "' and cm_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update steppassed set sp_makecode='" + ma_code1.Text + "' where sp_makecode= '" + ma_code.Text + "' and sp_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update makeserial set ms_makecode='" + ma_code1.Text + "' where ms_makecode= '" + ma_code.Text + "' and ms_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update makeprocess set mp_makecode='" + ma_code1.Text + "' where mp_makecode= '" + ma_code.Text + "' and mp_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update commandlog set cl_makecode='" + ma_code1.Text + "' where cl_makecode= '" + ma_code.Text + "' and cl_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update makebad set mb_makecode='" + ma_code1.Text + "' where mb_makecode= '" + ma_code.Text + "' and mb_sncode='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update labelprintlog set lpl_makecode='" + ma_code1.Text + "' where lpl_makecode= '" + ma_code.Text + "' and lpl_value='" + sncode + "'");
|
|
|
|
|
- sqls.Add("update make set ma_inqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "') and ma_code='" + ma_code1.Text + "' ");
|
|
|
|
|
- sqls.Add("update make set ma_endqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "' and ms_status=2) where ma_code='" + ma_code1.Text + "'");
|
|
|
|
|
|
|
+ List<string> sqls = new List<string>
|
|
|
|
|
+ {
|
|
|
|
|
+ "update CRAFTMATERIAL set cm_makecode='" + ma_code1.Text + "' where cm_makecode= '" + ma_code.Text + "' and cm_sncode='" + sncode + "'",
|
|
|
|
|
+ "update steppassed set sp_makecode='" + ma_code1.Text + "' where sp_makecode= '" + ma_code.Text + "' and sp_sncode='" + sncode + "'",
|
|
|
|
|
+ "update makeserial set ms_makecode='" + ma_code1.Text + "' where ms_makecode= '" + ma_code.Text + "' and ms_sncode='" + sncode + "'",
|
|
|
|
|
+ "update makeprocess set mp_makecode='" + ma_code1.Text + "' where mp_makecode= '" + ma_code.Text + "' and mp_sncode='" + sncode + "'",
|
|
|
|
|
+ "update commandlog set cl_makecode='" + ma_code1.Text + "' where cl_makecode= '" + ma_code.Text + "' and cl_sncode='" + sncode + "'",
|
|
|
|
|
+ "update makebad set mb_makecode='" + ma_code1.Text + "' where mb_makecode= '" + ma_code.Text + "' and mb_sncode='" + sncode + "'",
|
|
|
|
|
+ "update labelprintlog set lpl_makecode='" + ma_code1.Text + "' where lpl_makecode= '" + ma_code.Text + "' and lpl_value='" + sncode + "'",
|
|
|
|
|
+ "update make set ma_inqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "') where ma_code='" + ma_code1.Text + "' ",
|
|
|
|
|
+ "update make set ma_endqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "' and ms_status=2) where ma_code='" + ma_code1.Text + "'"
|
|
|
|
|
+ };
|
|
|
dh.ExecuteSQLTran(sqls.ToArray());
|
|
dh.ExecuteSQLTran(sqls.ToArray());
|
|
|
- OperateResult.AppendText("工单号切换成功\n");
|
|
|
|
|
|
|
+ OperateResult.AppendText(ms_sncode.Text + "工单号切换成功,原工单" + ma_code.Text + ",新工单" + ma_code1.Text + "\n");
|
|
|
LogicHandler.DoCommandLog("", User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工单变更", "工单变更" + ma_code.Text + "切换到" + ma_code1.Text, "", "");
|
|
LogicHandler.DoCommandLog("", User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工单变更", "工单变更" + ma_code.Text + "切换到" + ma_code1.Text, "", "");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|