- Timestamp:
- 11/14/10 10:51:43 (14 years ago)
- 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 64 64 <Name>HeuristicLab.Services.Authentication.DataTransfer</Name> 65 65 </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>70 66 </ItemGroup> 71 67 <ItemGroup> -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs
r4740 r4789 49 49 this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 50 50 this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); 51 this.Membership = new System.Windows.Forms.DataGridViewTextBoxColumn();51 52 52 this.bsUsers = new System.Windows.Forms.BindingSource(this.components); 53 53 this.tcUser = new System.Windows.Forms.TabControl(); … … 290 290 this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 291 291 this.userNameDataGridViewTextBoxColumn, 292 this.isAnonymousDataGridViewCheckBoxColumn, 293 this.Membership}); 292 this.isAnonymousDataGridViewCheckBoxColumn}); 294 293 this.dgvUsers.DataSource = this.bsUsers; 295 294 this.dgvUsers.Location = new System.Drawing.Point(3, 45); … … 311 310 this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous"; 312 311 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 321 313 // 322 314 // bsUsers … … 356 348 this.tabPage3.Text = "Detail"; 357 349 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 366 351 // 367 352 // bsUser … … 369 354 this.bsUser.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User); 370 355 // 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 378 357 // 379 358 // passwordTextBox … … 743 722 private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn; 744 723 private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn; 745 private System.Windows.Forms.DataGridViewTextBoxColumn Membership; 724 746 725 } 747 726 } -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs
r4740 r4789 31 31 { 32 32 33 33 34 34 RefreshApplicationlist(); 35 35 } … … 61 61 { 62 62 // show detail 63 if(dgvUsers.SelectedRows.Count == 1){ 63 if (dgvUsers.SelectedRows.Count == 1) 64 { 64 65 User user = (User)dgvUsers.SelectedRows[0].DataBoundItem; 65 66 bsUser.DataSource = user; 66 bsUserRoles.DataSource = service.GetRolesForUser(user. UserId);67 bsUserRoles.DataSource = service.GetRolesForUser(user.Id); 67 68 tcUser.Enabled = false; 68 69 } … … 73 74 if (dgvRoles.SelectedRows.Count == 1) 74 75 { 75 Role role = (Role) 76 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem; 76 77 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); 79 80 btnDeleteRole.Enabled = true; 80 81 tcRole.Enabled = true; … … 105 106 service.InsertUser(user); 106 107 RefreshUserlist(); 107 108 108 109 } 109 110 110 111 private void btnSaveRole_Click(object sender, EventArgs e) 111 112 { 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(); 117 118 } 118 119 119 120 120 121 121 122 private void btnAddUserToRole_Click(object sender, EventArgs e) … … 127 128 role.ApplicationId = applicationId; 128 129 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); 131 132 } 132 133 } … … 137 138 { 138 139 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem; 139 service.DeleteRole(role. RoleId);140 service.DeleteRole(role.Id); 140 141 RefreshRolelist(); 141 142 } … … 149 150 User user = (User)dgvRoleAssignedUsers.SelectedRows[0].DataBoundItem; 150 151 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); 154 155 } 155 156 } … … 160 161 if (application != null) 161 162 { 162 applicationId = application. ApplicationId;163 applicationId = application.Id; 163 164 RefreshApplicationlist(); 164 165 } … … 173 174 if (user != null) 174 175 { 175 service.DeleteUser(user. UserId);176 service.DeleteUser(user.Id); 176 177 RefreshUserlist(); 177 178 }
Note: See TracChangeset
for help on using the changeset viewer.