Пример #1
0
        /// <summary>
        /// Refreshes the document using sample doc generator using databinding.
        /// </summary>
        private static void RefreshDocumentUsingSampleDocGeneratorUsingDatabinding()
        {
            // Test document refresh from template("Test_Template1_Databinding_Out_BeforeRefresh.docx")
            DocumentGenerationInfo generationInfo = GetDocumentGenerationInfo("SampleDocumentGeneratorUsingDatabinding", "1.0", GetDataContextRefresh(GetDataContext()),
                                                                              "Test_Template1_Databinding_Out_BeforeRefresh.docx", true);
            SampleDocumentGeneratorUsingDatabinding sampleDocumentGeneratorUsingDatabinding = new SampleDocumentGeneratorUsingDatabinding(generationInfo);

            byte[] result = sampleDocumentGeneratorUsingDatabinding.GenerateDocument();
            WriteOutputToFile("Test_Template1_Databinding_Out_AfterRefresh.docx", "Test_Template1_Databinding_Out_BeforeRefresh.docx", result);
        }
Пример #2
0
 /// <summary>
 /// Refreshes the document using sample doc generator using databinding.
 /// </summary>
 private static void RefreshDocumentUsingSampleDocGeneratorUsingDatabinding()
 {
     // Test document refresh from template("Test_Template1_Databinding_Out_BeforeRefresh.docx")
     DocumentGenerationInfo generationInfo = GetDocumentGenerationInfo("SampleDocumentGeneratorUsingDatabinding", "1.0", GetDataContextRefresh(GetDataContext()),
                                             "Test_Template1_Databinding_Out_BeforeRefresh.docx", true);
     SampleDocumentGeneratorUsingDatabinding sampleDocumentGeneratorUsingDatabinding = new SampleDocumentGeneratorUsingDatabinding(generationInfo);
     byte[] result = sampleDocumentGeneratorUsingDatabinding.GenerateDocument();
     WriteOutputToFile("Test_Template1_Databinding_Out_AfterRefresh.docx", "Test_Template1_Databinding_Out_BeforeRefresh.docx", result);
 }