public ApprovableOffhireDomainService(
     IOffhireDomainService offhireDomainService, IFinanceNotifier eventNotifier,
     ITankDomainService tankDomainService, ICurrencyDomainService currencyDomainService,
     IGoodDomainService goodDomainService, IGoodUnitDomainService goodUnitDomainService)
 {
     this.offhireDomainService = offhireDomainService;
     this.eventNotifier = eventNotifier;
     this.tankDomainService = tankDomainService;
     this.currencyDomainService = currencyDomainService;
     this.goodDomainService = goodDomainService;
     this.goodUnitDomainService = goodUnitDomainService;
 }
Example #2
0
        //================================================================================
        public void Submit(SubmittedState submittedState, IOffhireDomainService offhireDomainService, IFinanceNotifier eventNotifier,
            ITankDomainService tankDomainService, ICurrencyDomainService currencyDomainService,
            IGoodDomainService goodDomainService, IGoodUnitDomainService goodUnitDomainService)
        {
            this.validateToBeOpenOrSubmitRejected();

            this.validateApproveAction(offhireDomainService, tankDomainService, currencyDomainService, goodDomainService, goodUnitDomainService);

            //Perform Submit operations.
            eventNotifier.NotifySubmittingOffhire(this);

            this.setState(submittedState);
        }
Example #3
0
        //================================================================================
        public void Cancel(CancelledState cancelledState, IFinanceNotifier eventNotifier)
        {
            this.setState(cancelledState);

            eventNotifier.NotifyOffhireCancelled(this);
        }