1
duhe
2023-09-18 00d2dab9f1367067b27906be93a43949beb43aa7
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationInBillList.cs
@@ -10,6 +10,7 @@
using DBUtility;
using System.IO;
using System.Reflection;
using Pub_Class;
namespace WorkM
{
@@ -46,6 +47,11 @@
            DataSet DSet;
            string sSql = "";
            string sWhere = ""; 
            if ( chkWJieAn.Checked == true)
            {
                sWhere = " and HBillStatus<>3 ";
            }
            if (frmCondition.SqlStr.Trim().Length == 0)
            {
@@ -154,6 +160,7 @@
            oSumGrid.ogrdMain = grdMain;  //初始化 new
            oSumGrid.oGridsum = grdSum;
            initGrid();
            chkWJieAn.Checked = true;
        }
        private void grdMain_DblClick(object sender, EventArgs e)
@@ -210,12 +217,26 @@
            {
                if (MessageBox.Show("确定要删除当前单据?", "提示", MessageBoxButtons.OKCancel)==DialogResult.OK)
                {
                    if (oBill.omodel.HMaker != ClsPub.CurUserName && (ClsPub.CurUserName != "admin" && ClsPub.CurUserName != "Admin"))
                    ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter();
                    string DeleteCtl = oClsXt_SystemParameter.GetSingleSystemParameter("MES_StationInBill_DeleteCtl", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DeleteCtl == "Y" && oBill.omodel.HMaker != DBUtility.ClsPub.CurUserName && DBUtility.ClsPub.CurUserName != "admin" && DBUtility.ClsPub.CurUserName != "Admin")
                    {
                        MessageBox.Show("只能删除本人的单据!", "提示");
                        MessageBox.Show("登录用户与制单人不一致,不允许删除", "提示");
                        return;
                    }
                    //判断会计期是否合理
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(oBill.omodel.HDate), ref sYear, ref sPeriod, ref s) == false)
                    {
                        MessageBox.Show(s, "提示");
                        return;
                    }
                    SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                    DataSet ds;
                    //判断是否存在 ç›¸åŒå•据号 çš„领料单 åˆ¤æ–­ç”Ÿäº§è®¢å•是否已结案,要求计划手工反结案