Ejemplo n.º 1
0
        public FuelReport()
        {
            this.isFuelReportClosed = new IsFuelReportClosed();

            this.isFuelReportOpen = new IsFuelReportOpen();

            this.isFuelReportWaitingToBeClosed = new IsFuelReportWaitingToBeClosed();

            this.isFuelReportOperational = new IsFuelReportOperational();
            this.isFuelReportNotCancelled = new IsFuelReportNotCancelled();
            this.isFuelReportSubmitRejected = new IsFuelReportSubmitRejected();
            this.isFuelReportSubmitted = new IsFuelReportSubmitted();

            this.ApproveWorkFlows = new List<FuelReportWorkflowLog>();
            this.FuelReportDetails = new Collection<FuelReportDetail>();
            ConsumptionInventoryOperations = new List<InventoryOperation>();
        }
 public FuelReportDomainService(
     IFuelReportRepository fuelReportRepository,
     IVoyageDomainService voyageDomainService,
     IInventoryOperationDomainService inventoryOperationDomainService,
     IInventoryOperationRepository inventoryOperationRepository,
     IInventoryOperationFactory inventoryOperationFactory,
     IOrderDomainService orderDomainService,
     IInventoryManagementDomainService inventoryManagementDomainService,
     ICharteringDomainService charteringDomainService)
 {
     this.fuelReportRepository = fuelReportRepository;
     this.voyageDomainService = voyageDomainService;
     this.inventoryOperationDomainService = inventoryOperationDomainService;
     this.inventoryOperationRepository = inventoryOperationRepository;
     this.inventoryOperationFactory = inventoryOperationFactory;
     this.orderDomainService = orderDomainService;
     this.inventoryManagementDomainService = inventoryManagementDomainService;
     this.charteringDomainService = charteringDomainService;
     this.isFuelReportNotCancelled = new IsFuelReportNotCancelled();
     this.isFuelReportIssued = new IsFuelReportIssued(inventoryOperationDomainService);
     this.isFuelReportInFinalApprovedState = new IsFuelReportClosed();
     this.isFuelReportOperational = new IsFuelReportOperational();
     isFuelReportSubmitted = new IsFuelReportSubmitted();
 }
Ejemplo n.º 3
0
        public FuelReport GetVoyageValidEndOfVoyageFuelReport(long voyageId)
        {
            var isFuelReportNotCancelled = new IsFuelReportNotCancelled();

            var endOfVoyageFuelReport = this.fuelReportRepository.First(
                Extensions.And(isFuelReportNotCancelled.Predicate, fr => fr.FuelReportType == FuelReportTypes.EndOfVoyage &&
                        voyageId == fr.VoyageId));

            return endOfVoyageFuelReport;
        }