From 8fbaa2a04d3f730f549f613e9f0711fbd6c8e9ca Mon Sep 17 00:00:00 2001 From: jhz <jinghz@oceic.com> Date: 星期四, 16 六月 2022 09:21:39 +0800 Subject: [PATCH] 流转卡报错修改 --- WorkM/流转卡管理/MES_StationOutBillList.cs | 32 +++++++++++++++++++++++++++----- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBillList.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBillList.cs" index 35b3353..f6be688 100644 --- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBillList.cs" +++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBillList.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) { @@ -153,6 +159,7 @@ oSumGrid.ogrdMain = grdMain; //鍒濆鍖� new oSumGrid.oGridsum = grdSum; initGrid(); + chkWJieAn.Checked = true; } private void grdMain_DblClick(object sender, EventArgs e) @@ -211,11 +218,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_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 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; + } + + string c = ""; SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); @@ -616,9 +638,9 @@ for (int i = 0; i < grdMain.SelectedRows.Count; i++) { BillSelect oSelect = new BillSelect(); - oSelect.BillNo = ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[BillNoCol].Value); - oSelect.BillMainID = ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[MainIDCol].Value); - oSelect.BillSubID = ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[SubIDCol].Value); + oSelect.BillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[BillNoCol].Value); + oSelect.BillMainID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[MainIDCol].Value); + oSelect.BillSubID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[SubIDCol].Value); oSelect.BillTitle = "宸ュ簭鍑虹珯姹囨姤鍗�"; oSelect.BillType = ModName; oBillSelectColl.Add(oSelect); -- Gitblit v1.9.1