Пример #1
0
        //查看或修改菜单功能
        private void gvData_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            if (e.Column.Name == "colCommand")
            {
                this.Cursor = Cursors.WaitCursor;

                SysUser user = (SysUser)gvData.GetRow(e.RowHandle);
                SysRole role = lstRole.Find(obj => obj.RoleCode == user.RoleCode);
                FrmRoleFunction frm = new FrmRoleFunction(role, false);
                frm.ShowDialog();
                this.Cursor = Cursors.Default;
            }
        }
Пример #2
0
 //查看或修改菜单功能
 private void gvData_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Column.Name == "colCommand")
     {
         this.Cursor = Cursors.WaitCursor;
         SysRoleFunction userFunction = (SysRoleFunction)this.Tag;
         bool canEdit = (userFunction.InsertFlag || userFunction.UpdateFlag);
         SysRole role = (SysRole)gvData.GetRow(e.RowHandle);
         FrmRoleFunction frm = new FrmRoleFunction(role, canEdit);
         frm.ShowDialog();
         this.Cursor = Cursors.Default;
     }
 }