|
|
@@ -249,15 +249,23 @@ namespace UAS_LabelMachine
|
|
|
pib_inqty.Add(AddNum.ToString());
|
|
|
}
|
|
|
}
|
|
|
- //插入条码
|
|
|
- sql.Clear();
|
|
|
- sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_BARCODE,PIB_CUSTBARCODE,PIB_PDNO,");
|
|
|
- sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO,pib_orderdetno)");
|
|
|
- sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",:barcode,:custbarcode,'" + pd_pdno + "','" + pd_id + "',");
|
|
|
- sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','','" + pd_orderdetno + "')");
|
|
|
- dh.BatchInsert(sql.ToString(), new string[] { "barcode", "custbarcode", "pib_inqty", "midcode" }, barcode.ToArray(), custbarcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
|
|
|
- //更新最大流水号
|
|
|
- dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
|
|
|
+ if (barcode.Count > 0)
|
|
|
+ {
|
|
|
+ //插入条码
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_BARCODE,PIB_CUSTBARCODE,PIB_PDNO,");
|
|
|
+ sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO,pib_orderdetno)");
|
|
|
+ sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",:barcode,:custbarcode,'" + pd_pdno + "','" + pd_id + "',");
|
|
|
+ sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','','" + pd_orderdetno + "')");
|
|
|
+ dh.BatchInsert(sql.ToString(), new string[] { "barcode", "custbarcode", "pib_inqty", "midcode" }, barcode.ToArray(), custbarcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
|
|
|
+ //更新最大流水号
|
|
|
+ dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("无可用条码,请检查本次数量");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (CheckedRowCount > 0)
|