From f23d33d0cf77a73d449cd7c38effda9e50c8fda4 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 06 三月 2025 08:13:37 +0800 Subject: [PATCH] 版面 --- DevApp/Gs.DevApp/DevFrm/User/Role.cs | 44 +++++++++++++++++++++++++++----------------- 1 files changed, 27 insertions(+), 17 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/User/Role.cs b/DevApp/Gs.DevApp/DevFrm/User/Role.cs index 1948ecd..425698c 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/Role.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/Role.cs @@ -26,6 +26,9 @@ toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gridView1); + Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); @@ -42,7 +45,7 @@ } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); + Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } @@ -121,9 +124,10 @@ if (_rtn.rtnCode > 0) { if (xtraTabControl1.SelectedTabPageIndex == 0) - getPageList(this.pageBar1.CurrentPage); + { } else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); + getPageList(this.pageBar1.CurrentPage); } MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } @@ -144,14 +148,15 @@ getModel(lbGuid.Text.Trim()); else { - _filterList.Clear(); - if (gridView1.ActiveFilter.Count > 0) - { - gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; - gridView1.ActiveFilter.Clear(); - gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - } - getPageList(1); + //_filterList.Clear(); + //if (gridView1.ActiveFilter.Count > 0) + //{ + // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + // gridView1.ActiveFilter.Clear(); + // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + //} + //getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } @@ -162,16 +167,22 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) { - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_roleName, gridView1); + string rowGuid = "", rowName = ""; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_roleName, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); - UtilityHelper.ChangeEnableByControl(panel1.Controls, true); + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(lbGuid.Text.Trim()); + } + else + { + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); + } } /// <summary> @@ -241,8 +252,7 @@ private void getPageList(int curPage) { var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "CREATE_TIME", - "desc", "", _sbSqlWhere.ToString()); + var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "ROLE_NAME asc,CREATE_TIME ", "desc", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); try { -- Gitblit v1.9.3