コード例 #1
0
        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));
                }
            }
        }
コード例 #2
0
 public void SetUser(User user)
 {
     UserSelector.SetSelectedUser(user);
     PermissionsSelector.ShowPermissions(UsersPermissions.Where(i => i.Key.ID == user.ID).Single().Value);
 }