protected void MergeSiteOfExportInAnnex(ProducerViewModel siteOfExportProducer, PropertyInfo[] properties) { foreach (var mergeField in FindSiteOfExportMergeFields()) { MergeFieldDataMapper.BindCorrespondingField(mergeField, siteOfExportProducer, properties); } }
private void MergeToTable(PropertyInfo[] properties) { var mergeTableRows = new TableRow[data.TransitStateDetails.Count]; // Find both the first row in the multiple producers table and the table itself. var firstMergeFieldInTable = FindFirstMergeFieldInAnnexTable(); var table = FindAnnexTable(firstMergeFieldInTable); // Get the table row containing the merge fields. mergeTableRows[0] = firstMergeFieldInTable.Run.Ancestors <TableRow>().First(); // Create a row containing merge fields for each of the producers. for (var i = 1; i < data.TransitStateDetails.Count; i++) { mergeTableRows[i] = (TableRow)mergeTableRows[0].CloneNode(true); table.AppendChild(mergeTableRows[i]); } // Merge the producers into the table rows. for (var i = 0; i < mergeTableRows.Length; i++) { foreach (var field in MergeFieldLocator.GetMergeRuns(mergeTableRows[i])) { MergeFieldDataMapper.BindCorrespondingField( MergeFieldLocator.ConvertAnnexMergeFieldToRegularMergeField(field), data.TransitStateDetails[i], properties); } } }
private void MergeCarriersToMainDocument(CarrierViewModel carrier, PropertyInfo[] properties) { foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, carrier, properties); } }
private void MergeCarriersTable() { var mergeTableRows = new TableRow[data.CarrierDetails.Count]; var properties = PropertyHelper.GetPropertiesForViewModel(typeof(MovementCarrierDetails)); // Find both the first row in the multiple carriers table and the table itself. var firstMergeFieldInTable = FindFirstMergeFieldInAnnexTable(); var table = FindMultipleCarriersTable(firstMergeFieldInTable); // Get the table row containing the merge fields. mergeTableRows[0] = firstMergeFieldInTable.Run.Ancestors <TableRow>().First(); // Create a row containing merge fields for each of the Carriers. for (var i = 1; i < data.CarrierDetails.Count; i++) { mergeTableRows[i] = (TableRow)mergeTableRows[0].CloneNode(true); table.AppendChild(mergeTableRows[i]); } // Merge the carriers into the table rows. for (var i = 0; i < mergeTableRows.Length; i++) { foreach (var field in MergeFieldLocator.GetMergeRuns(mergeTableRows[i])) { MergeFieldDataMapper.BindCorrespondingField( MergeFieldLocator.ConvertAnnexMergeFieldToRegularMergeField(field), data.CarrierDetails[i], properties); } } }
protected void MergeActualSiteOfTreatmentInAnnex(FacilityViewModel actualSiteOfTreatmentFacility, PropertyInfo[] properties) { foreach (var mergeField in FindActualSiteOfTreatmentMergeFields()) { MergeFieldDataMapper.BindCorrespondingField(mergeField, actualSiteOfTreatmentFacility, properties); } }
private void MergeTransportToMainDocument(TransportViewModel transport, PropertyInfo[] properties) { foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, transport, properties); } }
protected void MergeProducerToMainDocument(ProducerViewModel producer, PropertyInfo[] properties) { foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, producer, properties); } }
protected void MergeFacilityToMainDocument(FacilityViewModel facility, PropertyInfo[] properties) { foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, facility, properties); } }
private void MergeToMainDocument() { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(TransitStateViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } }
public void Merge() { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(ImporterViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } }
private void MergeMainDocumentBlock() { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(WasteRecoveryViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } }
protected void MergeProcessOfGenerationTextInAnnex(ProducerViewModel pvm, PropertyInfo[] proerties) { if (pvm.IsProcessAnnexAttached.GetValueOrDefault() || (pvm.ProcessOfGeneration.Length > ProducerViewModel.ProcessOfGenerationMaxTextLength())) { foreach (var mergeField in FindProcessOfGenerationTextMergeFields()) { MergeFieldDataMapper.BindCorrespondingField(mergeField, pvm, proerties); } } }
protected void MergeToMainDocument(int annexNumber) { data.SetAnnexMessagesAndData(annexNumber); var properties = PropertyHelper.GetPropertiesForViewModel(typeof(WasteCodesViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } }
public void Merge() { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(NumberOfAnnexesAndInstructionsAndToCViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } RemoveInstructionsTableIfEmpty(); }
public override void Merge() { if (!HasAnnex) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(OperationViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, Data, properties); } } }
private void MergeToMainDocument(int annexNumber) { data.SetAnnexMessages(annexNumber); data.SetDisplayCustomsOfficeDetails(IsNorthenIrelandCompetentAuthority); var properties = PropertyHelper.GetPropertiesForViewModel(typeof(CustomsOfficeViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } }
protected void MergeSpecialHandlingDataToDocument(SpecialHandlingViewModel specialHandling, PropertyInfo[] properties) { foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, specialHandling, properties); } foreach (var annexField in AnnexMergeFields) { MergeFieldDataMapper.BindCorrespondingField(annexField, specialHandling, properties); } }
protected void MergeOperationToMainDocument(int annexNumber) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(OperationViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, new OperationViewModel(data, annexNumber), properties); } foreach (var annexMergeField in AnnexMergeFields) { MergeFieldDataMapper.BindCorrespondingField(annexMergeField, data, properties); } }
public void Merge() { if (!HasAnnex) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(CustomsOfficeViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } RemoveAnnex(); } }
public virtual void Merge() { if (!HasAnnex) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(WasteCompositionViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } RemoveAnnex(); } }
public void GenerateAnnex(int annexNumber) { MergeToMainDocument(annexNumber); TocText = "Annex " + annexNumber + " - Customs offices"; var properties = PropertyHelper.GetPropertiesForViewModel(typeof(CustomsOfficeViewModel)); foreach (var field in AnnexMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } MergeAnnexNumber(annexNumber); }
protected void MergeToMainDocument(int annexNumber) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(WasteCompositionViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, new WasteCompositionViewModel(data, annexNumber), properties); } var nonTableAnnexMergeFields = AnnexMergeFields.Where(f => !(f.FieldName.ToString().Contains("Parameters") || f.FieldName.ToString().Contains("Constituents"))); foreach (var annexMergeField in nonTableAnnexMergeFields) { MergeFieldDataMapper.BindCorrespondingField(annexMergeField, data, properties); } }
public void GenerateAnnex(int annexNumber) { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(WasteRecoveryViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, new WasteRecoveryViewModel(data, annexNumber), properties); } foreach (var annexMergeField in AnnexMergeFields) { MergeFieldDataMapper.BindCorrespondingField(annexMergeField, data, properties); } MergeAnnexNumber(annexNumber); TocText = "Annex " + annexNumber + " - Genuine recovery information"; }
public void Merge() { var properties = PropertyHelper.GetPropertiesForViewModel(typeof(MovementCarriersViewModel)); foreach (var field in CorrespondingMergeFields) { MergeFieldDataMapper.BindCorrespondingField(field, data, properties); } if (HasAnnex) { MergeCarriersTable(); } else { RemoveAnnex(); } }
protected void MergeMultipleFacilitiesTable(PropertyInfo[] properties) { var mergeTableRows = new TableRow[data.Count]; var firstMergeFieldInTable = FindFirstMergeFieldInAnnexTable(); var table = FindMultipleFacilitiesTable(firstMergeFieldInTable); // Get the table row containing the merge fields. mergeTableRows[0] = firstMergeFieldInTable.Run.Ancestors <TableRow>().First(); for (var i = 1; i < data.Count; i++) { mergeTableRows[i] = (TableRow)mergeTableRows[0].CloneNode(true); table.AppendChild(mergeTableRows[i]); } for (var i = 0; i < mergeTableRows.Length; i++) { foreach (var field in MergeFieldLocator.GetMergeRuns(mergeTableRows[i])) { MergeFieldDataMapper.BindCorrespondingField( MergeFieldLocator.ConvertAnnexMergeFieldToRegularMergeField(field), data[i], properties); } } }
private void MergeToTable(PropertyInfo[] properties, IList <ChemicalCompositionPercentages> list, string tableName) { var mergeTableRows = new TableRow[list.Count()]; var firstMergeFieldInTable = FindFirstMergeFieldInTable(tableName); var table = FindTable(firstMergeFieldInTable); mergeTableRows[0] = firstMergeFieldInTable.Run.Ancestors <TableRow>().First(); for (var i = 1; i < list.Count(); i++) { mergeTableRows[i] = (TableRow)mergeTableRows[0].CloneNode(true); table.AppendChild(mergeTableRows[i]); } for (var i = 0; i < mergeTableRows.Length; i++) { foreach (var field in MergeFieldLocator.GetMergeRuns(mergeTableRows[i])) { MergeFieldDataMapper.BindCorrespondingField( MergeFieldLocator.ConvertAnnexMergeFieldToRegularMergeField(field), list[i], properties); } } }