예제 #1
0
        public static void CreateVulnReport(DATA_TYPE fileType, List <PatchCountOfComplianceDto> data)
        {
            string fileName = GetDataTypeFileName(fileType, "VulnReport");

            if (!Directory.Exists(m_dataDirectory))
            {
                Directory.CreateDirectory(m_dataDirectory);
            }
            ReportWriter writer = new ReportWriter(fileName);

            if (fileType == DATA_TYPE.CSV)
            {
                WriteCSVVulnReport(data, writer);
                writer.StartFile();
            }

            if (fileType == DATA_TYPE.XLS)
            {
                WriteCSVVulnReport(data, writer);
                Process.Start(Environment.CurrentDirectory.ToString() + "\\bin\\convertVR.cmd", fileName);
            }

            if (fileType == DATA_TYPE.HTML)
            {
                WriteHTMLVulnReport(data, writer);
                Process.Start(fileName);
            }

            LoaderHelper.LoaderKill();
        }
예제 #2
0
        internal static void CreateComplianceStatusReport(DATA_TYPE fileType, List <ComputerOpenClosedStatDto> data)
        {
            string fileName = GetDataTypeFileName(fileType, "ComplianceStatusReport");

            if (!Directory.Exists(m_dataDirectory))
            {
                Directory.CreateDirectory(m_dataDirectory);
            }
            ReportWriter writer = new ReportWriter(fileName);

            if (fileType == DATA_TYPE.CSV)
            {
                WriteCSVFixedInPercent(data, writer);
                writer.StartFile();
            }

            if (fileType == DATA_TYPE.XLS)
            {
                WriteCSVFixedInPercent(data, writer);
                Process.Start(Environment.CurrentDirectory.ToString() + "\\bin\\convertFPercR.cmd", fileName);
            }

            if (fileType == DATA_TYPE.HTML)
            {
                WriteHTMLFixedInPercent(data, writer);
                Process.Start(fileName);
            }

            LoaderHelper.LoaderKill();
        }
예제 #3
0
        internal static void CreateLatestReport(DATA_TYPE fileType, List <PatchData> data)
        {
            string fileName = GetDataTypeFileName(fileType, "LatestSecurity");

            if (!Directory.Exists(m_dataDirectory))
            {
                Directory.CreateDirectory(m_dataDirectory);
            }

            var writer = new ReportWriter(fileName);

            if (fileType == DATA_TYPE.CSV)
            {
                WriteCSVLastestReport(data, writer);
                writer.StartFile();
            }

            if (fileType == DATA_TYPE.XLS)
            {
                WriteCSVLastestReport(data, writer);
                Process.Start(Environment.CurrentDirectory.ToString() + "\\bin\\convertLR.cmd", fileName);
            }

            if (fileType == DATA_TYPE.HTML)
            {
                WriteHTMLLatestReport(data, writer);
                Process.Start(fileName);
            }

            LoaderHelper.LoaderKill();
        }