private async void OnRemoveSeminarAttendeeBtnClick(object sender, System.EventArgs e) { var dialogResult = MessageBoxWrapper.Confirmation($"Are you sure you want to unregister attendee {_selectedAttendeeId}"); if (dialogResult == DialogResult.Yes) { await _commandService.UnRegisterAttendeeAsync(new UnRegisterAttendeeAtSeminar { Id = _seminarId, AttendeeId = _selectedAttendeeId }); } await RefreshTableAsync(); }
private async void OnFinishSessionBtnClick(object sender, EventArgs e) { var confirmed = MessageBoxWrapper.Confirmation("Are you sure you want to finish session?") == DialogResult.Yes; if (!confirmed) { return; } await _commandService.FinishAsync(new FinishSession { Id = _selectedSession.Id }); RefreshSeminars(); }
private async void OnStartSessionBtnClick(object sender, EventArgs e) { var confirmed = MessageBoxWrapper.Confirmation("Are you sure you want to start session?") == DialogResult.Yes; if (!confirmed) { return; } await _commandService.StartAsync(new StartSession { Id = _selectedSession.Id }).OnError(_ => MessageBoxWrapper.Error("Failed to start session")); var dashboardOpen = new SessionDashboardForm(_selectedSession.Id, _queryDao, _commandService, DependencyResolver.Resolve <IFingerprintVerifier>()); dashboardOpen.ShowDialog(); RefreshSeminars(); }
private async void OnOkClick(object sender, EventArgs e) { var attendeeToAdd = (AddSeminarAttendeesListItemDto)_selectedSeminarAttendee.Tag; var dialogResult = MessageBoxWrapper.Confirmation($"Are you sure you want to register attendee {attendeeToAdd.Id} in seminar"); if (dialogResult != DialogResult.Yes) { return; } await _commandService.RegisterAttendeeAsync(new RegisterAttendeeAtSeminar { Id = _seminarId, AttendeeId = attendeeToAdd.Id }) .OnSuccess(() => MessageBoxWrapper.Info("Attendee registered successfully")) .OnError(_ => MessageBoxWrapper.Error("Attendee registration failed")); Close(); }