From c5f02074cf8822ce16d93e6cc5aac4639f7b4622 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期五, 26 十一月 2021 16:07:10 +0800 Subject: [PATCH] 生产汇报单新增模块、列表模块删除功能修改 --- DAL/WMS/ClsGy_BarCodeBill_Ctl.cs | 80 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 0 deletions(-) diff --git a/DAL/WMS/ClsGy_BarCodeBill_Ctl.cs b/DAL/WMS/ClsGy_BarCodeBill_Ctl.cs index 84cb48b..7bc36b3 100644 --- a/DAL/WMS/ClsGy_BarCodeBill_Ctl.cs +++ b/DAL/WMS/ClsGy_BarCodeBill_Ctl.cs @@ -11,6 +11,10 @@ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩� public string HOldNumber; public Model.ClsGy_BarCodeBill_WMS_Model oModel = new Model.ClsGy_BarCodeBill_WMS_Model(); + public const string ModRightName = "Gy_BarCodeBillList"; + public const string ModRightNameEdit = ModRightName + "_Edit"; //鍒犻櫎 + public const string ModRightNameDelete = ModRightName + "_Delete"; //浣滃簾 + public const string ModRightNamePrint = ModRightName + "_Print"; //鎵撳嵃 //鏂板 public override bool AddNew() { @@ -220,6 +224,82 @@ } } + + //鍒犻櫎鏉$爜锛堟湭瀹屾垚锛� + public bool DeleteBill(long sHItemID, string sHBarCode, string CurUserName, ref string sReturn) + { + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, CurUserName)) + { + sReturn = "鎮ㄦ病鏈夊垹闄ゆ潈闄愶紒"; + return true; + } + try + { + DataSet DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_Delete " + sHItemID + ",'" + sHBarCode + "','" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','" + DBUtility.ClsPub.IPAddress + "'", "h_p_Gy_BarCodeBill_Delete", ref DBUtility.ClsPub.sExeReturnInfo); + + if (DS == null || DS.Tables[0].Rows.Count <= 0) + { + oCn.CnClose(); + oCn.CnDispose(); + sReturn = "鍒犻櫎鏉$爜鏃跺彂鐢熼敊璇紒"; + return true; + } + else + { + sReturn = DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]); + return true; + } + + //DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBPrintQty '" + sBarCode + "'", "h_p_Gy_BarCodeBPrintQty", ref DBUtility.ClsPub.sExeReturnInfo); + //if (DS == null || DS.Tables[0].Rows.Count == 0) + //{ + // oCn.CnClose(); + // oCn.CnDispose(); + // sReturn = DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]); + // return true; + //} + //else + //{ + // //宸叉墦鍗拌繃 + // if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1") + // { + // oCn.CnClose(); + // oCn.CnDispose(); + // sReturn = DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][1]); + // return true; + // } + // else + // { + // oCn.CnClose(); + // oCn.CnDispose(); + // sReturn = "姝e父锛�"; + // return false; + // } + //} + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + + + + + + + + + + + + + + + + //鏋勯�犲嚱鏁� public ClsGy_BarCodeBill_Ctl() { -- Gitblit v1.9.1