/// <summary>
        /// Display the terms depends on the DO
        /// </summary>
        public void DisplayTerms()
        {
            AuthenticationClasses.WebService.Authentication authObj     = new AuthenticationClasses.WebService.Authentication();
            OrderClassesII.IssueDirectPaymentWrapper        issueDirect = new IssueDirectPaymentWrapper();
            try
            {
                DataSet ds = new DataSet();
                string  DO = string.Empty;
                ds = authObj.GetRepIDDO(HttpContext.Current.User.Identity.Name.ToString());
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DO = (ds.Tables[0].Rows[0][Constants.PC_DO_ID].ToString()).Trim();
                    List <string> DO_CC = issueDirect.DO_CC_Mapping();

                    if (DO_CC.Contains(DO) || string.IsNullOrEmpty(DO))
                    {
                        ContactCenterUser.Visible = true;
                        lblContactCenter.Visible  = true;
                        lblContactCenter.Text     = CSAAWeb.Constants.PC_Contact_Center_Script;
                        lbl_Terms.Text            = CSAAWeb.Constants.PC_CB_TANDC_CONTACTCENTER;
                    }
                    else
                    {
                        lblContactCenter.Visible = false;
                        lbl_Terms.Text           = CSAAWeb.Constants.PC_CB_TANDC_F2F;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Log(ex.ToString());
            }
            finally
            {
                authObj     = null;
                issueDirect = null;
            }
        }
        /// <summary>
        /// Update credit card details when the update button is clicked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ImgBtnUpdate_Click(object sender, ImageClickEventArgs e)
        {
            PlaceHolder PH_PolicyDetail = (PlaceHolder)this.NamingContainer.FindControl(Constants.PC_CNTRL_NAME);

            if (PH_PolicyDetail != null)
            {
                PH_PolicyDetail.Visible = true;
            }
            string PC_ProductCode = string.Empty;

            //MAIG - CH13 - BEGIN - Modified the below logic to check if the Page is Valid
            if (_isValid && Page.IsValid)
            //MAIG - CH13 - END - Modified the below logic to check if the Page is Valid
            {
                try
                {
                    //MAIG - CH4 - BEGIN - Logic to set the Update button Enabled property to false
                    ImgBtnUpdate.Enabled = false;
                    //OrderClasses.Service.Order authUserObj = new OrderClasses.Service.Order();
                    //UserInfo userInfoObj = new UserInfo();

                    //userInfoObj = authUserObj.Authenticate(HttpContext.Current.User.Identity.Name, string.Empty, CSAAWeb.Constants.PC_APPID_PAYMENT_TOOL);
                    //MAIG - CH4 - END - Logic to set the Update button Enabled property to false
                    if (!string.IsNullOrEmpty(hdnPaymentToken.Value))
                    {
                        List <string>             response    = new List <string>();
                        OrderClasses.OrderInfo    ordderInfo  = new OrderClasses.OrderInfo();
                        SessionInfo               sessionInfo = new SessionInfo();
                        IssueDirectPaymentWrapper actObj      = new IssueDirectPaymentWrapper();
                        string token = string.Empty;
                        ordderInfo.S                  = new SessionInfo();
                        ordderInfo.S.AppName          = CSAAWeb.Constants.PC_APPID_PAYMENT_TOOL;
                        ordderInfo.User               = new UserInfo();
                        ordderInfo.User.UserId        = HttpContext.Current.User.Identity.Name;
                        ordderInfo.Card               = new OrderClasses.CardInfo();
                        ordderInfo.Card.CCExpMonth    = _ExpireMonth.SelectedValue.ToString();
                        ordderInfo.Card.CCExpYear     = _ExpireYear.SelectedValue.ToString();
                        ordderInfo.Card.CCNumber      = lblCardNumberLast4Digit.Text;
                        ordderInfo.Detail             = new OrderClasses.OrderDetailInfo();
                        ordderInfo.Detail.PaymentType = 1;
                        OrderClasses.AddressInfo addressInfo = new OrderClasses.AddressInfo();
                        addressInfo.FirstName   = _Name.Text;
                        addressInfo.LastName    = " ";
                        addressInfo.Zip         = _txtZipCode.Text;
                        addressInfo.City        = " ";
                        addressInfo.State       = " ";
                        addressInfo.AddressType = OrderClasses.AddressInfoType.BillTo;
                        ordderInfo.Addresses.Add(addressInfo);

                        MaintainPaymentAccountRequest  inputRequest  = new MaintainPaymentAccountRequest();
                        MaintainPaymentAccountResponse tokenResponse = new MaintainPaymentAccountResponse();
                        inputRequest = actObj.Tokenmapping(ordderInfo, sessionInfo, hdnPaymentToken.Value);
                        inputRequest.MaintainPaymentAccountRequest1.saveForFuture = true;
                        if (inputRequest != null)
                        {
                            //Invokes the Payment Token Service
                            tokenResponse = actObj.InvokePaymentTokenService(inputRequest);
                        }
                        if (tokenResponse != null)
                        {
                            token = tokenResponse.MaintainPaymentAccountResponse1.paymentAccountToken;
                        }
                        else
                        {
                            //Added the below code to set Error flag if response object is null
                            Logger.Log(CSAAWeb.Constants.PC_ERR_RESPONSE_NULL);
                            lblErrMessage.Visible = true;
                            lblErrMessage.Text    = CSAAWeb.Constants.PC_ERR_RUNTIME_EXCEPTION;
                        }

                        PCEnrollmentMapping pCEnroll = new PCEnrollmentMapping();
                        //CHG0112662 - BEGIN - Record Payment Enrollment SOA Service changes - Renamed the Autpay Enrollment request to Payment Enrollment request
                        RecordPaymentEnrollment.recordPaymentEnrollmentStatusRequest statusRequest = new RecordPaymentEnrollment.recordPaymentEnrollmentStatusRequest();
                        statusRequest = CreatePaymentStatusRequest(token);
                        //CHG0112662 - END - Record Payment Enrollment SOA Service changes - Renamed the Autpay Enrollment request to Payment Enrollment request

                        //MAIG - CH5 - BEGIN -  Including Agent & Agency ID to the Enrollment Request
                        if (string.IsNullOrEmpty(((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoAgencyID) || ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoAgencyID.ToString().Equals("0"))
                        {
                            statusRequest.agency = string.Empty;
                        }
                        else
                        {
                            statusRequest.agency = ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoAgencyID.ToString();
                        }

                        //////if (string.IsNullOrEmpty(userInfoObj.RepId.ToString()) || userInfoObj.RepId.ToString().Equals("0"))
                        //////    statusRequest.agentIdentifier = string.Empty;
                        //////else
                        //////    statusRequest.agentIdentifier = userInfoObj.RepId.ToString();

                        if (this.Page.User.Identity.Name.Length > 9)
                        {
                            statusRequest.agentIdentifier = Convert.ToString(this.Page.User.Identity.Name).Substring(1);
                        }
                        else if (string.IsNullOrEmpty(((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoRepID) || !((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoRepID.ToString().Equals("0"))
                        {
                            statusRequest.agentIdentifier = Convert.ToString(((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._UserInfoRepID);
                        }
                        else
                        {
                            statusRequest.agentIdentifier = null;
                        }
                        //MAIG - CH5 - END -  Including Agent & Agency ID to the Enrollment Request

                        //CHG0112662 - BEGIN - Record Payment Enrollment SOA Service changes - Renamed the method
                        response = pCEnroll.PCPaymentEnrollService(statusRequest);
                        //CHG0112662 - END - Record Payment Enrollment SOA Service changes - Renamed the method

                        if (response[0].Equals(CSAAWeb.Constants.PC_SUCESS.ToUpper()))
                        {
                            Logger.Log(Constants.PC_LOG_STATUS_REQUEST_SUCCESS + statusRequest.policyInfo.policyNumber + Constants.PC_LOG_CNFRM_NUMBER + response[1].ToString());
                            Context.Items.Add(Constants.PC_CNFRMNUMBER, response[1].ToString());

                            //MAIG - CH6 - BEGIN -  Logic to set the Invalid Unenroll flag passed to Confirmation page and removing PUP Prefix
                            ////// Removing the logic to prefix the PUP for PUP Policies - start
                            ////////if (statusRequest.policyInfo.type == Constants.PC_TYPE_PUP)
                            ////////{
                            ////////    Context.Items.Add(Constants.PC_POLICYNUMBER, Constants.PC_PUP + statusRequest.policyInfo.policyNumber.ToString());
                            ////////}
                            ////////else
                            ////////{
                            Context.Items.Add(Constants.PC_POLICYNUMBER, statusRequest.policyInfo.policyNumber.ToString());
                            ////////}
                            ///// Removing the logic to prefix the PUP for PUP Policies - end

                            ////// Context.Items.Add("PC_INVALID_POLICY_FLOW_FLAG", false);
                            if (((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._InvalidUnEnrollFlow != null)
                            {
                                Context.Items.Add("PC_INVALID_UNENROLL_FLOW_FLAG", true);
                                Context.Items.Add("PC_INVALID_POLICY_FLOW_FLAG", false);
                            }
                            else
                            {
                                Context.Items.Add("PC_INVALID_UNENROLL_FLOW_FLAG", false);
                                Context.Items.Add("PC_INVALID_POLICY_FLOW_FLAG", false);
                            }
                            //MAIG - CH6 - END -  Logic to set the Invalid Unenroll flag passed to Confirmation page and removing PUP Prefix

                            Context.Items.Add(Constants.PC_CCNumber, Constants.PC_MASK_TXT + statusRequest.paymentItem.card.number);
                            //MAIG - CH15 - BEGIN - Added logic to add the condition for Amex and Discover
                            if (statusRequest.paymentItem.card.type.ToUpper().Equals(CSAAWeb.Constants.PC_CRD_TYPE_MASTER))
                            {
                                statusRequest.paymentItem.card.type = CSAAWeb.Constants.PC_CRD_TYPE_MASTER_EXPANSION;
                            }
                            else if (statusRequest.paymentItem.card.type.ToUpper().Equals(CSAAWeb.Constants.PC_CRD_TYPE_AMEX))
                            {
                                statusRequest.paymentItem.card.type = CSAAWeb.Constants.PC_CRD_TYPE_AMEX_EXPANSION;
                            }
                            else if (statusRequest.paymentItem.card.type.ToUpper().Equals(CSAAWeb.Constants.PC_CRD_TYPE_DISC))
                            {
                                statusRequest.paymentItem.card.type = CSAAWeb.Constants.PC_CRD_TYPE_DISC_EXPANSION;
                            }
                            //MAIG - CH15 - END - Added logic to add the condition for Amex and Discover
                            Context.Items.Add(Constants.PC_CCType, statusRequest.paymentItem.card.type.ToUpper());
                            //MAIG - CH7 - BEGIN -  Condition added to check if the policy is an valid policy
                            if (((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._InvalidUnEnrollFlow == null)
                            {
                                Context.Items.Add(Constants.PC_BILL_PLAN, ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page)).BillingPlan);
                                Context.Items.Add(Constants.PC_IS_ENROLLED, ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._IsEnrolled);
                                Context.Items.Add(Constants.PC_VLD_MDFY_ENROLLMENT, ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._ValidationService_Modifyenrollment);
                                Context.Items.Add(Constants.PC_VLD_ENROLLMENT, ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._ValidationService_enrollment);
                            }
                            //MAIG - CH7 - END -  Condition added to check if the policy is an valid policy
                            if ((_ExpireMonth.SelectedValue.Length) != 2)
                            {
                                Context.Items.Add(Constants.PC_CCEXP, "0" + _ExpireMonth.SelectedValue + "/" + _ExpireYear.SelectedValue);
                            }
                            else
                            {
                                Context.Items.Add(Constants.PC_CCEXP, _ExpireMonth.SelectedValue + "/" + _ExpireYear.SelectedValue);
                            }
                            Context.Items.Add(Constants.PC_PAYMT_TYPE, Constants.PC_CC);
                            Context.Items.Add(Constants.PC_CUST_NAME, _Name.Text);
                            Context.Items.Add(Constants.PC_EMAIL_ID, _txtEmailAddress.Text.ToString());
                            Context.Items.Add(Constants.PC_EDIT_CC, Constants.PC_EDIT_CC);
                            Context.Items.Add(Constants.PC_EDIT_CONST_RESPONSE, Constants.PC_EDIT_RESPONSE);
                            Server.Transfer(Constants.PC_RECURR_CNFRM_URL);
                        }
                        else
                        {
                            Logger.Log(Constants.PC_LOG_FAIL + statusRequest.policyInfo.policyNumber);
                            lblErrMessage.Visible = true;
                            //MAIG - CH14 - BEGIN - Modified code to display the Error Code only once
                            //lblErrMessage.Text = response[1].ToString() + " (" + response[0].ToString() + ")";
                            lblErrMessage.Text = response[1].ToString();
                            //MAIG - CH14 - END - Modified code to display the Error Code only once
                        }
                    }
                    else
                    {
                        lblErrMessage.Visible = true;
                        lblErrMessage.Text    = CSAAWeb.Constants.PC_ERR_RUNTIME_EXCEPTION;
                        Logger.Log(Constants.PC_UPCC_PToken_Empty + ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page)).PolicyNumber);
                    }
                }
                catch (FaultException faultExp)
                {
                    DisplayException(faultExp);
                    //MAIG - CH8 - BEGIN -  Condition added to enable the Update Button
                    ImgBtnUpdate.Enabled = true;
                    //MAIG - CH8 - END -  Condition added to enable the Update Button
                }
            }
        }
示例#3
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;
            }
        }
示例#4
0
 /// <summary>
 /// Action to be taken place when the button is clicked.
 /// </summary>
 protected void btnUpdate_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     if (cboUserName.SelectedItem.Value == "Select")
     {
         lblMessage.Text    = "Please select valid User Name";
         lblMessage.Visible = true;
     }
     else
     {
         // PC Phase II changes CH1 - Start - Added the below code to check whether transaction is Payment Central or Payment Tool
         Turnin turnin  = new Turnin();
         string AppName = turnin.PCVoidFlowCheck(lblReceiptNumber.Text);
         if (cboStatus.SelectedValue.ToString() == CSAAWeb.Constants.PC_MANUALVOID_SELECT && AppName.ToUpper().Equals(Constants.PC_APPID_PAYMENTCENTRAL))
         {
             List <string>             IDPReversal_Response = new List <string>();
             IssueDirectPaymentWrapper IDP = new IssueDirectPaymentWrapper();
             string Information            = Page.User.Identity.Name.ToString() + "-" + cboUserName.SelectedItem.Value + "-" + cboRepDO.SelectedItem.Value;
             IDPReversal_Response = IDP.IDPReversal(lblReceiptNumber.Text, CSAAWeb.Constants.PC_MANUALVOID_STATUS, Information);
             if (IDPReversal_Response.Count > 0)
             {
                 if (IDPReversal_Response[0].Equals("SUCC"))
                 {
                     //Session["PC_void_display"] = "The receipt number " + lblReceiptNumber.Text + " has been voided. The voided receipt number is " + IDPReversal_Response[1].ToString();
                     //Context.Items.Add("PC_void_display", "The receipt number " + lblReceiptNumber.Text + " has been voided. The voided receipt number is " + IDPReversal_Response[1].ToString());
                     Session["SelectedReceiptNumber"] = lblReceiptNumber.Text + "-" + IDPReversal_Response[1].ToString();
                     Session["Visited"] = "Yes";
                     Session["Updated"] = "Yes";
                     lblMessage.Visible = true;
                     btnUpdate.Visible  = false;
                     Response.Redirect("Manual_Update_Search.aspx");
                 }
                 else
                 {
                     Session["Updated"] = "No";
                     lblMessage.Text    = IDPReversal_Response[0] + IDPReversal_Response[1];
                     lblMessage.Visible = true;
                     btnUpdate.Visible  = false;
                 }
             }
             // PC Phase II changes CH1 - End - Added the below code to check whether transaction is Payment Central or Payment Tool
         }
         else
         {
             lblMessage.Visible = false;
             int RecordsAffected = insObject.ManualUpdate(lblReceiptNumber.Text, cboStatus.SelectedItem.Text, currentUser, cboRepDO.SelectedItem.Value, cboUserName.SelectedItem.Value);
             Session["SelectedReceiptNumber"] = lblReceiptNumber.Text;
             Session["Visited"] = "Yes";
             Session["Updated"] = "Yes";
             if (RecordsAffected > 0)
             {
                 Response.Redirect("Manual_Update_Search.aspx");
             }
             else
             {
                 Session["Updated"] = "No";
                 lblMessage.Text    = "Unable to update the receipt";
                 lblMessage.Visible = true;
                 btnUpdate.Visible  = false;
             }
         }
     }
 }