智云外网版WMS\MES\SCM(作废)
jhz
2022-06-30 c99dfc9997c95279a03a5e35b28502d7b7298ff0
SCM/ÌõÂë´òÓ¡/Gy_BarCodeBillList.cs
@@ -30,7 +30,7 @@
        public const string ModRightNameDelete = ModRightName + "_Delete";  //作废
        public const string ModRightNamePrint = ModRightName + "_Print";    //打印
        SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
        public string CampanyName;
        //DAL.ClsGy_ICBomBill oBill = new DAL.ClsGy_ICBomBill();
        //public  Gy_ICBomBill oFrm;
        public int selectRow = 0;
@@ -170,6 +170,7 @@
                MessageBox.Show("您没有删除权限!");
                return;
            }
            Int64 lngBillKey = 0;
            string HBarCode = "";
            if (grdMain.CurrentRow == null)
@@ -179,7 +180,15 @@
                MessageBox.Show("不允许多行删除,请重新选择要删除的条码!");
                return;
            }
            //--制单人必须相同
            if (CampanyName == "森楷") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
            {
                if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[0].Cells[Fun_GetCol("制单人")].Value) != DBUtility.ClsPub.CurUserName)
                {
                    MessageBox.Show("您选的第" + grdMain.SelectedRows[0].Index.ToString() + "行,条码制单人不是您本人,不允许删除!");
                    return;
                }
            }
            if (MessageBox.Show("确定要删除所选条码?删除后不能恢复,请谨慎操作!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[0].Cells[Fun_GetCol("hmainid")].Value);
@@ -285,6 +294,16 @@
                {
                    HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
                    HBarCode = HBarCode + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("条码编号")].Value);
                    //--制单人必须相同
                    if (CampanyName == "森楷") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
                    {
                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("制单人")].Value) != DBUtility.ClsPub.CurUserName)
                        {
                            MessageBox.Show("您选的第"+ grdMain.SelectedRows[i].Index.ToString() + "行,条码制单人不是您本人,不允许删除!");
                            return;
                        }
                    }
                }
                try
@@ -338,6 +357,17 @@
            frmCondition = new frmBillQueryCondition_Base();
            SetCondition(frmCondition, ViewName, this.Name);
            frmCondition.ShowDialog();
            //获取系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
            DataSet Ds = oWeb.getDataSetBySQL("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo);
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("获取系统参数失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                return;
            }
            else
            {
                CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]);
            }
            if (frmCondition.Tag.ToString() == "OK")
            {
                timer1.Enabled = true;