Пример #1
0
 public virtual void PopulateDocument(IBaseTemplate template, string previousCoverPageTitle, string previousLogoTitle)
 {
     //populate the content controls
     BaseWizardPresenter.PopulateData(template);
     //change the graphics selected
     // if (Streams == null) return;
     BaseWizardPresenter.PopulateGraphics(template, previousCoverPageTitle, previousLogoTitle);
     BaseWizardPresenter.UpdateFields();
 }
Пример #2
0
        public void PopulateDocument(IBaseTemplate template, string previousCoverPageTitle, string previousLogoTitle, IDocument document)
        {
            var tmpPresenter = new BaseWizardPresenter(document, this);

            //populate the content controls
            tmpPresenter.PopulateData(template);
            //change the graphics selected
            // if (Streams == null) return;
            tmpPresenter.PopulateGraphics(template, previousCoverPageTitle, previousLogoTitle);
            tmpPresenter.UpdateFields();
            tmpPresenter.CreateOrUpdateDocumentProperty(Constants.WordDocumentProperties.DocumentGeneratedDate, DateTime.Now.ToString(CultureInfo.CurrentUICulture));
        }
Пример #3
0
        public virtual void PopulateDocument(IBaseTemplate template, string previousCoverPageTitle, string previousLogoTitle)
        {
            //populate the content controls
            BaseWizardPresenter.PopulateData(template);
            //change the graphics selected
            // if (Streams == null) return;
            BaseWizardPresenter.PopulateGraphics(template, previousCoverPageTitle, previousLogoTitle);
            BaseWizardPresenter.UpdateFields();
            var type = template.GetType();

            //var propertyName = Constants.WordDocumentProperties.UsedDateOfLogo;

            //if(key.Equals("Themes",StringComparison.OrdinalIgnoreCase))
            //    propertyName = Constants.WordDocumentProperties.UsedDateOfTheme;


            var date     = DateTime.Now.ToString("dd/MM/yy");
            var logoVal  = string.Format("{0};{1}", template.LogoImageUrl, date);
            var themeVal = string.Format("{0};{1}", template.CoverPageImageUrl, date);

            BaseWizardPresenter.CreateOrUpdateDocumentProperty(Constants.WordDocumentProperties.UsedDateOfLogo, logoVal);
            BaseWizardPresenter.CreateOrUpdateDocumentProperty(Constants.WordDocumentProperties.UsedDateOfTheme, themeVal);
            BaseWizardPresenter.CreateOrUpdateDocumentProperty(Constants.WordDocumentProperties.DocumentGeneratedDate, date);
        }