public SeatsWindowVm(Guid sessionId, int sessionPlaces, ISeatQueries seatQueries, ICompanyQueries companyQueries, IStudentQueries studentQueries, IApplicationService applicationService, ISessionQueries sessionQueries) { _sessionId = sessionId; _sessionPlaces = sessionPlaces; _applicationService = applicationService ?? throw new ArgumentNullException(nameof(applicationService)); _sessionQueries = sessionQueries ?? throw new ArgumentNullException(nameof(sessionQueries)); _companyQueries = companyQueries ?? throw new ArgumentNullException(nameof(companyQueries)); _studentQueries = studentQueries ?? throw new ArgumentNullException(nameof(studentQueries)); _seatQueries = seatQueries ?? throw new ArgumentNullException(nameof(seatQueries)); AddSeatCommand = new RelayCommandAsync(() => ExecuteAddSeatAsync(false), () => SelectedCompany != null); AddValidatedSeatCommand = new RelayCommandAsync(() => ExecuteAddSeatAsync(true), () => SelectedCompany != null && SelectedStudent != null); CreateStudentCommand = new RelayCommandAsync(ExecuteCreateStudentAsync); CreateCompanyCommand = new RelayCommandAsync(ExecuteCreateSocieteAsync); SelectedSeats = new ObservableCollection <SeatItem>(); SelectedSeats.CollectionChanged += (sender, args) => { CancelSeatCommand.RaiseCanExecuteChanged(); ValidateSeatCommand.RaiseCanExecuteChanged(); RefuseSeatCommand.RaiseCanExecuteChanged(); }; CancelSeatCommand = new RelayCommandAsync(ExecuteCancelSeatAsync, () => SelectedSeats.Any()); ValidateSeatCommand = new RelayCommandAsync(ExecuteValidateSeatAsync, () => SelectedSeats.Any()); RefuseSeatCommand = new RelayCommandAsync(ExecuteRefuseSeatAsync, () => SelectedSeats.Any()); RefreshSeatsCommand = new RelayCommandAsync(ExecuteRefreshSeatsAsync); DefineStudentCommand = new RelayCommand(() => { DefineStudent = !DefineStudent; SelectedStudent = null; }); EditStudentCommand = new RelayCommandAsync(ExecuteEditStudentAsync); GenerateAgreementCommand = new RelayCommandAsync(ExecuteGenerateAgreementAsync); OpenAgreementCommand = new RelayCommandAsync(ExecuteOpenAgreementAsync); Security = new Security(applicationService); }
public TrainingFlowWindowVm(ISeatQueries seatQueries, Guid sessionId, IDocumentCreator documentCreator, ISessionQueries sessionQueries, IApplicationService applicationService, IComputerService computerService) { _seatQueries = seatQueries ?? throw new ArgumentNullException(nameof(seatQueries)); _sessionId = sessionId; _documentCreator = documentCreator ?? throw new ArgumentNullException(nameof(documentCreator)); _sessionQueries = sessionQueries ?? throw new ArgumentNullException(nameof(sessionQueries)); _applicationService = applicationService ?? throw new ArgumentNullException(nameof(applicationService)); _computerService = computerService ?? throw new ArgumentNullException(nameof(computerService)); RefreshCommand = new RelayCommandAsync(ExecuteRefreshAsync); SelectedSeats = new ObservableCollection <ISeatValidatedResult>(); SelectedSeats.CollectionChanged += (sender, args) => { PrintCertificatOfAttendanceCommand.RaiseCanExecuteChanged(); PrintSurveyCommand.RaiseCanExecuteChanged(); PrintDegreeCommand.RaiseCanExecuteChanged(); MissingCommand.RaiseCanExecuteChanged(); }; PrintTimesheetCommand = new RelayCommand(ExecutePrintFeuillePresence); PrintCertificatOfAttendanceCommand = new RelayCommand(ExecutePrintCertificatAssiduite, () => SelectedSeats.Any()); PrintSurveyCommand = new RelayCommand(ExecutePrintQuestionnaire, () => SelectedSeats.Any()); PrintDegreeCommand = new RelayCommand(ExecutePrintDiplome, () => SelectedSeats.Any()); MissingCommand = new RelayCommandAsync(ExecuteAbsenceAsync, () => SelectedSeats.Any()); PrintAllDocumentCommand = new RelayCommandAsync(ExecutePrintAllDocumentAsync); }
public SessionReadService(ISessionQueries queries) { SessionWriteService repository = new SessionWriteService(); _repository = repository; _query = queries; }
public SessionSchedulerVm(IApplicationService applicationService, ISessionQueries sessionQueries) { _sessionQueries = sessionQueries ?? throw new ArgumentNullException(nameof(sessionQueries)); _applicationService = applicationService ?? throw new ArgumentNullException(nameof(applicationService)); CreateSession = new RelayCommandAsync <AppointmentItemEventArgs>(ExecuteCreateSessionAsync); LoadCommand = new RelayCommandAsync(ExecuteLoadAsync); SelectedSessions = new ObservableCollection <SessionItem>(); DeleteCommand = new RelayCommandAsync(ExecuteDeleteCommandAsync, () => SelectedSessions.Any()); EditCommand = new RelayCommandAsync(ExecuteEditCommandAsync, () => SelectedSessions.Any()); OpenPlacesCommand = new RelayCommandAsync(ExecutePlacesAsync, () => SelectedSessions.Any()); OpenDeroulementCommand = new RelayCommandAsync(ExecuteOpenDeroulementAsync, () => SelectedSessions.Any()); OpenClotureCommand = new RelayCommandAsync(ExecuteOpenClotureAsync, () => SelectedSessions.Any()); SelectedSessions.CollectionChanged += (sender, args) => { DeleteCommand.RaiseCanExecuteChanged(); EditCommand.RaiseCanExecuteChanged(); OpenPlacesCommand.RaiseCanExecuteChanged(); OpenDeroulementCommand.RaiseCanExecuteChanged(); OpenClotureCommand.RaiseCanExecuteChanged(); }; DropSession = new RelayCommandAsync <SessionDropped>(ExecuteDropSessionAsync); Security = new Security(applicationService); }
public SessionsController(IEventQueriesFactory queriesFactory, IEventActionsFactory actionsFactory, IMapper mapper) { _mapper = mapper; _sessionsQueries = queriesFactory.SessionQueries(); _sessionsActions = actionsFactory.SessionActions(); }
public DeleteTraining(EventBus eventBus, ISessionQueries sessionQueries) : base(eventBus) { _sessionQueries = sessionQueries ?? throw new ArgumentNullException(nameof(sessionQueries)); }
public SessionListerVm(IApplicationService applicationService, ISessionQueries sessionQueries) : base(applicationService) { _sessionQueries = sessionQueries; }