|
@@ -373,7 +373,11 @@ 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 + "'");
|
|
|
- dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
|
+ int rowsnum = dh.BatchInsert(sql.ToString(), new string[] { "PIB_ID", "PIB_CUSTBARCODE" }, PIBID, CustBarCode.ToArray());
|
|
|
+ if (rowsnum == 0)
|
|
|
+ {
|
|
|
+ MessageBox.Show("未成功插入数据,请核对出货单当前明细", "提示");
|
|
|
+ }
|
|
|
//更新流水号
|
|
|
dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum) + "'", "rmn_nrcode='" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "' and rmn_prefix='" + Prefix + "'");
|
|
|
LoadGridData(new object(), new EventArgs());
|
|
@@ -396,12 +400,12 @@ namespace UAS_LabelMachine
|
|
|
combined = 1;
|
|
|
if (CombindetailTwo.Checked)
|
|
|
combined = 2;
|
|
|
- dh.UpdateByCondition("CS$InoutPrcode", "Collectednum='" + collectqty + "'", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + CurrentPDNO + "' and combined=" + combined);
|
|
|
+ dh.UpdateByCondition("CS$InoutPrcode", "Collectednum='" + CollectQty + "'", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + CurrentPDNO + "' and combined=" + combined);
|
|
|
CollectNum = 0;
|
|
|
double OutNum = 0;
|
|
|
if (GridPrcode.SelectedRows.Count > 0)
|
|
|
{
|
|
|
- GridPrcode.Rows[GridPrcode.SelectedRows[0].Index].Cells["CollectedNum"].Value = collectqty;
|
|
|
+ GridPrcode.Rows[GridPrcode.SelectedRows[0].Index].Cells["CollectedNum"].Value = CollectQty;
|
|
|
for (int i = 0; i < GridPrcode.Rows.Count; i++)
|
|
|
{
|
|
|
CollectNum += float.Parse(GridPrcode.Rows[i].Cells["CollectedNum"].Value.ToString());
|