|
|
@@ -61,13 +61,18 @@ namespace FileWatcher
|
|
|
|
|
|
void uploadfile()
|
|
|
{
|
|
|
+ if (FilePath.Text == "")
|
|
|
+ {
|
|
|
+ MessageBox.Show("文件不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
ps_prodcode.Text = FilePath.Text.Substring(FilePath.Text.LastIndexOf(@"\") + 1).Replace(".xls", "").Replace(".xlsx", "");
|
|
|
pr_code_Leave(new object(), new EventArgs());
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + ps_prodcode.Text + "' ", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
|
string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
|
|
|
- dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + usercode + "')", "insert");
|
|
|
+ dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + usercode + "','在录入','ENTERING')", "insert");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -321,7 +326,7 @@ namespace FileWatcher
|
|
|
}
|
|
|
}
|
|
|
LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播成功", ps_prodcode.Text, "");
|
|
|
- MessageBox.Show("产品编号" + ps_prodcode.Text + "广播成功");
|
|
|
+ MessageBox.Show("文档[" + ps_prodcode.Text + "]下放成功");
|
|
|
}
|
|
|
else
|
|
|
{
|