jhz
2023-03-21 d84518084c3027a684333929ad80b51a0c32845b
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationEntrustOutBillList.cs
@@ -10,6 +10,7 @@
using DBUtility;
using System.IO;
using System.Reflection;
using Pub_Class;
namespace WorkM
{
@@ -50,6 +51,11 @@
                DataSet DSet;
                string sSql = "";
                string sWhere = "";
                if (chkWJieAn.Checked == true)
                {
                    sWhere = " and HBillStatus<>3 ";
                }
                if (frmCondition.SqlStr.Trim().Length == 0)
                {
@@ -200,6 +206,7 @@
            oSumGrid.ogrdMain = grdMain;  //初始化 new
            oSumGrid.oGridsum = grdSum;
            initGrid();
            chkWJieAn.Checked = true;
        }
        private void grdMain_DblClick(object sender, EventArgs e)
@@ -256,11 +263,15 @@
            {
                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_StationOutBill_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 d = "";
                    //if (oBill.CheckIsKP(oBill.omodel.HInterID, ref d) == false)
@@ -276,6 +287,17 @@
                    //    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;