From c98b250c6e150f0eda22d0447ae35b95cec0ec66 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期一, 01 十一月 2021 09:49:55 +0800 Subject: [PATCH] 条码生成模块增加批次按钮,工艺路线模块修改后保存报错修改 --- WarM/条码打印/Gy_BarCodeBill.cs | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 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..d453cfa 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,7 +2471,38 @@ } } + //鎵规鎸夐挳 + 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