| | |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | |
| | | { |
| | | this.guidKey = _guidKey; |
| | | InitializeComponent(); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.IndicatorWidth = 50; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | | |
| | | }, null, false); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | | /// <param name="curPage"></param> |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | _sbSqlWhere.Append(" and ABT_GUID='"+this.guidKey + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "OPERATION_TIME", |
| | | var pgq = new PageQueryModel(curPage, 999999, "OPERATION_TIME", |
| | | "desc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | } |
| | | else |
| | | { |