GetManager() public static method

Return first manager from Managers which is an enumeration of instances of the Manager class.
public static GetManager ( ) : Manager
return Manager
Esempio n. 1
0
        public static void Run()
        {
            // ExStart:SingleRow
            // The path to the documents directory.
            string dataDir  = RunExamples.GetDataDir_LINQ();
            string fileName = "SingleRow.doc";
            // Load the template document.
            Document doc = new Document(dataDir + fileName);

            // Load the photo and read all bytes.
            byte[] imgdata = System.IO.File.ReadAllBytes(dataDir + "photo.png");

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

            // Execute the build report.
            engine.BuildReport(doc, Common.GetManager(), "manager");

            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);

            // Save the finished document to disk.
            doc.Save(dataDir);
            // ExEnd:SingleRow
            Console.WriteLine("\nSingle row template document is populated with the data about manager.\nFile saved at " + dataDir);
        }
        public static void Run()
        {
            // ExStart:InsertImagesDynamically
            // The path to the documents directory.
            string dataDir  = RunExamples.GetDataDir_LINQ();
            string fileName = "Image.doc";

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

            // Load the photo and read all bytes.
            byte[] imgdata = System.IO.File.ReadAllBytes(dataDir + "photo.png");

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

            // Execute the build report.
            engine.BuildReport(doc, Common.GetManager(), "manager");
            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
            doc.Save(dataDir);
            // ExEnd:HelloWorld
            Console.WriteLine("\nFile saved at " + dataDir);
        }