|
|
@@ -271,7 +271,8 @@ namespace UAS_MES_NEW.Make
|
|
|
'{ma_code.Text}','{ma_prodcode}','{li_code.Text}','{sideVal.Text}','{empVal.Text}',sysdate, '领用'
|
|
|
FROM stencil WHERE st_code = '{toolingVal.Text.Trim()}'", "insert");
|
|
|
}
|
|
|
- dh.ExecuteSql("update stencil set st_usestatus= '出库' where st_code='" + toolingVal.Text + "'", "update");
|
|
|
+ dh.ExecuteSql($@"update stencil set st_usestatus= '出库',st_line = '{li_code.Text}',st_macode = '{ma_code.Text}',
|
|
|
+ st_useofproduct = '{ma_prodcode}' where st_code='" + toolingVal.Text + "'", "update");
|
|
|
|
|
|
|
|
|
ma_code.Text = "";
|
|
|
@@ -306,14 +307,16 @@ namespace UAS_MES_NEW.Make
|
|
|
dh.ExecuteSql($@"UPDATE stencil SET st_cleannums = nvl(st_cleannums, 0) + 1,
|
|
|
st_ensiona = '{stA.Text.Trim()}',st_ensionb = '{stB.Text.Trim()}',
|
|
|
st_ensionc = '{stC.Text.Trim()}',st_ensiond = '{stD.Text.Trim()}',st_ensione = '{stE.Text.Trim()}',
|
|
|
- st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},st_usestatus = '在库'
|
|
|
+ st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},st_usestatus = '在库',
|
|
|
+ st_line = '',st_macode = '',st_useofproduct = ''
|
|
|
WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
dh.ExecuteSql($@"UPDATE stencil SET st_ensiona = '{stA.Text.Trim()}',st_ensionb = '{stB.Text.Trim()}',
|
|
|
st_ensionc = '{stC.Text.Trim()}',st_ensiond = '{stD.Text.Trim()}',st_ensione = '{stE.Text.Trim()}',
|
|
|
- st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},st_usestatus = '在库'
|
|
|
+ st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},st_usestatus = '在库',
|
|
|
+ st_line = '',st_macode = '',st_useofproduct = ''
|
|
|
WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
}
|
|
|
dh.ExecuteSql($@"INSERT INTO stenciluse (su_id,su_stcode,su_stid,
|
|
|
@@ -331,13 +334,13 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
if (IsClean.Checked)
|
|
|
{
|
|
|
- dh.ExecuteSql($@"UPDATE stencil SET st_cleannums = nvl(st_cleannums, 0) + 1,st_usecount = '{useCountVal.Text.Trim()}',
|
|
|
- st_usestatus = '在库' WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
+ dh.ExecuteSql($@"UPDATE stencil SET st_cleannums = nvl(st_cleannums, 0) + 1,st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},
|
|
|
+ st_usestatus = '在库',st_line = '',st_macode = '',st_useofproduct = '' WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dh.ExecuteSql($@"UPDATE stencil SET st_usecount = '',st_usestatus = '在库'
|
|
|
- WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
+ dh.ExecuteSql($@"UPDATE stencil SET st_usecount = nvl(st_usecount,0) + {Convert.ToInt32(useCountVal.Text.Trim())},
|
|
|
+ st_usestatus = '在库',st_line = '',st_macode = '',st_useofproduct = ''WHERE st_code = '{toolingVal.Text.Trim()}'", "update");
|
|
|
}
|
|
|
|
|
|
dh.ExecuteSql($@"INSERT INTO stenciluse (su_id,su_stcode,su_stid,
|