Ejemplo n.º 1
0
        /// <summary>
        /// Load the Entity based on the response from RBPS, Enrollment details from PC
        /// </summary>
        /// <param name="dtRBPSResponse">RBPS response</param>
        /// <param name="dsDetails">Retrieve the Enrollment and Recent Payments of the policy</param>
        /// <param name="achIn">Entity</param>
        private void LoadReqDetailsToEntity(DataTable dtRBPSResponse, DataSet dsDetails, ref ACHInfo achIn)
        {
            achIn.enrollStates        = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["Eligility_States"]);
            achIn.EnrollmentTypeCount = dsDetails.Tables[0].Rows.Count;
            if (achIn.EnrollmentTypeCount > 0)
            {
                achIn.EnrollmentType = CheckNull(dsDetails.Tables[0].Rows[0]["FOP"]);
                switch (achIn.EnrollmentType.ToUpper())
                {
                case "CRDC":
                    achIn.EnrollmentDescription = "Enrolled with Credit Card";
                    achIn.EnrollmentStatus      = true;
                    break;

                case "EFT":
                    achIn.EnrollmentStatus      = true;
                    achIn.EnrollmentDescription = "Enrolled with ACH";
                    break;

                default:
                    break;
                }
            }

            achIn.PaymentRestriction = CheckNull(dtRBPSResponse.Rows[0][CSAAWeb.Constants.PC_BILL_PAYMENT_RESTRICTION]);
            achIn.Policynumber       = CheckNull(dtRBPSResponse.Rows[0][CSAAWeb.Constants.PC_BILL_POL_NUMBER]);
            achIn.SourceSystem       = CheckNull(dtRBPSResponse.Rows[0][Constants.PC_BILL_SOURCE_SYSTEM]);
            achIn.CustomerName       = CheckNull(dtRBPSResponse.Rows[0]["INS_FULL_NME"]);
            achIn.PolicyState        = CheckNull(dtRBPSResponse.Rows[0][Constants.PC_BILL_POL_STATE]);
            achIn.ProductType        = CheckNull(dtRBPSResponse.Rows[0][CSAAWeb.Constants.PC_BILL_POL_TYPE]);

            achIn.dtRecentPayments = dsDetails.Tables[1];

            //CHG0123980 - ACH Incentive Enhancement - April 2016 - Added code for displaying the Card Type - Start
            if (achIn.dtRecentPayments.Rows.Count > 0)
            {
                achIn.PaymentMethod = CheckNull(dsDetails.Tables[1].Rows[0]["PaymentMethod"]);
                achIn.CardType      = CheckNull(dsDetails.Tables[1].Rows[0]["CARD_TYPE"]);
                for (int i = 0; i < achIn.dtRecentPayments.Rows.Count; i++)
                {
                    if (achIn.dtRecentPayments.Rows[i][2].ToString().ToUpper() == "CRDC")
                    {
                        if (achIn.dtRecentPayments.Rows[i][5].ToString().ToUpper() == "DEBIT")
                        {
                            achIn.dtRecentPayments.Rows[i][2] = "Debit Card";
                        }
                        else if ((achIn.dtRecentPayments.Rows[i][5].ToString().ToUpper() == "CREDIT" ||
                                  string.IsNullOrEmpty(achIn.dtRecentPayments.Rows[i][5].ToString().ToUpper())) &&
                                 achIn.dtRecentPayments.Rows[i][2].ToString().ToUpper() == "CRDC")
                        {
                            achIn.dtRecentPayments.Rows[i][2] = "Credit Card";
                        }
                        achIn.PaymentMethod = CheckNull(dsDetails.Tables[1].Rows[0]["PaymentMethod"]);
                    }
                }
            }
            //CHG0123980 - ACH Incentive Enhancement - April 2016 -Added code for displaying the Card Type - End
            achIn.Response = "Success";

            if (dsDetails.Tables[2].Rows.Count > 0)
            {
                achIn.bZipCodeExists = true;
            }
            //CHG0123980 - ACH Incentive Enhancement - April 2016 - Added  code for checking if Incentive is already applied - Start
            if (dsDetails.Tables[3].Rows.Count > 0)
            {
                achIn.IncentiveStatus = CheckNull(dsDetails.Tables[3].Rows[0]["IS"]);
            }
            //CHG0123980 - ACH Incentive Enhancement - April 2016 - Added code for checking if Incentive is already applied - End
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Search the Enrollment and Eligibility details of the policy
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSearch_Click(object sender, ImageClickEventArgs e)
        {
            //CHG0123980 - ACH Incentive Enhancement - April 2016 - Start - Disable button
            btnSearch.Enabled = false;
            //CHG0123980 - ACH Incentive Enhancement - April 2016 - End - Disable button
            try
            {
                ACHInfo achIn = new ACHInfo();
                achIn.Userid = ViewState["Userid"].ToString();

                achIn.Policynumber = _PolicyNumber.Text.ToUpper().Trim();

                if (_ProductType.SelectedIndex == 0 || _PolicyNumber.Text.Trim().Equals(string.Empty))
                {
                    vldSumaary.Visible = true;
                    _isValid           = false;
                }
                else if (achIn.Policynumber.Length < 5)
                {
                    vldSumaary.Visible    = false;
                    lblErrorMsg.Visible   = true;
                    lblErrorMsg.Text      = Constants.PC_INVALID_POLICY;
                    enrollDetails.Visible = false;
                    _isValid = false;
                }
                if (_isValid)
                {
                    string ProductType, PC_ProductCode = string.Empty;
                    ProductType = _ProductType.SelectedItem.Value;
                    if (ProductTypes == null)
                    {
                        LoadProductTypes();
                    }
                    DataRow[] productDataRows = ProductTypes.Select("ID LIKE " + "'" + ProductType + "'");
                    foreach (DataRow myDataRow in productDataRows)
                    {
                        PC_ProductCode = myDataRow[CSAAWeb.Constants.PaymentCentral_Product_Code_table].ToString();
                    }

                    if (ValidPolicyProduct(achIn.Policynumber, ProductType))
                    {
                        _PolicyNumber.Enabled = false;
                        _ProductType.Enabled  = false;
                        enrollDetails.Visible = true;
                        //Read the source system
                        IssueDirectPaymentWrapper ObjIssueDirectService = new IssueDirectPaymentWrapper();
                        achIn.SourceSystem = ObjIssueDirectService.DataSource(ProductType, achIn.Policynumber.Length);

                        //RBPS hit
                        BillingLookUp billingSummary = new BillingLookUp();
                        DataTable     dtRBPSResponse = billingSummary.checkPolicy(achIn.Policynumber, PC_ProductCode, achIn.Userid, achIn.SourceSystem);


                        if (dtRBPSResponse != null && dtRBPSResponse.Rows.Count > 0 && (dtRBPSResponse.Rows[0]["ErrorCode"].ToString() != "1"))
                        {
                            GetZipCode(achIn, dtRBPSResponse.Rows[0][CSAAWeb.Constants.PC_BILL_ADDRESS].ToString());
                            //Get the enrollment details and recent payments from PT DB
                            DataSet dsDetails = GetEnrollmentAndPaymentDetails(achIn.Policynumber, achIn.Zipcode);
                            //Loading entity
                            LoadReqDetailsToEntity(dtRBPSResponse, dsDetails, ref achIn);
                            CheckEligiblity(ref achIn);
                        }

                        else
                        {
                            achIn.EligiblityStatus = "Not Found";
                            if (dtRBPSResponse != null)
                            {
                                achIn.Response = dtRBPSResponse.Rows[0][Constants.PC_BILL_ERROR_DESCRIPTION].ToString().PadRight(300);
                            }
                        }

                        //Search Results
                        LoadSearhResultGrid(achIn);
                        //Recent Payments
                        LoadRecentPaymentsGrid(achIn);

                        SaveActionToDB(achIn, "INS");
                    }
                    else
                    {
                        lblErrorMsg.Visible = true;
                        lblErrorMsg.Text    = Constants.PC_INVALID_POLICY;
                    }
                }

                btnCheckIncentive.Enabled = true;
            }
            catch (Exception ex)
            {
                enrollDetails.Visible = false;
                lblErrorMsg.Visible   = true;
                lblErrorMsg.Text      = CSAAWeb.Constants.PC_ERR_RUNTIME_EXCEPTION;
                Logger.Log(ex.ToString());
                Logger.Log(lblErrorMsg.Text.ToString());
                _PolicyNumber.Enabled = true;
                _ProductType.Enabled  = true;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Load the Recent payments grid of the policy
 /// </summary>
 /// <param name="achIn">Entity</param>
 private void LoadRecentPaymentsGrid(ACHInfo achIn)
 {
     grdRecentPayments.DataSource = achIn.dtRecentPayments;
     grdRecentPayments.DataBind();
 }