条码档案列表模块,删除、批删功能新增制单人与删除人是否一致控制
1个文件已修改
46 ■■■■■ 已修改文件
WarM/条码打印/Gy_BarCodeBillList.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBillList.cs
@@ -29,6 +29,7 @@
        public const string ModRightNameDelete = ModRightName + "_Delete";  //作废
        public const string ModRightNamePrint = ModRightName + "_Print";    //打印
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public int selectRow = 0;
@@ -225,6 +226,27 @@
            }
            else
            {
                //获取系统参数
                string sErrMsg = "";
                if (oSystemParameter.ShowBillByOrgID(DBUtility.ClsPub.HOrgID, ref sErrMsg) == true)
                {
                    //除admin账号外,只能删除当前账号所生成的条码
                    if (DBUtility.ClsPub.CurUserName.ToUpper() != "ADMIN"  //admin账号
                        && oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame.ToUpper() == "Y") //系统参数 åˆ¶å•人与删除人是否一致
                    {
                        if (DBUtility.ClsPub.CurUserName != DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[0].Cells[Fun_GetCol("制作人")].Value))
                        {
                            MessageBox.Show("删除人与制单人必须一致,删除失败!", "提示");
                            return;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("获取系统参数失败!", "提示");
                    return;
                }
                if (MessageBox.Show("确定要删除所选条码?删除后不能恢复,请谨慎操作!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    Int64 HItemID = 0;
@@ -271,6 +293,30 @@
            }
            else
            {
                //获取系统参数
                string sErrMsg = "";
                if (oSystemParameter.ShowBillByOrgID(DBUtility.ClsPub.HOrgID, ref sErrMsg) == true)
                {
                    //除admin账号外,只能删除当前账号所生成的条码
                    if (DBUtility.ClsPub.CurUserName.ToUpper() != "ADMIN"  //admin账号
                        && oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame.ToUpper() == "Y") //系统参数 åˆ¶å•人与删除人是否一致
                    {
                        for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
                        {
                            if (DBUtility.ClsPub.CurUserName != DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("制作人")].Value))
                            {
                                MessageBox.Show("存在删除人与制单人不一致的行,删除失败!", "提示");
                                return;
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show("获取系统参数失败!", "提示");
                    return;
                }
                if (MessageBox.Show("确定要批量删除所选条码?删除后不能恢复,请谨慎操作!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    string HItemID = "";