From 4bc7030c4cea5b3deed0c938ec388ae94e33c51c Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 25 十月 2024 09:42:36 +0800
Subject: [PATCH] 修改会页

---
 DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs |  127 +++++++++++++++++++++++++++++++++---------
 1 files changed, 100 insertions(+), 27 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index f5e4051..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))
@@ -520,6 +558,7 @@
                       );
                         if (ld1 == true)
                         {
+
                             btnEsc.Visibility = btnSave.Visibility = btnLoad.Visibility = BarItemVisibility.Always;
                             btnAdd.Visibility = BarItemVisibility.Always;
                             _enabledList.Add(item.Name);
@@ -548,6 +587,19 @@
                         {
                             item.Visibility = BarItemVisibility.Always;
                             //鍑嗗鍚敤
+                            _enabledList.Add(item.Name);
+                            continue;
+                        }
+                    }
+                    ///鍏锋湁鑱斿姩鍏崇郴鐨勬寜閽�(鎻愪氦妫�楠�)锛�
+                    if (item.Caption == "鎻愪氦妫�楠�")
+                    {
+                        bool ld1 = dt.AsEnumerable().Any(row => row.Field<string>("name") == "鎻愪氦妫�楠�"
+                      );
+                        if (ld1 == true)
+                        {
+                            btnJianYan.Visibility = btnFjianYan.Visibility = btnLoad.Visibility = BarItemVisibility.Always;
+                            btnJianYan.Visibility = BarItemVisibility.Always;
                             _enabledList.Add(item.Name);
                             continue;
                         }
@@ -614,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