private MergeField FindFirstMergeFieldInAnnexTable() { return (AnnexMergeFields.Single( mf => mf.FieldName.OuterTypeName.Equals(TypeName, StringComparison.InvariantCultureIgnoreCase) && mf.FieldName.InnerTypeName.Equals("Order", StringComparison.InvariantCultureIgnoreCase))); }
protected MergeField FindFirstMergeFieldInAnnexTable() { return (AnnexMergeFields.Single( mf => mf.FieldName.OuterTypeName.Equals(TypeName, StringComparison.InvariantCultureIgnoreCase) && mf.FieldName.InnerTypeName.Equals("RegistrationNumber", StringComparison.InvariantCultureIgnoreCase))); }
protected void RemoveAnnex() { var field = AnnexMergeFields.Single( mf => mf.FieldName.InnerTypeName != null && mf.FieldName.InnerTypeName.Equals("Order")); var table = field.Run.Ancestors <Table>().First().Ancestors <Table>().First(); table.Remove(); }
protected void RemoveSiteOfGenerationTable() { MergeField f = AnnexMergeFields.Single( mf => mf.FieldName.OuterTypeName.Equals("SiteOfExport", StringComparison.InvariantCultureIgnoreCase) && mf.FieldName.InnerTypeName.Equals("RegistrationNumber", StringComparison.InvariantCultureIgnoreCase)); f.Run.Ancestors <Table>().First().Remove(); }
private MergeField FindFirstMergeFieldInTable(string id) { var mergeField = AnnexMergeFields.Single( mf => mf.FieldName.OuterTypeName.Equals(id, StringComparison.InvariantCultureIgnoreCase) && mf.FieldName.InnerTypeName.Equals("Name", StringComparison.InvariantCultureIgnoreCase)); return(mergeField); }
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); } }
protected IEnumerable <MergeField> FindProcessOfGenerationTextMergeFields() { return(AnnexMergeFields.Where(mf => !string.IsNullOrWhiteSpace(mf.FieldName.OuterTypeName) && mf.FieldName.OuterTypeName.Equals(PoGtext))); }
protected IEnumerable <MergeField> FindSiteOfExportMergeFields() { return(AnnexMergeFields.Where(mf => !string.IsNullOrWhiteSpace(mf.FieldName.OuterTypeName) && mf.FieldName.OuterTypeName.Equals(SiteOfExport))); }
protected MergeField FindAnnexNumberMergeField() { return(AnnexMergeFields.Single( mf => mf.FieldName.InnerTypeName != null && mf.FieldName.InnerTypeName.Equals("AnnexNumber"))); }