private void Bind() { if (RoleSelector.ComboBox.SelectedValue != "") { OnRoleSelectPanel.Visible = true; Role role = RolesMapper.GetByID(long.Parse(RoleSelector.ComboBox.SelectedValue)); if (role == null) { return; } PermissionsSelector.ShowPermissions(role.Permissions); if (AdminBasePage.SelectedMediaDetail != null) { PermissionsSelector.SetSelectedPermissions(RolesMediasMapper.GetRolePermissions(role, AdminBasePage.SelectedMediaDetail)); } } }
public void SetUser(User user) { UserSelector.SetSelectedUser(user); PermissionsSelector.ShowPermissions(UsersPermissions.Where(i => i.Key.ID == user.ID).Single().Value); }