From ce4118ba015ab9fee368516d0e738c8dc598320b Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期四, 07 八月 2025 10:25:24 +0800
Subject: [PATCH] 考勤增加查询功能

---
 DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs |   79 ++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs
index db80a33..9783b84 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs
@@ -11,7 +11,6 @@
     public partial class Frm_MesSysPageview : DevExpress.XtraEditors.XtraForm
     {
         string _webServiceName = "MesSysPageviewManager/";
-        List<FilterEntity> _filterList = new List<FilterEntity>();
         public Frm_MesSysPageview()
         {
             InitializeComponent();
@@ -21,22 +20,23 @@
             this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName, gridView1, null, null, "", "", (value) =>
+            this.toolBarMenu1.getXmlConfig();
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
-            });
+            }, tips);
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
                 getModel(value);
             }, (value) =>
             {
                 getPageList(this.pageBar1.CurrentPage);
-            });
+            }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
         }
 
-       
+
         /// <summary>
         /// 鍒嗛〉浜嬩欢
         /// </summary>
@@ -64,10 +64,10 @@
         private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
         {
             string rowGuid = "", rowName = "";
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1);
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1, "pageView");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -81,17 +81,19 @@
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
+                    ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     if (xtraTabControl1.SelectedTabPageIndex == 0)
                     { }
                     else
                         Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                     getPageList(this.pageBar1.CurrentPage);
                 }
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                else
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -128,11 +130,18 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
-            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid);
+            }
+            else
+            {
+                UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
+            }
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -143,7 +152,7 @@
         {
             lbGuid.Text = "";
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
-            UtilityHelper.CleanValueByControl(panel1.Controls, true);
+            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true);
         }
         /// <summary>
         /// 淇濆瓨浜嬩欢
@@ -152,23 +161,22 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
         {
-            
             toolBarMenu1.isSetBtn = false;
             if (string.IsNullOrEmpty(txt_pageView.Text.Trim()))
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("椤甸潰鍚嶇О涓嶈兘涓虹┖锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("椤甸潰鍚嶇О涓嶈兘涓虹┖锛�");
                 txt_pageView.Focus();
                 return;
             }
             if (string.IsNullOrEmpty(txt_path.Text.Trim()))
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("璺緞涓嶈兘涓虹┖锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璺緞涓嶈兘涓虹┖锛�");
                 txt_path.Focus();
                 return;
             }
             if (string.IsNullOrEmpty(txt_pageGroup.Text.Trim()))
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("缁勫埆涓嶈兘涓虹┖锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("缁勫埆涓嶈兘涓虹┖锛�");
                 txt_pageGroup.Focus();
                 return;
             }
@@ -177,25 +185,29 @@
                 guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
                 PageView = txt_pageView.Text.Trim(),
                 Path = txt_path.Text.Trim(),
-                PageGroup=txt_pageGroup.Text.Trim(),
-                PageIdx=txt_pageIdx.Text.Trim(),
-                PageStatus=txt_pageStatus.Checked
+                PageGroup = txt_pageGroup.Text.Trim(),
+                PageIdx = txt_pageIdx.Text.Trim(),
+                PageStatus = txt_pageStatus.Checked
             };
             try
             {
                 string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
+                    ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
-                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
+                    toolBarMenu1.currentAction = "";
+                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
+                else
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -206,7 +218,7 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            var _sbSqlWhere = "";
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.PAGE_GROUP", "desc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -216,9 +228,9 @@
                 if (dd.rtnCode > 0)
                 {
                     DataTable dt = dd.rtnData.list;
-                    gcMain.BindingContext = new BindingContext();
-                    gcMain.DataSource = dt;
-                    gcMain.ForceInitialize();
+                    gcMain1.BindingContext = new BindingContext();
+                    gcMain1.DataSource = dt;
+                    gcMain1.ForceInitialize();
                     int dddd = dd.rtnData.pages;//鎬婚〉
                     pageBar1.TotalPages = dddd;
                     pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟
@@ -232,7 +244,7 @@
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>
@@ -248,7 +260,7 @@
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new
@@ -263,17 +275,22 @@
                 {
                     dynamic dy = _rtn.rtnData;
                     lbGuid.Text = strGuid;
-                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
+                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
                 }
                 else
-                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
+        /// <summary>
+        /// 涓婁紶鎸夐挳
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {
             var rowhandle = gridView1.FocusedRowHandle;

--
Gitblit v1.9.3