|
|
@@ -398,7 +398,17 @@ namespace UAS_LabelMachine
|
|
|
sql.Append("select :PIB_ID,pd_prodcode,sysdate,pi_inoutno,pi_id,pd_pdno,pd_id,pi_class,");
|
|
|
sql.Append("'" + pib_barcode + "',:PIB_CUSTBARCODE,'" + CurrentZXBZ + "','" + Data["BRAND"] + "','" + Data["DATECODE"] + "','" + Data["LOTNO"] + "','" + pib_outboxcode2 + "','" + User.UserCode + "','" + (EnablePrint && SingleLabelAutoPrint.Checked ? 1 : 0).ToString() + "',pd_ordercode,pd_pocode,pd_remark,'" + MidboxCapacity.Value + "','" + pi_cardcode.Text + "' ");
|
|
|
sql.Append("from prodinout left join prodiodetail on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pi_id='" + PI_ID + "' and pd_prodcode='" + CurrentPrCode + "' and pd_pdno='" + CurrentPDNO + "'");
|
|
|
- int rowsnum = dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
|
+ int rowsnum = 0;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ rowsnum = dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + 1) + "'", "rmn_nrcode='" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "' and rmn_prefix='" + Prefix + "'");
|
|
|
+ CollectInputData();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (rowsnum == 0)
|
|
|
{
|
|
|
MessageBox.Show("未成功插入数据,请核对出货单当前明细", "提示");
|
|
|
@@ -1182,11 +1192,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
Pack_Click(sender, e);
|
|
|
//记录整箱的重量
|
|
|
- sql.Clear();
|
|
|
- sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
- sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
|
|
|
- dh.ExecuteSql(sql.ToString(), "update");
|
|
|
- LoadGridData(sender, e);
|
|
|
+ //sql.Clear();
|
|
|
+ //sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
+ //sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
|
|
|
+ //dh.ExecuteSql(sql.ToString(), "update");
|
|
|
+ //LoadGridData(sender, e);
|
|
|
thread = new Thread(OutBoxPrint);
|
|
|
stw = new SetLoadingWindow(thread, "正在打印外箱");
|
|
|
BaseUtil.SetFormCenter(stw);
|