public TransitStatesBlock(IList <MergeField> mergeFields, TransportRoute transportRoute) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new TransitStateViewModel(transportRoute.TransitStates.ToList()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public OperationBlock(IList <MergeField> mergeFields, NotificationApplication notification, TechnologyEmployed technologyEmployed) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new OperationViewModel(notification, technologyEmployed, new OperationInfoFormatter()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public WasteCodesBlock(IList <MergeField> mergeFields, NotificationApplication notification) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new WasteCodesViewModel(notification, new WasteCodeInfoFormatter()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public WasteRecoveryBlock(IList <MergeField> mergeFields, NotificationApplication notification, WasteRecovery wasteRecovery, WasteDisposal wasteDisposal) { AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new WasteRecoveryViewModel(notification, wasteRecovery, wasteDisposal, new WasteRecoveryFormatter()); if (notification.NotificationType == NotificationType.Disposal) { HasAnnex = false; MergeMainDocumentBlock(); } else { HasAnnex = true; if (notification.WasteRecoveryInformationProvidedByImporter.GetValueOrDefault()) { HasAnnex = false; MergeMainDocumentBlock(); } } }
public CarrierBlock(IList <MergeField> mergeFields, MeansOfTransport meansOfTransport, CarrierCollection carrierCollection) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = CarrierViewModel.CreateCarrierViewModelsForNotification(meansOfTransport, carrierCollection, new MeansOfTransportFormatter()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public CustomsOfficeBlock(IList <MergeField> mergeFields, TransportRoute transportRoute, UKCompetentAuthority notificationCompetentAuthority) { IsNorthenIrelandCompetentAuthority = (notificationCompetentAuthority.Equals(UKCompetentAuthority.NorthernIreland) ? true : false); CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new CustomsOfficeViewModel(transportRoute); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }
public WasteCompositionBlock(IList <MergeField> mergeFields, NotificationApplication notification) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new WasteCompositionViewModel(notification.WasteType, new WasteCompositionFormatter()); //Set annex merge fields AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); ((List <MergeField>)AnnexMergeFields).AddRange(MergeFieldLocator.GetAnnexMergeFields(mergeFields, Parameters)); ((List <MergeField>)AnnexMergeFields).AddRange(MergeFieldLocator.GetAnnexMergeFields(mergeFields, Constituents)); }
public FacilityBlock(IList <MergeField> mergeFields, FacilityCollection facilityCollection) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); var numberOfFacilities = facilityCollection.Facilities.Count(); data = facilityCollection.Facilities.Select(p => new FacilityViewModel(p, numberOfFacilities)).ToList(); //The facility annex contains a set of different merge fields for facility marked as Actual Site of Treatment. AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); ((List <MergeField>)AnnexMergeFields).AddRange(MergeFieldLocator.GetAnnexMergeFields(mergeFields, ActualSiteOfTreatment)); }
public ProducerBlock(IList <MergeField> mergeFields, NotificationApplication notification, ProducerCollection producerCollection) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); var numberOfProducers = producerCollection.Producers.Count(); var processText = notification.WasteGenerationProcess; var isProcessAnnexAttached = notification.IsWasteGenerationProcessAttached; data = producerCollection.Producers.Select(p => new ProducerViewModel(p, numberOfProducers, processText, isProcessAnnexAttached)).ToList(); // The producers annex contains a set of different merge fields for producer marked as Site of Export. AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); ((List <MergeField>)AnnexMergeFields).AddRange(MergeFieldLocator.GetAnnexMergeFields(mergeFields, SiteOfExport)); ((List <MergeField>)AnnexMergeFields).AddRange(MergeFieldLocator.GetAnnexMergeFields(mergeFields, PoGtext)); }
public SpecialHandlingBlock(IList <MergeField> mergeFields, NotificationApplication notification) { data = new SpecialHandlingViewModel(notification); CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, SpecialHandling); }
public MovementCarrierBlock(IList <MergeField> mergeFields, IEnumerable <MovementCarrier> movementCarriers) { CorrespondingMergeFields = MergeFieldLocator.GetCorrespondingFieldsForBlock(mergeFields, TypeName); data = new MovementCarriersViewModel(movementCarriers.ToList()); AnnexMergeFields = MergeFieldLocator.GetAnnexMergeFields(mergeFields, TypeName); }