示例#1
0
        public ManageAgreementWindowVm(Guid agreementId, ISeatQueries seatQueries,
                                       IApplicationService applicationService, IContactQueries contactQueries, IAgreementQueries agreementQueries,
                                       IComputerService computerService, IDocumentCreator documentCreator, IDocumentRepository documentRepository)
        {
            _agreementId        = agreementId;
            _applicationService = applicationService ?? throw new ArgumentNullException(nameof(applicationService));
            _seatQueries        = seatQueries ?? throw new ArgumentNullException(nameof(seatQueries));
            _contactQueries     = contactQueries ?? throw new ArgumentNullException(nameof(contactQueries));
            _documentCreator    = documentCreator ?? throw new ArgumentNullException(nameof(documentCreator));
            _documentRepository = documentRepository ?? throw new ArgumentNullException(nameof(documentRepository));
            _agreementQueries   = agreementQueries ?? throw new ArgumentNullException(nameof(agreementQueries));
            _computerService    = computerService ?? throw new ArgumentNullException(nameof(computerService));

            ChooseDocumentCommand         = new RelayCommand(ExecuteChooseDocumentAsync);
            PrintCommand                  = new RelayCommandAsync(ExecutePrintAsync);
            SendMailCommand               = new RelayCommandAsync(ExecuteSendEmailAsync);
            OpenSignedDocumentCommand     = new RelayCommandAsync(ExecuteOpenSignedDocumentAsync);
            ReassignSignedDocumentCommand = new RelayCommand(ExecuteReassignSignedDocument);
            RemindAgreementCommand        = new RelayCommandAsync(ExecuteRemingAgreementAsync);
            SavePricesCommand             = new RelayCommandAsync(ExecuteSavePricesAsync, () => CanSavePrices);

            SetValiderCommandCanExecute(() => File.Exists(DocumentPath));
        }
示例#2
0
 public CreateAgreement(EventBus eventBus, IAgreementQueries agreementQueries, INotificationQueries notificationQueries) : base(eventBus)
 {
     _agreementQueries    = agreementQueries ?? throw new ArgumentNullException(nameof(agreementQueries));
     _notificationQueries = notificationQueries ?? throw new ArgumentNullException(nameof(notificationQueries));
 }