private void GenerateExcel(string val) { var obj = new OperationFunctions(); List <CurrScanDTO > List = new List <CurrScanDTO>(); switch (int.Parse(val)) { case 1: List = obj.GenerateRegularScanReport(int.Parse(drpScanList.SelectedValue)); if (List.Count > 0) { ShowExcelFile(List, "GenerateRegularScanReport"); } else { lblNoRecords.Visible = true; } break; case 2: List = obj.GenerateComplianceScanReport(int.Parse(drpScanList.SelectedValue)); if (List.Count > 0) { ShowExcelFile(List, "Generate Compliance Scan Report"); } else { lblNoRecords.Visible = true; } break; case 3: // obj.GenerateVulnerabilityScanReport(int.Parse(drpScanList.SelectedValue)); //if (List.Count > 0) // ShowExcelFile(List, "Generate Vulnerabilities Not Reported-1"); //else // lblNoRecords.Visible = true; break; case 4: List = obj.NewPluginOutputVarianceSecond(int.Parse(drpScanList.SelectedValue)); if (List.Count > 0) { ShowExcelFile(List, "PluginOutputVariance-2"); } else { lblNoRecords.Visible = true; } break; default: break; } }
private void GenerateExcel(string val) { var obj = new OperationFunctions(); List <CurrScanDTO> List = new List <CurrScanDTO>(); switch (int.Parse(val)) { case 1: var ListOfPlugin = obj.NewRegularScan(int.Parse(drpScanList.SelectedValue)); if (ListOfPlugin.Count > 0) { ShowExcelFile(ListOfPlugin, "NewPluginData"); } else { lblNoRecords.Visible = true; } break; case 2: var ListOfComp = obj.NewComplianceData(int.Parse(drpScanList.SelectedValue)); if (ListOfComp.Count > 0) { ShowExcelFile(ListOfComp, "NewComplianceData"); } else { lblNoRecords.Visible = true; } break; case 3: List = obj.NewPluginOutputVarianceFirst(int.Parse(drpScanList.SelectedValue)); if (List.Count > 0) { ShowExcelFile(List, "PluginOutputVariance-1"); } else { lblNoRecords.Visible = true; } break; case 4: List = obj.NewPluginOutputVarianceSecond(int.Parse(drpScanList.SelectedValue)); if (List.Count > 0) { ShowExcelFile(List, "PluginOutputVariance-2"); } else { lblNoRecords.Visible = true; } break; default: break; } }