コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
ファイル: MainView.cs プロジェクト: SmolenskiyK/CS2_Project
 private void addNewUserBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var form = new UserEditForm();
     form.MdiParent = this;
     form.Show();
 }
コード例 #3
0
ファイル: MainView.cs プロジェクト: SmolenskiyK/CS2_Project
 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();
 }