GetManagers() public static method

Return an enumeration of instances of the Manager class.
public static GetManagers ( ) : IEnumerable
return IEnumerable
Exemplo n.º 1
0
        public static void Run()
        {
            // ExStart:CommonMasterDetail
            // The path to the documents directory.
            string dataDir  = RunExamples.GetDataDir_LINQ();
            string fileName = "CommonMasterDetail.doc";
            // Load the template document.
            Document doc = new Document(dataDir + fileName);

            // Create a Reporting Engine.
            ReportingEngine engine = new ReportingEngine();

            // Execute the build report.
            engine.BuildReport(doc, Common.GetManagers(), "managers");

            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);

            // Save the finished document to disk.
            doc.Save(dataDir);
            // ExEnd:CommonMasterDetail
            Console.WriteLine("\nCommon master detail template document is populated with the data about managers and it's contracts.\nFile saved at " + dataDir);
        }
Exemplo n.º 2
0
        public static void RemoveEmptyParagraphs()
        {
            //ExStart:RemoveEmptyParagraphs
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_LINQ();

            string fileName = "template_cleanup.docx";
            // Load the template document.
            Document doc = new Document(dataDir + fileName);

            // Create a Reporting Engine.
            ReportingEngine engine = new ReportingEngine();

            engine.Options = ReportBuildOptions.RemoveEmptyParagraphs;
            engine.BuildReport(doc, Common.GetManagers(), "managers");

            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
            // Save the finished document to disk.
            doc.Save(dataDir);
            //ExEnd:RemoveEmptyParagraphs
            Console.WriteLine("\nEmpty paragraphs are removed from the document successfully.\nFile saved at " + dataDir);
        }