public RolesPresenter(RolesView view) { this.view = view; Roles = modelProxy.RoleDao.GetAll().ToList(); Permissions = modelProxy.PermissionDao.GetAll().ToList(); foreach (var role in Roles) { List<Permission> listPermissions = new List<Permission>(); foreach (var permission in role.Permissions) { listPermissions.Add(Permissions.First(x => x.Id == permission.Id)); } role.Permissions = listPermissions; } }
public RolesPresenter(RolesView view) { this.view = view; Roles = model.GetAll().ToList(); Permissions = modelPermission.GetAll().ToList(); }
private void RolesButton_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var form = new Roles.RolesView(); form.MdiParent = this; form.Show(); }