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/bin/Debug/templeEasyCode/category2/category.cs | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs index 9f9bb30..257c1b1 100644 --- a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs +++ b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs @@ -167,11 +167,11 @@ private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { UtilityHelper.JumpToTab(xtraTabControl1, 1); - lbGuid.Text = ""; - List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); - gridViews.Add(gvMx1); - UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); - Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); + lbGuid.Text = ""; + List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gridViews.Add(gvMx1); + UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } /// <summary> /// 淇濆瓨浜嬩欢 @@ -228,16 +228,23 @@ { string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); - DataTable dt = dd.rtnData.list; - gcMain.BindingContext = new BindingContext(); - gcMain.DataSource = dt; - gcMain.ForceInitialize(); - int dddd = dd.rtnData.pages;//鎬婚〉 - pageBar1.TotalPages = dddd; - pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟 - pageBar1.CurrentPage = curPage;//褰撳墠椤� - pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず - pageBar1.setTxt(); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain.BindingContext = new BindingContext(); + gcMain.DataSource = dt; + gcMain.ForceInitialize(); + int dddd = dd.rtnData.pages;//鎬婚〉 + pageBar1.TotalPages = dddd; + pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟 + pageBar1.CurrentPage = curPage;//褰撳墠椤� + pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず + pageBar1.setTxt(); + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } } catch (Exception ex) { -- Gitblit v1.9.3