From 18a02e32f0af32b7a1b11ed8843bf0b89a85290d Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期五, 29 十月 2021 17:01:26 +0800 Subject: [PATCH] 条码生成模块增加批次按钮 --- WarM/条码打印/Gy_BarCodeBill.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" index 580f92b..0b42066 100644 --- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" +++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" @@ -2471,6 +2471,39 @@ } } + //鎵规鎸夐挳 + private void BatchNo_Click(object sender, EventArgs e) + { + bool b = false; + for (int i = 0; i < grdMain.RowCount; i++) + { + long HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value); // 鐗╂枡鍐呯爜 + string HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HBatchNoCol].Value); // 鎵瑰彿 + + if (HMaterID != 0) + { + DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + dtpHDate.Value.ToShortDateString()+ "','" + CampanyName+"'", "h_p_Gy_BarCodeBill_GetBatchNo"); + // + if (oDs == null && oDs.Tables[0].Rows.Count == 0) + { + MessageBox.Show("鐢熸垚鎵规澶辫触锛�"); + return; + } + else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") + { + grdMain.Rows[i].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); + b = true; + } + } + } + //鏄庣粏琛ㄦ槸鍚︿负闆惰 + if (b == false) + { + MessageBox.Show("娌℃湁闇�瑕佺敓鎴愭壒娆$殑鏄庣粏琛岋紒", "鎻愮ず"); + return; + } + } + -- Gitblit v1.9.1