コード例 #1
0
        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);
        }