| | |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Models; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnRoleClick += ToolBarMenu1_btnRoleClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查询回调 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | string strWhere = e.Data; |
| | | MessageBox.Show(strWhere); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消事件 |
| | | /// </summary> |
| | |
| | | txt_rolRemark.Focus(); |
| | | return; |
| | | } |
| | | if (txt_status.SelectedIndex <= 0) |
| | | if (txt_isStatus.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("角色状态不能为空!"); |
| | | txt_status.Focus(); |
| | | txt_isStatus.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | guid = lbGuid.Text.Trim(), |
| | | roleName = txt_roleName.Text.Trim(), |
| | | rolRemark = txt_rolRemark.Text.Trim(), |
| | | status = txt_status.SelectedIndex,//状态 |
| | | isStatus = txt_isStatus.SelectedIndex,//状态 |
| | | }; |
| | | try |
| | | { |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | { |
| | | Models.PageQueryModel pgq = new Models.PageQueryModel(curPage, pageSize, "createDate", "asc", "", ""); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "edtTime", "desc", "", ""); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |