Esempio n. 1
0
        //public ReportWindow ()
        //{
        //    InitializeComponent();


        //}

        public ReportWindow(EnumHelper.WMIReportCategory inputCategory)
        {
            InitializeComponent();

            this.ReportCategory = inputCategory;

            this.Text = inputCategory.ToString() + " Reports";
        }
Esempio n. 2
0
        //String DomainName = String.Empty;
        //   String ServerName = String.Empty;
        //public String ReportGuid = ;


        public ReportWindow(EnumHelper.WMIReportCategory inputCategory, EnumHelper.Mode Mode = EnumHelper.Mode.Collection)
        {
            InitializeComponent();

            this.ReportCategory = inputCategory;

            this.ReportMode = Mode;

            this.Text = inputCategory.ToString() + " Reports";
        }
Esempio n. 3
0
        public Boolean InitManager(EnumHelper.WMIReportCategory reportCategory)
        {
            Boolean result = false;

            try
            {
                this.ReportCategory = reportCategory;

                ReportObject = new AMT.Manager.ReportManagers.InitializeWMICollection();

                GetTaskDetails(taskName);

                result = ReportObject.CollectReport(wmiMachineInfo);

                ExportInfo exportInfo = new ExportInfo()
                {
                    ReportDetails = new ReportInfo()
                    {
                        ExportFormat = EnumHelper.ExportFormat.HTML.ToString(), ReportName = ReportCategory.ToString(), GeneratorName = "Adminstrator", ProductName = "AMT", ReportDate = DateTime.Now.ToString(), ExportPath = Path.Combine(@"C:\Users\Public\Documents\AMT\Preview")
                    },
                    MachineInfo = wmiMachineInfo
                };


                exportInfo.ReportDetails.ExportPath = System.IO.Path.Combine(exportInfo.ReportDetails.ExportPath, Utility.GetTimeStamp());

                if (!System.IO.Directory.Exists(exportInfo.ReportDetails.ExportPath))
                {
                    System.IO.Directory.CreateDirectory(exportInfo.ReportDetails.ExportPath);
                }

                ReportObject.ExportReportData(exportInfo);
            }
            catch (Exception)
            {
                throw;
            }

            return(result);
        }