Exemplo n.º 1
0
 //public List<string> UserNames { get; set; }
 /// <summary>
 /// Handles the Click event of the btnAddNewUser control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.RoutedEventArgs" /> instance containing the event data.</param>
 private void btnAddNewUser_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     user                        = new AddEditUser();
     user.Mode                   = AddEditUser.ModeType.Add;
     user.SelectedOrg            = (OrganizationDto)cmbOrgName.SelectedItem;
     user.CUDUserCompletedEvent += new Client.Application.CUDUserCompletedEventHandler(CUDUserCompletedEvent);
     user.CUDUserFailedEvent    += new EventHandler(user_CUDUserFailedEvent);
     user.Closed                += new EventHandler(user_Closed);
     user.Show();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Edits the selected user.
 /// </summary>
 /// <param name="userDto">The user dto.</param>
 private void EditSelectedUser(UserDTO userDto)
 {
     user                        = new AddEditUser();
     user.Mode                   = AddEditUser.ModeType.Edit;
     user.SelectedOrg            = (OrganizationDto)cmbOrgName.SelectedItem;
     user.SelectedUserDto        = userDto;
     user.CUDUserCompletedEvent += new Client.Application.CUDUserCompletedEventHandler(CUDUserCompletedEvent);
     user.CUDUserFailedEvent    += new EventHandler(user_CUDUserFailedEvent);
     user.Closed                += new EventHandler(user_Closed);
     user.Show();
 }