From fe09fca3e77be09fed738a975ff9c5a508c2dd0d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 25 十月 2024 08:31:56 +0800 Subject: [PATCH] 检验 --- DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 113 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 86 insertions(+), 27 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index e998fca..2356000 100644 --- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs +++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs @@ -2,6 +2,7 @@ using DevExpress.Utils.DirectXPaint; using DevExpress.XtraBars; using DevExpress.XtraLayout.Customization; +using DevExpress.XtraReports.Design; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; @@ -78,6 +79,16 @@ /// </summary> public event EventHandler btnFChkClick; + + /// <summary> + /// 妫�楠� + /// </summary> + public event EventHandler btnJianYanClick; + /// <summary> + /// 鍙嶆楠� + /// </summary> + public event EventHandler btnFjianYanClick; + #endregion #region 鍏叡灞炴�� @@ -135,6 +146,8 @@ this.btnIn.ItemClick += BtnIn_ItemClick; this.btnChk.ItemClick += BtnChk_ItemClick; this.btnFchk.ItemClick += BtnFchk_ItemClick; + this.btnJianYan.ItemClick += BtnJianYan_ItemClick; + this.btnFjianYan.ItemClick += BtnFjianYan_ItemClick; List<string> lst = new List<string>(); foreach (BarItem item in barManager1.Items) { @@ -146,6 +159,7 @@ } this.actions = lst; } + /// <summary> /// 鍒濆鍖栨寜閽姸鎬� @@ -179,24 +193,8 @@ } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍙嶅鏍稿悧锛�")) return; - var _obj = new - { - guid = this.guidKey, - parameter = this.chkParameter - }; - string strJson = UtilityHelper.HttpPost("", "General/GeneralFCheck", JsonConvert.SerializeObject(_obj)); - ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData["outMsg"].ToString()); - } - else - { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } + _ckService(0.ToString()); } - - private void BtnChk_ItemClick(object sender, ItemClickEventArgs e) { if (btnChkClick != null) @@ -218,22 +216,62 @@ } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾瀹℃牳鍚楋紵")) return; + _ckService(1.ToString()); + } + + private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnFjianYanClick != null) + { + btnFjianYanClick(this, e); + } + else + return; + + if (string.IsNullOrEmpty(this.guidKey)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + if (string.IsNullOrEmpty(this.chkParameter)) + { + ToolBox.MsgHelper.ShowError("娌℃湁鎸囧畾妫�楠屽弬鏁帮紝璇疯仈绯诲紑鍙戜汉鍛樿幏鍙栨敮鎸侊紒"); + return; + } + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍙嶆楠屽悧锛�")) + return; + _ckService(0.ToString()); + } + + private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnJianYanClick != null) + { + btnJianYanClick(this, e); + } + else + return; + + if (string.IsNullOrEmpty(this.guidKey)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + if (string.IsNullOrEmpty(this.chkParameter)) + { + ToolBox.MsgHelper.ShowError("娌℃湁鎸囧畾妫�楠屽弬鏁帮紝璇疯仈绯诲紑鍙戜汉鍛樿幏鍙栨敮鎸侊紒"); + return; + } + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鎻愪氦妫�楠屽悧锛�")) + return; var _obj = new { guid = this.guidKey, parameter = this.chkParameter }; - string strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", JsonConvert.SerializeObject(_obj)); - ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData["outMsg"].ToString()); - } - else - { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } + _ckService(1.ToString()); } + private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e) { if (string.IsNullOrEmpty(this.xlsInService)) @@ -628,5 +666,26 @@ } return false; } + + private void _ckService(string _ckValue) + { + var _obj = new + { + guid = this.guidKey, + parameter = this.chkParameter, + ckValue = _ckValue + }; + string strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", JsonConvert.SerializeObject(_obj)); + ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData["outMsg"].ToString()); + if (_rtn.rtnCode > 0) + { + + } + else + { + + } + } } } -- Gitblit v1.9.3