|
|
@@ -218,21 +218,21 @@ namespace UAS_MES.Make
|
|
|
//如果未装满的话
|
|
|
CollectBox();
|
|
|
}
|
|
|
- else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- List<string> SQLS = new List<string>();
|
|
|
- //删除明细
|
|
|
- SQLS.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "' and pd_innerboxcode='" + outboxcode.Text + "'");
|
|
|
- //减少箱内容量
|
|
|
- SQLS.Add("update package set pa_packageqty=pa_packageqty-1,pa_totalqty=pa_totalqty-(select pa_totalqty from package where pa_outboxcode='" + outboxcode.Text + "'),pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- SQLS.Add("update package set pa_mothercode='' where pa_outboxcode='" + outboxcode.Text + "'");
|
|
|
- dh.ExecuteSQLTran(SQLS.ToArray());
|
|
|
- LoadCollectNum();
|
|
|
- LoadGridData();
|
|
|
- outboxcode.Clear();
|
|
|
+ else
|
|
|
+ {
|
|
|
+ List<string> SQLS = new List<string>();
|
|
|
+ //删除明细
|
|
|
+ SQLS.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "' and pd_innerboxcode='" + outboxcode.Text + "'");
|
|
|
+ //减少箱内容量
|
|
|
+ SQLS.Add("update package set pa_packageqty=pa_packageqty-1,pa_totalqty=pa_totalqty-(select pa_totalqty from package where pa_outboxcode='" + outboxcode.Text + "'),pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ SQLS.Add("update package set pa_mothercode='' where pa_outboxcode='" + outboxcode.Text + "'");
|
|
|
+ dh.ExecuteSQLTran(SQLS.ToArray());
|
|
|
+ LoadCollectNum();
|
|
|
+ LoadGridData();
|
|
|
+ outboxcode.Clear();
|
|
|
+ }
|
|
|
}
|
|
|
+ else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
|
|
|
}
|
|
|
}
|
|
|
|