private async void AssignRole_Click(object sender, RoutedEventArgs e) { ProgressSpin.IsActive = true; if (RoleBox.SelectedIndex >= 0 && ConferencesBox.SelectedIndex >= 0 && LoginBox.Text.Length > 0) { if (await CheckAccountExistsAsync()) { if (await authCore.SetRoleForConferenceAndAccountAsync(((ConferenceDTO)ConferencesBox.SelectedItem).ConferenceId, LoginBox.Text, ((RoleDTO)RoleBox.SelectedItem).RoleId)) { MessageBox.Show("Success"); } else { MessageBox.Show("Failure"); } } else { MessageBox.Show("Account doesn't exists"); } } else { MessageBox.Show("Not enough data"); } ProgressSpin.IsActive = false; }
private async void AssignRole_Click(object sender, RoutedEventArgs e) { ProgressSpin.IsActive = true; if (RoleBox.SelectedIndex >= 0 && LoginBox.Text.Length > 0) { if (await CheckAccountExistsAsync()) { if (await authCore.SetRoleForConferenceAndAccountAsync(UserCredentials.Conference.ConferenceId, LoginBox.Text, int.Parse(RoleBox.SelectedValue.ToString()))) { MessageBox.Show("Success"); } else { MessageBox.Show("Failure"); } } else { MessageBox.Show("Account doesn't exists"); } } else { MessageBox.Show("Not enough data"); } ProgressSpin.IsActive = false; }