| | |
| | | toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | lbGuid.Text = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | UtilityHelper.CleanValueByControl(panel1.Controls, true); |
| | | txt_password.Visible = lbPwd.Visible = true; |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true); |
| | | txt_password.Enabled = true; |
| | | txt_account.Enabled = txt_password.Enabled = true; |
| | | } |
| | | |
| | |
| | | isStatus = txt_isStatus.Checked, |
| | | remark = txt_remark.Text.Trim(), |
| | | isSys = 0, |
| | | staffId= txt_staffId.GetId() |
| | | staffId = txt_staffId.GetId() |
| | | }; |
| | | try |
| | | { |
| | |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.ACCOUNT asc ,a.CREATE_TIME", |
| | |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain1.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void getModel(string strGuid) |
| | |
| | | { |
| | | var dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(panel1.Controls, dy, isEdit); |
| | | txt_account.Enabled = txt_password.Enabled = |
| | | txt_password.Visible = |
| | | lbPwd.Visible = tipPwd.Visible = false; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | txt_account.Enabled = txt_password.Enabled = txt_password.Enabled = false; |
| | | } |
| | | else |
| | | { |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 角色 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, |
| | | ButtonPressedEventArgs e) |
| | | { |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 密码 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit2_ButtonClick(object sender, |
| | | ButtonPressedEventArgs e) |
| | | { |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 个人权限 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit3_ButtonClick(object sender, ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new RoleSelectAction(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 权限集合 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit4_ButtonClick(object sender, ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new ViewRole(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | } |
| | | } |