コード例 #1
0
        /// <summary>
        /// Defined business rules while the link button "Terms and Conditions" is clicked.
        /// </summary>
        protected void CcTermsAndConditions_btn_OnClick(Object sender, EventArgs e)
        {
            try
            {
                //MAIG - CH3 - BEGIN - Modified/Commented logic to pass the policy details to Terms and Condition page
                string insFName = string.Empty;
                ////string expirationDate = (!string.IsNullOrEmpty(_ExpireMonth.SelectedValue.ToString() + "-" + _ExpireYear.SelectedValue.ToString()) ? _ExpireMonth.SelectedValue + "-" + _ExpireYear.SelectedValue : string.Empty).ToString();
                ////string name = (!string.IsNullOrEmpty(_Name.Text.ToString()) ? _Name.Text.ToString() : string.Empty).ToString();
                insFName = ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._InsuredFullName.ToString();

                MSC.Encryption.EncryptQueryString args = new MSC.Encryption.EncryptQueryString();
                ////args[Constants.PC_TC_ARG1] = Constants.PC_PTYPE_CC;
                ////args[Constants.PC_TC_ARG2] = lblCardNumberLast4Digit.Text.ToString();
                ////args[Constants.PC_TC_ARG3] = expirationDate;
                args[Constants.PC_TC_ARG2] = insFName;
                //T&C Changes CH1 - START - Added the below code to assign the policy number and product type value to the arguments
                args[Constants.PC_TC_ARG1] = ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page)).PolicyNumber.ToString();
                ////args[Constants.PC_TC_ARG8] = ((MSC.Forms.ManageEnrollment)(((SiteTemplate)Page).OrderService.Page))._ProductType_PC_Text.ToString();
                //MAIG - CH3 - END - Modified/Commented logic to pass the policy details to Terms and Condition page
                //T&C Changes CH1 - END - Added the below code to assign the policy number and product type value to the arguments
                string url = String.Format(Constants.PC_TC_URL, args.ToString());
                Page.ClientScript.RegisterStartupScript(GetType(), Constants.PC_TC_SCRIPT_KEY, Constants.PC_TC_SCRIPT_ONE + url + Constants.PC_TC_SCRIPT_TWO);
            }
            catch (Exception exception)
            {
                Logger.Name = Constants.PC_TC_LOG_NAME;
                Logger.Log(exception);
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                MSC.Encryption.EncryptQueryString args = new MSC.Encryption.EncryptQueryString(Request.QueryString["args"]);

                if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG1].ToString()))
                {
                    //MAIG - CH1 - START - As part of Changes to T&C, the Credit Card and Echeck dynamic fields removed. As advised by Business, Only PolicyNumber & Insured Full Name will be displayed.
                    lblPolicyno.Text = args[CSAAWeb.Constants.PC_TC_ARG1].ToString();
                }

                if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG2].ToString()))
                {
                    lblInsName.Text = args[CSAAWeb.Constants.PC_TC_ARG2].ToString();
                }

                #region Old T&C Dynamic fields - Commented out
                ////if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG8].ToString()))
                ////{
                ////    lblProd.Text = args[CSAAWeb.Constants.PC_TC_ARG8].ToString();
                ////}
                //T&C Changes CH1 - END - Added the below code to assign the policy number and product type value from the arguments
                ////if (args[CSAAWeb.Constants.PC_TC_ARG1].ToString() == CSAAWeb.Constants.PC_PTYPE_TC)
                ////{
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG2].ToString()))
                ////    {
                ////        lblCard.Text = args[CSAAWeb.Constants.PC_TC_ARG2].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG3].ToString()))
                ////    {
                ////        lblCardNum.Text = CSAAWeb.Constants.PC_MASK_TXT + args[CSAAWeb.Constants.PC_TC_ARG3].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG4].ToString()))
                ////    {
                ////        lblExpire.Text = args[CSAAWeb.Constants.PC_TC_ARG4].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG5].ToString()))
                ////    {
                ////        lblCardName.Text = args[CSAAWeb.Constants.PC_TC_ARG5].ToString();
                ////    }
                ////    tblBank.Visible = false;
                ////    tblCustInfo.Visible = true;
                ////    this.tblUpdateCardDetails.Visible = false;
                ////}
                //CHG0072116 - PC Edit Card Details CH1:START - Show the required fields of the "Edit Card Details" with arguments.
                ////else if (args[CSAAWeb.Constants.PC_TC_ARG1].ToString() == CSAAWeb.Constants.PC_PTYPE_CC)
                ////{
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG2].ToString()))
                ////    {
                ////        lblCardNumberLast4Digit.Text = args[CSAAWeb.Constants.PC_TC_ARG2].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG3].ToString()))
                ////    {
                ////        lblCCExpireDate.Text = args[CSAAWeb.Constants.PC_TC_ARG3].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG4].ToString()))
                ////    {
                ////       lblCusName.Text = args[CSAAWeb.Constants.PC_TC_ARG4].ToString();
                ////    }
                ////    tblBank.Visible = false;
                ////    tblCustInfo.Visible = false;
                ////    tblUpdateCardDetails.Visible = true;
                ////}
                //CHG0072116 - PC Edit Card Details CH1:END - Show the required fields of the "Edit Card Details" with arguments.
                ////else if (args[CSAAWeb.Constants.PC_TC_ARG1].ToString().ToString() == CSAAWeb.Constants.PC_EC_PAYMNT_TYPE)
                ////{
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG2].ToString()))
                ////    {
                ////        lblAccount.Text = args[CSAAWeb.Constants.PC_TC_ARG2].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG3].ToString()))
                ////    {
                ////        lblBankName.Text = args[CSAAWeb.Constants.PC_TC_ARG3].ToString();
                ////    }

                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG4].ToString()))
                ////    {
                ////        lblRoutingNum.Text = args[CSAAWeb.Constants.PC_TC_ARG4].ToString();
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG5].ToString()))
                ////    {
                ////        if (args[CSAAWeb.Constants.PC_TC_ARG5].ToString().Length > 4)
                ////        {
                ////            lblAccountNum.Text = CSAAWeb.Constants.PC_MASK_TXT + args[CSAAWeb.Constants.PC_TC_ARG5].ToString().ToString().Substring(args["arg5"].ToString().Length - 4, 4);
                ////        }
                ////        else if (args[CSAAWeb.Constants.PC_TC_ARG5].ToString().Length >= 1)
                ////        {
                ////            lblAccountNum.Text = CSAAWeb.Constants.PC_MASK_TXT + args[CSAAWeb.Constants.PC_TC_ARG5].ToString();
                ////        }
                ////    }
                ////    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_TC_ARG6].ToString()))
                ////    {
                ////        lblAccountNames.Text = args[CSAAWeb.Constants.PC_TC_ARG6].ToString();
                ////    }
                ////    tblBank.Visible = true;
                ////    tblCustInfo.Visible = false;
                ////    tblUpdateCardDetails.Visible = false;
                ////}
                # endregion
                //MAIG - CH1 - END - As part of Changes to T&C, the Credit Card and Echeck dynamic fields removed. As advised by Business, Only PolicyNumber & Insured Full Name will be displayed.
            }
            catch (Exception exception)
            {
                string errorMessage = string.Empty;
                Logger.Name = CSAAWeb.Constants.PC_TC_LOG_NAME;
                Logger.Log(exception);
            }
        }
コード例 #3
0
        protected void imgPrint_Click(object sender, ImageClickEventArgs e)
        {
            List <string> CC = new List <string>();
            List <string> EC = new List <string>();

            MSC.Encryption.EncryptQueryString args = new MSC.Encryption.EncryptQueryString();

            //Added for implementing the print functionality
            if (ViewState["viewstateEC"] != null)
            {
                if (ViewState["viewstateEC"].ToString().Length > 0)
                {
                    EC = (List <string>)ViewState["viewstateEC"];
                }
            }
            if (EC != null && EC.Count > 0)
            {
                Context.Items.Add(CSAAWeb.Constants.PC_PAYMT_TYPE, "EC");
                Context.Items.Add(CSAAWeb.Constants.PRINT_EmailID, EC[7]);
                Context.Items.Add("ConfirmNum", EC[5]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_PolicyNum, EC[6]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_AcntType, EC[2]);
                Context.Items.Add(CSAAWeb.Constants.PC_EC_BANK_NAME, EC[4]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_AccNum, EC[1]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_CustName, EC[0]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_EnrolledDate, lblDate.Text);

                args[CSAAWeb.Constants.PRINT_EmailID] = EC[7];
                args["Response"]   = CSAAWeb.Constants.PC_EDIT_RESPONSE;
                args["ConfirmNum"] = EC[5];
                args[CSAAWeb.Constants.PC_PAYMT_TYPE]      = "EC";
                args[CSAAWeb.Constants.PRINT_EnrolledDate] = lblDate.Text;
                args[CSAAWeb.Constants.PRINT_PolicyNum]    = EC[6];
                args[CSAAWeb.Constants.PC_EC_BANK_NAME]    = EC[4];
                args[CSAAWeb.Constants.PRINT_AcntType]     = EC[2];
                args[CSAAWeb.Constants.PRINT_AccNum]       = EC[1];
                args[CSAAWeb.Constants.PRINT_CustName]     = EC[0];
            }
            else
            {
                if (ViewState["viewstateCC"] != null)
                {
                    if (ViewState["viewstateCC"].ToString().Length > 0)
                    {
                        CC = (List <string>)ViewState["viewstateCC"];
                    }
                }
                Context.Items.Add(CSAAWeb.Constants.PC_PAYMT_TYPE, CSAAWeb.Constants.PC_CC);
                Context.Items.Add(CSAAWeb.Constants.PRINT_PolicyNum, CC[5]);
                Context.Items.Add("ConfirmNum", CC[4]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_AcntType, CC[1]);
                Context.Items.Add(CSAAWeb.Constants.PC_EC_BANK_NAME, CC[6]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_AccNum, CC[0]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_CustName, CC[2]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_EnrolledDate, lblDate.Text);
                Context.Items.Add(CSAAWeb.Constants.PRINT_ExpDate, CC[3]);
                Context.Items.Add(CSAAWeb.Constants.PRINT_EmailID, CC[7]);

                args[CSAAWeb.Constants.PRINT_EmailID] = CC[7];
                args["Response"] = CSAAWeb.Constants.PC_EDIT_RESPONSE;
                args[CSAAWeb.Constants.PC_PAYMT_TYPE]      = CSAAWeb.Constants.PC_CC;
                args[CSAAWeb.Constants.PRINT_EnrolledDate] = lblDate.Text;
                args[CSAAWeb.Constants.PRINT_PolicyNum]    = CC[5];

                args[CSAAWeb.Constants.PRINT_AccNum]   = CC[0];
                args[CSAAWeb.Constants.PRINT_CustName] = CC[2];
            }
            if (ViewState["IsEnrolled"] != null)
            {
                if (ViewState["IsEnrolled"].ToString() == CSAAWeb.Constants.PC_POL_ENROLL_STATUS)
                {
                    Context.Items.Add("Response", CSAAWeb.Constants.PC_EDIT_RESPONSE);
                }
            }


            //Server.Transfer(CSAAWeb.Constants.PRINT_URL);



            string url = String.Format(CSAAWeb.Constants.PRINT_URL, args.ToString());

            Page.ClientScript.RegisterStartupScript(GetType(), Constants.PC_TC_SCRIPT_KEY, Constants.PC_TC_SCRIPT_ONE + url + Constants.PC_TC_SCRIPT_TWO);
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region OLDCODE

            /*
             *
             * if (Context.Items[CSAAWeb.Constants.PRINT_EmailID].ToString()==string.Empty)
             * {
             *  EmailHeader.Visible = false;
             * }
             * //CHG0072116 -Print Page Text change -START Added the below code to display the message accordingly in print page for enrollment and modify process
             * if (Context.Items.Contains("Response"))
             * {
             *  lblEnrollMsg.Text = Context.Items["Response"].ToString();
             * }
             * else
             * {
             *  lblEnrollMsg.Text = CSAAWeb.Constants.PC_THANKU_ENROLL;
             * }
             * //CHG0072116 -Print Page Text change -END Added the below code to display the message accordingly in print page for enrollment and modify process
             * if (Context.Items.Contains(CSAAWeb.Constants.PC_PAYMT_TYPE))
             * {
             * if (Context.Items[CSAAWeb.Constants.PC_PAYMT_TYPE].ToString()==CSAAWeb.Constants.PC_CC)
             * {
             *  //Added for CC
             *  ccdetails.Visible = true;
             *  ecdetails.Visible = false;
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_EnrolledDate))
             *  {
             *      lbl_ECEnrolledDate.Text = Context.Items[CSAAWeb.Constants.PRINT_EnrolledDate].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_PolicyNum))
             *  {
             *      lbl_ECPolicyNumber.Text = Context.Items[CSAAWeb.Constants.PRINT_PolicyNum].ToString().ToUpper();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_AccNum))
             *  {
             *      lbl_AccNumber.Text = Context.Items[CSAAWeb.Constants.PRINT_AccNum].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_CustName))
             *  {
             *      lbl_CustName.Text = Context.Items[CSAAWeb.Constants.PRINT_CustName].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_EmailID))
             *  {
             *      lblEmailId.Text = Context.Items[CSAAWeb.Constants.PRINT_EmailID].ToString();
             *  }
             *
             * }
             * else
             * {
             *  //Added for EC
             *  ccdetails.Visible = false;
             *  ecdetails.Visible = true;
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_EnrolledDate))
             *  {
             *      lbl_EcDate.Text = Context.Items[CSAAWeb.Constants.PRINT_EnrolledDate].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_PolicyNum))
             *  {
             *      lbl_ECPolicyNumber.Text = Context.Items[CSAAWeb.Constants.PRINT_PolicyNum].ToString().ToUpper();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PC_EC_BANK_NAME))
             *  {
             *      lbl_EcBankName.Text = Context.Items[CSAAWeb.Constants.PC_EC_BANK_NAME].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_AcntType))
             *  {
             *      lbl_EcAcntType.Text = Context.Items[CSAAWeb.Constants.PRINT_AcntType].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_AccNum))
             *  {
             *      lbl_EcAccNum.Text = Context.Items[CSAAWeb.Constants.PRINT_AccNum].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_CustName))
             *  {
             *      lbl_EcName.Text = Context.Items[CSAAWeb.Constants.PRINT_CustName].ToString();
             *  }
             *  if (Context.Items.Contains(CSAAWeb.Constants.PRINT_EmailID))
             *  {
             *      lblEmailId.Text = Context.Items[CSAAWeb.Constants.PRINT_EmailID].ToString();
             *  }
             * }
             * }
             */

            #endregion

            MSC.Encryption.EncryptQueryString args = new MSC.Encryption.EncryptQueryString(Request.QueryString["args"]);

            if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_PolicyNum].ToString()))
            {
                lbl_ECPolicyNumber.Text = args[CSAAWeb.Constants.PRINT_PolicyNum].ToString().ToUpper();

                if (args[CSAAWeb.Constants.PRINT_EmailID].ToString() == string.Empty)
                {
                    EmailHeader.Visible = false;
                }

                if (!string.IsNullOrEmpty(args["Response"].ToString()))
                {
                    lblEnrollMsg.Text = args["Response"];
                }
                else
                {
                    lblEnrollMsg.Text = CSAAWeb.Constants.PC_THANKU_ENROLL;
                }

                if (args[CSAAWeb.Constants.PC_PAYMT_TYPE].ToString() == CSAAWeb.Constants.PC_CC)
                {
                    //Added for CC
                    ccdetails.Visible = true;
                    ecdetails.Visible = false;

                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_EnrolledDate].ToString()))
                    {
                        lbl_ECEnrolledDate.Text = args[CSAAWeb.Constants.PRINT_EnrolledDate].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_AccNum].ToString()))
                    {
                        lbl_AccNumber.Text = args[CSAAWeb.Constants.PRINT_AccNum].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_CustName].ToString()))
                    {
                        lbl_CustName.Text = args[CSAAWeb.Constants.PRINT_CustName].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_EmailID].ToString()))
                    {
                        lblEmailId.Text = args[CSAAWeb.Constants.PRINT_EmailID].ToString();
                    }
                }

                else
                {
                    //Added for EC
                    ccdetails.Visible = false;
                    ecdetails.Visible = true;
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_EnrolledDate].ToString()))
                    {
                        lbl_EcDate.Text = args[CSAAWeb.Constants.PRINT_EnrolledDate].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PC_EC_BANK_NAME].ToString()))
                    {
                        lbl_EcBankName.Text = args[CSAAWeb.Constants.PC_EC_BANK_NAME].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_AcntType].ToString()))
                    {
                        lbl_EcAcntType.Text = args[CSAAWeb.Constants.PRINT_AcntType].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_AccNum].ToString()))
                    {
                        lbl_EcAccNum.Text = args[CSAAWeb.Constants.PRINT_AccNum].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_CustName].ToString()))
                    {
                        lbl_EcName.Text = args[CSAAWeb.Constants.PRINT_CustName].ToString();
                    }
                    if (!string.IsNullOrEmpty(args[CSAAWeb.Constants.PRINT_EmailID].ToString()))
                    {
                        lblEmailId.Text = args[CSAAWeb.Constants.PRINT_EmailID].ToString();
                    }
                }
            }
            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(string), "print", "window.print();", true);
        }