Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/14/10 10:51:43 (13 years ago)
Author:
mjesner
Message:

#1196

Location:
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/HeuristicLab.Services.Authentication.TestClient.csproj

    r4740 r4789  
    6464      <Name>HeuristicLab.Services.Authentication.DataTransfer</Name>
    6565    </ProjectReference>
    66     <ProjectReference Include="..\HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj">
    67       <Project>{FF763830-EE9B-4FF7-9A55-4E2552E20C9A}</Project>
    68       <Name>HeuristicLab.Services.Authentication</Name>
    69     </ProjectReference>
    7066  </ItemGroup>
    7167  <ItemGroup>
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs

    r4740 r4789  
    4949            this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    5050            this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
    51             this.Membership = new System.Windows.Forms.DataGridViewTextBoxColumn();
     51           
    5252            this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
    5353            this.tcUser = new System.Windows.Forms.TabControl();
     
    290290            this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    291291            this.userNameDataGridViewTextBoxColumn,
    292             this.isAnonymousDataGridViewCheckBoxColumn,
    293             this.Membership});
     292            this.isAnonymousDataGridViewCheckBoxColumn});
    294293            this.dgvUsers.DataSource = this.bsUsers;
    295294            this.dgvUsers.Location = new System.Drawing.Point(3, 45);
     
    311310            this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous";
    312311            this.isAnonymousDataGridViewCheckBoxColumn.Name = "isAnonymousDataGridViewCheckBoxColumn";
    313             //
    314             // Membership
    315             //
    316             this.Membership.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
    317             this.Membership.DataPropertyName = "Membership.Email";
    318             this.Membership.HeaderText = "EMail";
    319             this.Membership.Name = "Membership";
    320             this.Membership.Width = 58;
     312         
    321313            //
    322314            // bsUsers
     
    356348            this.tabPage3.Text = "Detail";
    357349            this.tabPage3.UseVisualStyleBackColor = true;
    358             //
    359             // passwordSaltTextBox
    360             //
    361             this.passwordSaltTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "Membership.PasswordSalt", true));
    362             this.passwordSaltTextBox.Location = new System.Drawing.Point(134, 127);
    363             this.passwordSaltTextBox.Name = "passwordSaltTextBox";
    364             this.passwordSaltTextBox.Size = new System.Drawing.Size(145, 20);
    365             this.passwordSaltTextBox.TabIndex = 17;
     350           
    366351            //
    367352            // bsUser
     
    369354            this.bsUser.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
    370355            //
    371             // passwordQuestionTextBox
    372             //
    373             this.passwordQuestionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "PasswordQuestion", true));
    374             this.passwordQuestionTextBox.Location = new System.Drawing.Point(134, 73);
    375             this.passwordQuestionTextBox.Name = "passwordQuestionTextBox";
    376             this.passwordQuestionTextBox.Size = new System.Drawing.Size(145, 20);
    377             this.passwordQuestionTextBox.TabIndex = 16;
     356
    378357            //
    379358            // passwordTextBox
     
    743722        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn;
    744723        private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn;
    745         private System.Windows.Forms.DataGridViewTextBoxColumn Membership;
     724
    746725    }
    747726}
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs

    r4740 r4789  
    3131            {
    3232
    33                
     33
    3434                RefreshApplicationlist();
    3535            }
     
    6161        {
    6262            // show detail
    63             if(dgvUsers.SelectedRows.Count == 1){
     63            if (dgvUsers.SelectedRows.Count == 1)
     64            {
    6465                User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
    6566                bsUser.DataSource = user;
    66                 bsUserRoles.DataSource = service.GetRolesForUser(user.UserId);
     67                bsUserRoles.DataSource = service.GetRolesForUser(user.Id);
    6768                tcUser.Enabled = false;
    6869            }
     
    7374            if (dgvRoles.SelectedRows.Count == 1)
    7475            {
    75                 Role role = (Role) dgvRoles.SelectedRows[0].DataBoundItem;
     76                Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    7677                bsRole.DataSource = role;
    77                 IEnumerable<User> _l = service.GetUsersInRole(role.RoleId);
    78                 bsRoleUsers.DataSource = service.GetUsersInRole(role.RoleId);
     78                IEnumerable<User> _l = service.GetUsersInRole(role.Id);
     79                bsRoleUsers.DataSource = service.GetUsersInRole(role.Id);
    7980                btnDeleteRole.Enabled = true;
    8081                tcRole.Enabled = true;
     
    105106            service.InsertUser(user);
    106107            RefreshUserlist();
    107            
     108
    108109        }
    109110
    110111        private void btnSaveRole_Click(object sender, EventArgs e)
    111112        {
    112            Role role = (Role)bsRole.DataSource;
    113            role.ApplicationId = applicationId;
    114            service.InsertRole(role);
    115            tcRole.Enabled = false;
    116            RefreshRolelist();
     113            Role role = (Role)bsRole.DataSource;
     114            role.ApplicationId = applicationId;
     115            service.InsertRole(role);
     116            tcRole.Enabled = false;
     117            RefreshRolelist();
    117118        }
    118119
    119        
     120
    120121
    121122        private void btnAddUserToRole_Click(object sender, EventArgs e)
     
    127128                role.ApplicationId = applicationId;
    128129                user.ApplicationId = applicationId;
    129                 service.AddUserToRole(role.RoleId, user.UserId);
    130                 RefreshRoleUserlist(role.RoleId);
     130                service.AddUserToRole(role.Id, user.Id);
     131                RefreshRoleUserlist(role.Id);
    131132            }
    132133        }
     
    137138            {
    138139                Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    139                 service.DeleteRole(role.RoleId);
     140                service.DeleteRole(role.Id);
    140141                RefreshRolelist();
    141142            }
     
    149150                User user = (User)dgvRoleAssignedUsers.SelectedRows[0].DataBoundItem;
    150151                Role role = (Role)bsRole.DataSource;
    151                
    152                 service.RemoveUserFromRole(role.RoleId, user.UserId);
    153                 RefreshRoleUserlist(role.RoleId);
     152
     153                service.RemoveUserFromRole(role.Id, user.Id);
     154                RefreshRoleUserlist(role.Id);
    154155            }
    155156        }
     
    160161            if (application != null)
    161162            {
    162                 applicationId = application.ApplicationId;
     163                applicationId = application.Id;
    163164                RefreshApplicationlist();
    164165            }
     
    173174                if (user != null)
    174175                {
    175                     service.DeleteUser(user.UserId);
     176                    service.DeleteUser(user.Id);
    176177                    RefreshUserlist();
    177178                }
Note: See TracChangeset for help on using the changeset viewer.