private void UserReportGridView_DoubleClick(object sender, EventArgs e) { if (Program.AuthUser.Role.Permissions.Any(x=> x.Type == Domain.PermissionType.EditUser)) { var grid = (GridView)sender; GridHitInfo info = grid.CalcHitInfo(grid.GridControl.PointToClient(Control.MousePosition)); var id = grid.GetRowCellValue(info.RowHandle, "Id"); if (id != null) { var form = new UserEditForm((int)id); form.MdiParent = this.MdiParent; form.Show(); } } }
private void addNewUserBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var form = new UserEditForm(); form.MdiParent = this; form.Show(); }
private void barButtonItem1_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var form = new UserEditForm(Program.AuthUser.Id); form.MdiParent = this; form.AsPasswordChange(); form.Show(); }