yxj
2021-11-26 c5f02074cf8822ce16d93e6cc5aac4639f7b4622
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 = "正常!";
                //        return false;
                //    }
                //}
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //构造函数
        public ClsGy_BarCodeBill_Ctl()
        {