private List <PlanReportData> setPlanData(int reportTypeID) { int professionID = SessionWrapper.OrderDetail.ProfessionId; string[] requiredReport = { "Employment Verification", "Education Verification", "Reference Verification", "Driving Record", "KnowID Drug Test" }; List <PlanReportData> ReportList = new List <PlanReportData>(); Report requireReportData; PlanReportData ReportData; List <Report> reports = PlanHelper.GetReportListByReportTypeId(reportTypeID); List <Report> professioReportLists = PlanHelper.GetReportList(professionID, reportTypeID); foreach (string reportName in requiredReport) { foreach (Report profReportList in professioReportLists) { if (profReportList.Name == reportName) { if (hdnRequiredReport.Value == string.Empty) { hdnRequiredReport.Value = profReportList.Name; } else { hdnRequiredReport.Value = hdnRequiredReport.Value + "," + profReportList.Name; } } } } foreach (Report report in reports) { requireReportData = new Report(); ReportData = new PlanReportData(); ReportData.Name = report.Name; ReportData.Basic = false; foreach (Report profReportList in professioReportLists) { if (profReportList.Name == report.Name) { ReportData.Basic = true; requireReportData.Name = report.Name; basicReportList.Add(requireReportData); goldReportList.Add(requireReportData); PlatinumReportList.Add(requireReportData); } } ReportList.Add(ReportData); } return(ReportList); }
private List <PlanReportData> setCriminalPlanData(int reportTypeID) { int professionID = SessionWrapper.OrderDetail.ProfessionId; Report requireReportData; List <PlanReportData> ReportList = new List <PlanReportData>(); PlanReportData ReportData; List <Report> reports = PlanHelper.GetReportListByReportTypeId(reportTypeID); List <ReportList> PlanIdList = PlanHelper.GetPlanID(professionID); String[] strVal = String.Format("{0:0.00}", PlanIdList[0].Rate).Split(new char[] { '.' }, StringSplitOptions.None); lblBasicPrice.Text = strVal[0] + "." + strVal[1]; hdnBasicPlanID.Value = PlanIdList[0].PlanID.ToString(); basicPlanId = PlanIdList[0].PlanID; strVal = String.Format("{0:0.00}", PlanIdList[1].Rate).Split(new char[] { '.' }, StringSplitOptions.None); lblGoldPrice.Text = strVal[0] + "." + strVal[1]; hdnGoldPlanID.Value = PlanIdList[1].PlanID.ToString(); GoldPlanId = PlanIdList[1].PlanID; strVal = String.Format("{0:0.00}", PlanIdList[2].Rate).Split(new char[] { '.' }, StringSplitOptions.None); lblPlatniumPrice.Text = strVal[0] + "." + strVal[1]; hdnPlatinumPlanID.Value = PlanIdList[2].PlanID.ToString(); PlatniumPlanId = PlanIdList[2].PlanID; foreach (Report report in reports) { requireReportData = new Report(); ReportData = new PlanReportData(); ReportData.Name = report.Name; ReportData.Description = report.Description; ReportData.TurnaroundTime = "(" + report.TurnaroundTime + ")"; ReportData.Basic = false; ReportData.Gold = false; ReportData.Platinum = false; ReportData.Resume = false; if (PlanIdList[0].ReportNameList.Contains(report.Name)) { ReportData.Basic = true; requireReportData.Name = report.Name; basicReportList.Add(requireReportData); } if (PlanIdList[1].ReportNameList.Contains(report.Name)) { ReportData.Gold = true; requireReportData.Name = report.Name; goldReportList.Add(requireReportData); } if (PlanIdList[2].ReportNameList.Contains(report.Name)) { ReportData.Platinum = true; requireReportData.Name = report.Name; PlatinumReportList.Add(requireReportData); } if (ReportData.Basic == true || ReportData.Gold == true || ReportData.Platinum == true) { ReportList.Add(ReportData); } } if (reportTypeID == Constant.MISCELLANEOUS_REPORT_TYPE) { Report ResumeCheckerReport = PlanHelper.GetReportByReportID(Constant.RESUMECHECKER_REPORT_ID); PlanReportData PlanReportData = new Pages.PlanReportData(); PlanReportData.Resume = true; PlanReportData.Name = ResumeCheckerReport.Name; PlanReportData.Description = ResumeCheckerReport.Description; PlanReportData.TurnaroundTime = "(" + ResumeCheckerReport.TurnaroundTime + ")"; ReportList.Add(PlanReportData); } return(ReportList); }