Exemplo n.º 1
0
 private MergeField FindFirstMergeFieldInAnnexTable()
 {
     return
         (AnnexMergeFields.Single(
              mf => mf.FieldName.OuterTypeName.Equals(TypeName, StringComparison.InvariantCultureIgnoreCase) &&
              mf.FieldName.InnerTypeName.Equals("Order",
                                                StringComparison.InvariantCultureIgnoreCase)));
 }
Exemplo n.º 2
0
 protected MergeField FindFirstMergeFieldInAnnexTable()
 {
     return
         (AnnexMergeFields.Single(
              mf => mf.FieldName.OuterTypeName.Equals(TypeName, StringComparison.InvariantCultureIgnoreCase) &&
              mf.FieldName.InnerTypeName.Equals("RegistrationNumber",
                                                StringComparison.InvariantCultureIgnoreCase)));
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
            }
        }
Exemplo n.º 7
0
 protected IEnumerable <MergeField> FindProcessOfGenerationTextMergeFields()
 {
     return(AnnexMergeFields.Where(mf => !string.IsNullOrWhiteSpace(mf.FieldName.OuterTypeName) &&
                                   mf.FieldName.OuterTypeName.Equals(PoGtext)));
 }
Exemplo n.º 8
0
 protected IEnumerable <MergeField> FindSiteOfExportMergeFields()
 {
     return(AnnexMergeFields.Where(mf => !string.IsNullOrWhiteSpace(mf.FieldName.OuterTypeName) &&
                                   mf.FieldName.OuterTypeName.Equals(SiteOfExport)));
 }
Exemplo n.º 9
0
 protected MergeField FindAnnexNumberMergeField()
 {
     return(AnnexMergeFields.Single(
                mf => mf.FieldName.InnerTypeName != null && mf.FieldName.InnerTypeName.Equals("AnnexNumber")));
 }