public static void SetAdditionalInfoRequire(string planName, int professionId)
        {
            SessionWrapper.OrderDetail = new OrderDetails();

            if (planName == "Basic")
            {
                SessionWrapper.OrderDetail.PlanId = basicPlanId;
            }
            else if (planName == "Gold")
            {
                SessionWrapper.OrderDetail.PlanId = GoldPlanId;
            }
            else if (planName == "Platnium")
            {
                SessionWrapper.OrderDetail.PlanId = PlatniumPlanId;
            }

            List <Report> reports = PlanHelper.GetPlanReports(SessionWrapper.OrderDetail.PlanId);

            SessionWrapper.RequiredInformation = null;
            SessionWrapper.RequiredInformation = new RequiredInformation();
            SessionWrapper.RequiredInformation.isEmploymentDetailsRequired    = reports.IsEmpInfoRequired();
            SessionWrapper.RequiredInformation.isEducationDetailsRequired     = reports.IsEduInfoRequired();
            SessionWrapper.RequiredInformation.isLicenseInformationRequired   = reports.IsLicInfoRequired();
            SessionWrapper.RequiredInformation.isReferenceInformationRequired = reports.IsRefInfoRequired();
            SessionWrapper.RequiredInformation.isDrugVerificationRequired     = reports.IsDrugVerificationRequired();


            if (professionId != 0)
            {
                SessionWrapper.OrderDetail.ProfessionId = professionId;
            }

            SessionWrapper.ModuleName = Constant.SECURE_JOB;
        }
        private bool IsSSNVisible()
        {
            int[] reportLst = { 2, 3, 4, 5, 14, 15, 17, 19, 20, 21 };

            foreach (int loopCount in SessionWrapper.AlacartReportList)
            {
                if (!reportLst.Contains(loopCount))
                {
                    return(true);
                }
            }

            if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
            {
                List <Report> selectedReportLst = PlanHelper.GetPlanReports(SessionWrapper.OrderDetail.PlanId);
                foreach (Report report in selectedReportLst)
                {
                    if (!reportLst.Contains(report.ReportId))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
        private void BindAvailableReports(int planId)
        {
            List <Report> reports = PlanHelper.GetPlanReports(planId);

            rptBasicReportList.DataSource = reports;
            rptBasicReportList.DataBind();
            if (SessionWrapper.OrderDetail != null && SessionWrapper.OrderDetail.ProfessionId != 0)
            {
                List <Report> optReport = PlanHelper.GetOptionalReports(planId, SessionWrapper.OrderDetail.ProfessionId);
                if (optReport.Count != 0)
                {
                    lblOptRpt.Visible           = true;
                    rptOptionalPlans.DataSource = PlanHelper.GetOptionalReports(planId, SessionWrapper.OrderDetail.ProfessionId);
                    rptOptionalPlans.DataBind();
                }
                else
                {
                    lblOptRpt.Visible = false;
                }
            }

            hdnEmpInfoReq.Value           = reports.IsEmpInfoRequired().ToString();
            hdnEduInfoReq.Value           = reports.IsEduInfoRequired().ToString();
            hdnLicInfoReq.Value           = reports.IsLicInfoRequired().ToString();
            hdnRefInfoReq.Value           = reports.IsRefInfoRequired().ToString();
            hdnDrugVerificationPlan.Value = reports.IsDrugVerificationRequired().ToString();
            hdnPlanID.Value = planId.ToString();
        }
Пример #4
0
        public void showPlanSummary()
        {
            decimal reportTotalPrice = 0;

            int     selectedPlanId = SessionWrapper.OrderDetail.PlanId;
            Plan    plan           = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId);
            Decimal PlanPrice      = (plan == null) ? 0 : plan.Rate;

            lblPlanPrice.Text = PlanPrice.ToString("C");
            //Get plan reports for display

            List <EknowIDModel.Report> reports = PlanHelper.GetPlanReports(selectedPlanId);

            rptBasicReportList.DataSource = reports;
            rptBasicReportList.DataBind();

            reportTotalPrice = PlanPrice;

            string planName = PlanHelper.GetPlan(selectedPlanId).Name.ToString();

            if (planName == "Basic")
            {
                imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_basic_2.png";
            }
            if (planName == "Gold")
            {
                imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_gold_2.png";
            }
            if (planName == "Platinum")
            {
                imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_platinum_2.png";
            }

            if (SessionWrapper.AlacartReportList.Count != 0)
            {
                List <int> alacartRptIDList = SessionWrapper.AlacartReportList;

                List <Report> alacartReportList = new List <Report>();
                Report        report;

                foreach (int reportID in alacartRptIDList)
                {
                    report           = new Report();
                    report           = PlanHelper.GetReportByReportID(reportID);
                    reportTotalPrice = reportTotalPrice + report.Price.Value;
                    alacartReportList.Add(report);
                }
                rptOptionalReportList.DataSource = alacartReportList;
                rptOptionalReportList.DataBind();
            }
            else
            {
                List <Report> alacartReportList = new List <Report>();
                rptOptionalReportList.DataSource = alacartReportList;
                rptOptionalReportList.DataBind();
            }
            lblTotalPrice.Text             = reportTotalPrice.ToString("C");
            hdnTotalPriceWithoutDisc.Value = reportTotalPrice.ToString();
        }
        List <UpgradeReportDisplay> dispalyReport(int reportTypeId)
        {
            List <UpgradeReportDisplay> alacartReports = new List <UpgradeReportDisplay>();
            List <int> planReportId = PlanHelper.GetPlanReports(SessionWrapper.OrderDetail.PlanId).Select(p => p.ReportId).ToList();

            //string[] alacartReportList = {"County Criminal Courthouse Search", "Federal Criminal Courthouse Search", "International Criminal Record Search", "Employment Verification", "Education Verification", "IDentify", "Reference Verification", "eKnowID Drug Test", "Driving Record", "Credit", "County Civil Courthouse Search", "State Criminal Records", "Credit Report", "Global Security Watch List" };

            alacartReports = PlanHelper.GetAlacartReportList().Where(p => p.ReportTypeID == reportTypeId && p.IsActive &&
                                                                     (p.MaxVerificationCount > 1 || !planReportId.Contains(p.ReportId)))
                             .Select(p => new UpgradeReportDisplay {
                report = new Report {
                    Name                   = p.Name,
                    Description            = p.Description,
                    Price                  = p.Price,
                    ReportId               = p.ReportId,
                    TurnaroundTime         = p.TurnaroundTime,
                    IsMultipleCheckEnabled = p.IsMultipleCheckEnabled,
                    MaxVerificationCount   = p.MaxVerificationCount
                }
            }).ToList();
            return(alacartReports);
        }
        public static void SetAdditionalInfoRequire()
        {
            SessionWrapper.RequiredInformation = new RequiredInformation();
            List <Report> reports        = PlanHelper.GetPlanReports(SessionWrapper.OrderDetail.PlanId);
            List <int>    requireReports = new List <int>();
            int           reportId;

            foreach (Report report in reports)
            {
                reportId = report.ReportId;
                requireReports.Add(reportId);
            }

            if (SessionWrapper.AlacartReportList.Contains(Constant.EDUCATION_REPORT_ID) || requireReports.Contains(Constant.EDUCATION_REPORT_ID))
            {
                SessionWrapper.RequiredInformation.isEducationDetailsRequired = true;
            }

            if (SessionWrapper.AlacartReportList.Contains(Constant.EMPLOYEE_REPORT_ID) || requireReports.Contains(Constant.EMPLOYEE_REPORT_ID))
            {
                SessionWrapper.RequiredInformation.isEmploymentDetailsRequired = true;
            }

            if (SessionWrapper.AlacartReportList.Contains(Constant.REFERENCE_REPORT_ID) || requireReports.Contains(Constant.REFERENCE_REPORT_ID))
            {
                SessionWrapper.RequiredInformation.isReferenceInformationRequired = true;
            }

            if (SessionWrapper.AlacartReportList.Contains(Constant.LICENSE_REPORT_ID) || requireReports.Contains(Constant.LICENSE_REPORT_ID))
            {
                SessionWrapper.RequiredInformation.isLicenseInformationRequired = true;
            }

            if (SessionWrapper.AlacartReportList.Contains(Constant.DRUG_REPORT_ID) || requireReports.Contains(Constant.DRUG_REPORT_ID))
            {
                SessionWrapper.RequiredInformation.isDrugVerificationRequired = true;
            }
        }
Пример #7
0
        public void SetSummaryData(string userName, string TransactionID, int orderID, string totalReportCost, string discountOffered)
        {
            //Show payment summary
            int     selectedPlanId = SessionWrapper.OrderDetail.PlanId;
            string  selectedProf;
            Decimal PlanPrice = 0;

            if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
            {
                selectedProf = ProfessionHelper.GetProfessionNameById(SessionWrapper.OrderDetail.ProfessionId);
                PlanPrice    = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId).Rate;
                Decimal discountRate = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId).RateOff;
                List <EknowIDModel.Report> reports = PlanHelper.GetPlanReports(selectedPlanId);
            }
            else
            {
                selectedProf = Constant.UNCOVER_BACKGROUND;
            }


            Decimal OptionalReportsPrice = 0;


            if (SessionWrapper.AlacartReportList.Count != 0)
            {
                List <int> alacartRptIDList = SessionWrapper.AlacartReportList;

                List <Report> alacartReportList = new List <Report>();
                Report        report;

                foreach (int reportID in alacartRptIDList)
                {
                    report = new Report();
                    report = PlanHelper.GetReportByReportID(reportID);
                    OptionalReportsPrice += report.Price.Value;
                }
            }
            lblName.Text          = userName;
            lblTransID.Text       = TransactionID;
            lblOrdNo.Text         = orderID.ToString();
            lblOptRptCost.Text    = OptionalReportsPrice.ToString("C");
            lblDiscountOffer.Text = "- " + discountOffered;
            lblPurchaseDt.Text    = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(DateTime.Now.Month) + " " + DateTime.Now.Date.ToString("dd") + " " + DateTime.Now.Year;
            lblTransAmount.Text   = totalReportCost;
            lblSelectedProf.Text  = selectedProf;

            if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
            {
                lblPackageName.Text = PlanHelper.GetPlan(selectedPlanId).Name.ToString();
                lblRptCost.Text     = PlanHelper.GetPlan(selectedPlanId).Rate.ToString("C");
            }

            //Payment Success mail to user
            StringBuilder emailBodyPayment = new StringBuilder(ConstructMail.GetMailBody(Constant.PAYMENT_COMPLETE));

            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_FIRSTNAME, SessionWrapper.LoggedUser.FirstName);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_LASTNAME, SessionWrapper.LoggedUser.LastName);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_TRANSACTIONID, TransactionID);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_ORDERNUMBER, orderID.ToString());
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PURCHASEDATE, lblPurchaseDt.Text);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGENAME, lblPackageName.Text);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PROFESSION, selectedProf);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_COSTOFREPORT, lblRptCost.Text);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_OPTIONALREPORT, OptionalReportsPrice.ToString("C"));
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_DISCOUNTOFFERED, lblDiscountOffer.Text);
            emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_TRANSACTIONAMOUNT, totalReportCost);


            StringBuilder emailBodyPaymentSupport = new StringBuilder(ConstructMail.GetMailBody(Constant.PAYMENT_COMPLETE_SUPPORT));

            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_FIRSTNAME, SessionWrapper.LoggedUser.FirstName);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_USEREMAILID, SessionWrapper.LoggedUser.Email);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_TRANSACTIONID, TransactionID);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_ORDERNUMBER, orderID.ToString());
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PURCHASEDATE, lblPurchaseDt.Text);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGENAME, lblPackageName.Text);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PROFESSION, selectedProf);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_COSTOFREPORT, lblRptCost.Text);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_OPTIONALREPORT, OptionalReportsPrice.ToString("C"));
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_DISCOUNTOFFERED, lblDiscountOffer.Text);
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_TRANSACTIONAMOUNT, totalReportCost);

            StringBuilder reportList = new StringBuilder("");
            List <string> lstReport  = new List <string>();
            //lstReport = OrderStatusHelper.GetReportList(orderID);
            List <Report> reportNameList = PlanHelper.GetPlanReports(selectedPlanId);

            string reportName = string.Empty;

            foreach (Report report in reportNameList)
            {
                reportName = report.Name;
                lstReport.Add(reportName);
            }

            if (SessionWrapper.AlacartReportList.Count != 0)
            {
                List <int> alacartRptIDList = SessionWrapper.AlacartReportList;
                Report     report;

                foreach (int reportID in alacartRptIDList)
                {
                    report = new Report();
                    report = PlanHelper.GetReportByReportID(reportID);
                    lstReport.Add(report.Name);
                }
            }


            lstReport.Sort();
            reportList = reportList.Append("<ul>");

            for (int count = 0; count < lstReport.Count; count++)
            {
                reportName = "<li>" + lstReport[count] + "</li>";
                reportList = reportList.Append(reportName);
            }
            reportList = reportList.Append("</ul>");

            emailBodyPayment        = emailBodyPayment.Replace("divReportList", reportList.ToString());
            emailBodyPaymentSupport = emailBodyPaymentSupport.Replace("divReportList", reportList.ToString());

            if (selectedProf != Constant.UNCOVER_BACKGROUND)
            {
                emailBodyPayment        = emailBodyPayment.Replace("display:none;", "");
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace("display:none;", "");
            }


            SendMail.Sendmail(SessionWrapper.LoggedUser.Email, Constant.CONST_PAYMENT_SUCCESS, emailBodyPayment.ToString());

            SendMail.Sendmail(Constant.ADMINEMAIL, Constant.CONST_PAYMENT_SUCCESS_SUPPORT, emailBodyPaymentSupport.ToString());

            if (SessionWrapper.ModuleName == Constant.UNCOVER_BACKGROUND)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "setUncoverBg();", true);
            }
        }
        protected void showPlanSummary()
        {
            decimal reportTotalPrice = 0;

            int     selectedPlanId = SessionWrapper.OrderDetail.PlanId;
            Plan    plan           = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId);
            Decimal PlanPrice      = (plan == null) ? 0 : plan.Rate;

            lblPlanPrice.Text = PlanPrice.ToString("C");
            //Get plan reports for display
            var accessFees  = SessionWrapper.AlacartAccessFees;
            var holdingFees = SessionWrapper.HoldingFees;

            List <EknowIDModel.Report> reports = PlanHelper.GetPlanReports(selectedPlanId);

            rptBasicReportList.DataSource = reports;
            rptBasicReportList.DataBind();

            reportTotalPrice = PlanPrice;
            if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
            {
                string planName = PlanHelper.GetPlan(selectedPlanId).Name.ToString();

                if (planName == "Basic")
                {
                    imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_basic_2.png";
                }
                if (planName == "Gold")
                {
                    imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_gold_2.png";
                }
                if (planName == "Platinum")
                {
                    imgPaymentHeader.ImageUrl = "~/Images/payment_checkout_platinum_2.png";
                }
            }
            else
            {
                imgPaymentHeader.ImageUrl = "~/Images/checkout_blue.png";
            }
            if (SessionWrapper.AlacartReportList.Count != 0)
            {
                List <int>            alacartRptIDList        = SessionWrapper.AlacartReportList;
                Dictionary <int, int> alacartRptIDListWithQty = SessionWrapper.AlacartReportListWithQty;
                List <Report>         alacartReportList       = new List <Report>();
                Report report;

                foreach (int reportID in alacartRptIDList)
                {
                    report = new Report();
                    report = PlanHelper.GetReportByReportID(reportID);
                    var qty = report.qty = (null != alacartRptIDListWithQty && alacartRptIDListWithQty.Any(p => p.Key.Equals(reportID))) ? alacartRptIDListWithQty[reportID] : 1;
                    if ("State Criminal Records" == report.Name)
                    {
                        reportTotalPrice = reportTotalPrice + (report.Price.Value * qty);
                    }
                    else
                    {
                        reportTotalPrice = reportTotalPrice + (report.Price.Value * qty);
                    }
                    alacartReportList.Add(report);
                }
                reportTotalPrice += holdingFees + accessFees;
                rptOptionalReportList.DataSource = alacartReportList;
                rptOptionalReportList.DataBind();
            }
            else
            {
                List <Report> alacartReportList = new List <Report>();
                rptOptionalReportList.DataSource = alacartReportList;
                rptOptionalReportList.DataBind();
            }
            lblTotalPrice.Text             = reportTotalPrice.ToString("C");
            hdnTotalPriceWithoutDisc.Value = reportTotalPrice.ToString();

            if (0 < accessFees)
            {
                divAccessFees.Visible = true;
                lblAccessFees.Text    = accessFees.ToString("C");
            }
            if (0 < holdingFees)
            {
                divHoldingFees.Visible = true;
                lblHoldingFees.Text    = holdingFees.ToString("C");
            }
        }
        public static void SetSelectedAlacartReportList(string alacartReportList, string alacartReportQty, string selectedStates, string selectedDistricts, string selectedCounties, string selectedCivilCounties, decimal?stateAccessFees, decimal?holdingFees)
        {
            List <Report> reports = PlanHelper.GetPlanReports(PlanId);


            SessionWrapper.RequiredInformation = null;
            SessionWrapper.RequiredInformation = new RequiredInformation();
            SessionWrapper.RequiredInformation.isEmploymentDetailsRequired    = reports.IsEmpInfoRequired();
            SessionWrapper.RequiredInformation.isEducationDetailsRequired     = reports.IsEduInfoRequired();
            SessionWrapper.RequiredInformation.isLicenseInformationRequired   = reports.IsLicInfoRequired();
            SessionWrapper.RequiredInformation.isReferenceInformationRequired = reports.IsRefInfoRequired();
            SessionWrapper.RequiredInformation.isDrugVerificationRequired     = reports.IsDrugVerificationRequired();
            SessionWrapper.AlacartReportList        = new List <int>();
            SessionWrapper.AlacartReportListWithQty = new Dictionary <int, int>();
            SessionWrapper.AlacartAccessFees        = 0;
            SessionWrapper.HoldingFees           = 0;
            SessionWrapper.SelectedStates        = "";
            SessionWrapper.SelectedDistricts     = "";
            SessionWrapper.SelectedCounties      = "";
            SessionWrapper.SelectedCivilCounties = "";

            if (!string.IsNullOrEmpty(alacartReportList))
            {
                SessionWrapper.AlacartAccessFees     = (decimal)(stateAccessFees ?? 0);
                SessionWrapper.SelectedStates        = selectedStates;
                SessionWrapper.SelectedDistricts     = selectedDistricts;
                SessionWrapper.SelectedCounties      = selectedCounties;
                SessionWrapper.SelectedCivilCounties = selectedCivilCounties;
                SessionWrapper.HoldingFees           = (decimal)(holdingFees ?? 0);

                int      reportID;
                int      qty;
                string[] reportIdList = alacartReportList.Split(',');
                string[] qtyList      = string.IsNullOrEmpty(alacartReportQty) ? null : alacartReportQty.Split(',');
                int      i            = 0;
                foreach (string reportId in reportIdList)
                {
                    reportID = int.Parse(reportId);
                    qty      = (null == qtyList) ? 1 : int.Parse(qtyList[i]);
                    i++;

                    SessionWrapper.AlacartReportList.Add(reportID);
                    SessionWrapper.AlacartReportListWithQty.Add(reportID, qty);

                    if (reportID == Constant.EDUCATION_REPORT_ID)
                    {
                        SessionWrapper.RequiredInformation.isEducationDetailsRequired = true;
                    }
                    if (reportID == Constant.EMPLOYEE_REPORT_ID)
                    {
                        SessionWrapper.RequiredInformation.isEmploymentDetailsRequired = true;
                    }
                    if (reportID == Constant.REFERENCE_REPORT_ID)
                    {
                        SessionWrapper.RequiredInformation.isReferenceInformationRequired = true;
                    }
                    if (reportID == Constant.LICENSE_REPORT_ID)
                    {
                        SessionWrapper.RequiredInformation.isLicenseInformationRequired = true;
                    }
                    if (reportID == Constant.DRUG_REPORT_ID)
                    {
                        SessionWrapper.RequiredInformation.isDrugVerificationRequired = true;
                    }
                }
            }

            SessionWrapper.ModuleName = ModuleName;

            if (ProfId != 0)
            {
                SessionWrapper.OrderDetail.ProfessionId = ProfId;
            }

            if (PlanId != 0)
            {
                SessionWrapper.OrderDetail.PlanId = PlanId;
            }
        }
Пример #10
0
        public void SetSummaryData()
        {
            try
            {
                string  userName        = string.Empty;
                string  TransactionID   = string.Empty;
                int     orderID         = 0;
                string  totalReportCost = string.Empty;
                string  accessFees      = string.Empty;
                string  holdingFees     = string.Empty;
                Decimal discountOffered = 0;
                int     selectedPlanId  = SessionWrapper.OrderDetail.PlanId;
                string  selectedProf;
                Decimal PlanPrice = 0;

                if (SessionWrapper.PaymentDetails != null)
                {
                    userName        = SessionWrapper.PaymentDetails.userName;
                    orderID         = SessionWrapper.PaymentDetails.orderID;
                    totalReportCost = SessionWrapper.PaymentDetails.totalReportCost;
                    discountOffered = SessionWrapper.PaymentDetails.discountOffered;
                    TransactionID   = SessionWrapper.PaymentDetails.TransactionID;
                }


                if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
                {
                    selectedProf = ProfessionHelper.GetProfessionNameById(SessionWrapper.OrderDetail.ProfessionId);
                    PlanPrice    = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId).Rate;
                    Decimal discountRate = PlanHelper.GetPlan(SessionWrapper.OrderDetail.PlanId).RateOff;
                    List <EknowIDModel.Report> reports = PlanHelper.GetPlanReports(selectedPlanId);
                }
                else
                {
                    if (SessionWrapper.ResumeRuleCheck.isResumeModule == true)
                    {
                        selectedProf = ProfessionHelper.GetProfessionNameById(SessionWrapper.OrderDetail.ProfessionId);
                    }
                    else
                    {
                        selectedProf = Constant.UNCOVER_BACKGROUND;
                    }
                }

                Decimal OptionalReportsPrice = 0;

                decimal otherCharges = 0;

                if (SessionWrapper.AlacartReportList.Count != 0)
                {
                    List <int>            alacartRptIDList         = SessionWrapper.AlacartReportList;
                    Dictionary <int, int> alacartReportListWithQty = SessionWrapper.AlacartReportListWithQty;
                    List <Report>         alacartReportList        = new List <Report>();
                    Report report;

                    foreach (int reportID in alacartRptIDList)
                    {
                        var qty = (null != alacartReportListWithQty && alacartReportListWithQty.ContainsKey(reportID)) ? alacartReportListWithQty[reportID] : 1;
                        report = new Report();
                        report = PlanHelper.GetReportByReportID(reportID);
                        OptionalReportsPrice += (qty * report.Price.Value);
                        if ("Education Verification" == report.Name || "Employment Verification" == report.Name)
                        {
                            otherCharges += (25 * qty);
                        }
                    }
                }

                string moduleName = SessionWrapper.ModuleName;
                moduleName    = SessionWrapper.ResumeRuleCheck.isResumeModule == true ? Constant.RESUME_CHECKER : moduleName;
                otherCharges += SessionWrapper.AlacartAccessFees;
                accessFees    = otherCharges.ToString("C");

                lblName.Text          = userName;
                lblTransID.Text       = TransactionID;
                lblOrdNo.Text         = orderID.ToString();
                lblOptRptCost.Text    = OptionalReportsPrice.ToString("C");
                lblDiscountOffer.Text = "- " + discountOffered.ToString("C");
                lblPurchaseDt.Text    = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(DateTime.Now.Month) + " " + DateTime.Now.Date.ToString("dd") + " " + DateTime.Now.Year;
                lblTransAmount.Text   = totalReportCost;
                lblSelectedProf.Text  = selectedProf;
                lblModuleName.Text    = moduleName;
                lblOtherCharges.Text  = accessFees;
                if (SessionWrapper.ModuleName != Constant.UNCOVER_BACKGROUND)
                {
                    lblPackageName.Text = PlanHelper.GetPlan(selectedPlanId).Name.ToString();
                    lblRptCost.Text     = PlanHelper.GetPlan(selectedPlanId).Rate.ToString("C");
                }

                //Payment Success mail to user
                StringBuilder emailBodyPayment = new StringBuilder(ConstructMail.GetMailBody(Constant.PAYMENT_COMPLETE));
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_FIRSTNAME, SessionWrapper.LoggedUser.FirstName);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_LASTNAME, SessionWrapper.LoggedUser.LastName);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_TRANSACTIONID, TransactionID);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_ORDERNUMBER, orderID.ToString());
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PURCHASEDATE, lblPurchaseDt.Text);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGENAME, lblPackageName.Text);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PROFESSION, selectedProf);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_COSTOFREPORT, lblRptCost.Text);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_OPTIONALREPORT, OptionalReportsPrice.ToString("C"));
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_DISCOUNTOFFERED, lblDiscountOffer.Text);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_TRANSACTIONAMOUNT, totalReportCost);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_MODULENAME, moduleName);
                emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_OTHERCHARGES, accessFees);


                StringBuilder emailBodyPaymentSupport = new StringBuilder(ConstructMail.GetMailBody(Constant.PAYMENT_COMPLETE_SUPPORT));
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_FIRSTNAME, SessionWrapper.LoggedUser.FirstName);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_USEREMAILID, SessionWrapper.LoggedUser.Email);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_TRANSACTIONID, TransactionID);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_ORDERNUMBER, orderID.ToString());
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PURCHASEDATE, lblPurchaseDt.Text);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGENAME, lblPackageName.Text);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PROFESSION, selectedProf);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_COSTOFREPORT, lblRptCost.Text);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_OPTIONALREPORT, OptionalReportsPrice.ToString("C"));
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_DISCOUNTOFFERED, lblDiscountOffer.Text);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_TRANSACTIONAMOUNT, totalReportCost);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_MODULENAME, moduleName);
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_OTHERCHARGES, accessFees);

                StringBuilder reportList     = new StringBuilder("");
                List <string> lstReport      = new List <string>();
                List <Report> reportNameList = PlanHelper.GetPlanReports(selectedPlanId);

                string reportName = string.Empty;
                foreach (Report report in reportNameList)
                {
                    reportName = report.Name;
                    lstReport.Add(reportName);
                }

                if (SessionWrapper.AlacartReportList.Count != 0)
                {
                    List <int> alacartRptIDList = SessionWrapper.AlacartReportList;
                    Report     report;

                    foreach (int reportID in alacartRptIDList)
                    {
                        report = new Report();
                        report = PlanHelper.GetReportByReportID(reportID);
                        lstReport.Add(report.Name);
                    }
                }


                lstReport.Sort();
                reportList = reportList.Append("<ul>");

                for (int count = 0; count < lstReport.Count; count++)
                {
                    reportName = "<li>" + lstReport[count] + "</li>";
                    reportList = reportList.Append(reportName);
                }
                reportList = reportList.Append("</ul>");

                emailBodyPayment        = emailBodyPayment.Replace("divReportList", reportList.ToString());
                emailBodyPaymentSupport = emailBodyPaymentSupport.Replace("divReportList", reportList.ToString());

                if (selectedProf == Constant.UNCOVER_BACKGROUND)
                {
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_SELECTPROFCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGENAMECLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGECOSTCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_ADDITIONALREPORTCOST, Constant.CONST_ALACARTREPORTCOST);

                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_SELECTPROFCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGENAMECLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGECOSTCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_ADDITIONALREPORTCOST, Constant.CONST_ALACARTREPORTCOST);

                    lblAddReportCost.Text = "Alacart Report(s) Cost:";
                }

                if (selectedProf == Constant.IDENTITY_THEFT)
                {
                    emailBodyPayment        = emailBodyPayment.Replace(Constant.CONST_SELECTPROFCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_SELECTPROFCLASS, Constant.CONST_DISPLAYNONECLASS);
                }

                if (moduleName == Constant.RESUME_CHECKER)
                {
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGENAMECLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_PACKAGECOSTCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPayment = emailBodyPayment.Replace(Constant.CONST_ADDITIONALREPORTCOST, Constant.CONST_ALACARTREPORTCOST);

                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGENAMECLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_PACKAGECOSTCLASS, Constant.CONST_DISPLAYNONECLASS);
                    emailBodyPaymentSupport = emailBodyPaymentSupport.Replace(Constant.CONST_ADDITIONALREPORTCOST, Constant.CONST_ALACARTREPORTCOST);

                    lblAddReportCost.Text = "Alacart Report(s) Cost:";
                }

                if (SessionWrapper.PaymentDetails != null && SessionWrapper.PaymentDetails.isPaymentNotificationSend == false)
                {
                    SendMail.Sendmail(SessionWrapper.LoggedUser.Email, Constant.CONST_PAYMENT_SUCCESS, emailBodyPayment.ToString());
                    SendMail.Sendmail(Constant.ADMINEMAIL, Constant.CONST_PAYMENT_SUCCESS_SUPPORT, emailBodyPaymentSupport.ToString());

                    SessionWrapper.PaymentDetails.isPaymentNotificationSend = true;
                }
                if (moduleName == Constant.UNCOVER_BACKGROUND)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "setUncoverBg();", true);
                }
                if (moduleName == Constant.IDENTITY_THEFT)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "setIDTheftBg();", true);
                }
                if (moduleName == Constant.RESUME_CHECKER)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "setResumeCheckerBg();", true);
                }
            }
            catch { }
        }