Exemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            //For displaying the ReceiptDetails
            OrderClasses.ReportCriteria ReceiptCrit1 = new OrderClasses.ReportCriteria();
            strReceiptNumber           = Request.QueryString["ReceiptNumber"];
            ReceiptCrit1.ReceiptNumber = strReceiptNumber;

            TurninClasses.Service.Turnin TurninService = new TurninClasses.Service.Turnin();
            DataSet   dtsReceiptDetails = TurninService.GetReceiptDetails(ReceiptCrit1);
            DataTable dtbReceiptDetails = dtsReceiptDetails.Tables[0];


            if (dtbReceiptDetails.Rows.Count > 0)
            {
                strCardType = dtbReceiptDetails.Rows[0]["PaymentName"].ToString();
                DataView dv = dtbReceiptDetails.DefaultView;
                ReceiptsRepeater.DataSource = dv;
                ReceiptsRepeater.DataBind();
                //The Parameters are Receipt number and Receipt Type(CC for customer Copy, MC for Merchant Copy).
                btnCustomerReceipt.Attributes.Add("onclick", "Open_Receipt('" + strReceiptNumber + "','CC'); return false;");
                btnMerchantReceipt.Attributes.Add("onclick", "Open_Receipt('" + strReceiptNumber + "','MC'); return false;");
//				btnBack.Attributes.Add("onclick","location.href='SalesTurnIn_Report.aspx';");
            }
        }
 //67811A0  - PCI Remediation for Payment systems CH1: END modified the code to hit the data base again to load the session value which is getting null by cognizant on 1/30/2011
 #region Page_Load
 protected void Page_Load(object sender, System.EventArgs e)
 {
     //Q4-retrofit.ch1-START :Added the code for Hiding CSAA product and Other Product Collection Summary grids
     tabCollSummary.Visible      = false;
     trCollOtherSummary.Visible  = false;
     tblCollOtherSummary.Visible = false;
     //Q4-retrofit.ch1-END
     //67811A0  - PCI Remediation for Payment systems CH2: Start modified the code to check null for session and load the session using database call by cognizant on 1/30/2011
     CurrentUser   = Page.User.Identity.Name;
     TurninService = new TurninClasses.Service.Turnin();
     if (Session["ReportType"] == null)
     {
         loadReportType();
         Session.Add("ReportType", hsTable);
     }
     else
     {
         hsTable = (Hashtable)Session["ReportType"];
     }
     //67811A0  - PCI Remediation for Payment systems CH2: End modified the code to check null for session and load the session using database call by cognizant on 1/30/2011
     //For initialising the Collection Summary Width to zero in the PostBack
     tabCollSummary.Attributes.Add("Width", "0");
     btnCollTurninList.Attributes.Add("onclick", "return Open_Report('" + hsTable[SALESTURNIN_REPORT_TYPE] + "')");
     //CHGXXXXXXX- Server migration - Removing the buttons (btnMbrDetail,btnCrossRef) as as part of Code Clean Up - March 2016
     if (!IsPostBack)
     {
         //Load Data and populate the Collection Summary grid
         LoadGridData();
         Session["TurnInGridData"] = null;
     }
 }
        /// <summary>
        /// In the Page Load Dropdownlist for PaymentType is added by calling the GetPaymentType in Payment WebService
        /// The Received ReceiptNumber is Passed to the ReportCriteria and the GetReceiptdetails is Called
        /// </summary>
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // SSO Integration - CH1 Start -Added the below code to clear the cache of the page to prevent the page loading on browser back button hit
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
            Response.Cache.SetNoStore();
            // SSO Integration - CH1 End -Added the below code to clear the cache of the page to prevent the page loading on browser back button hit
            lblErrMsg.Visible = false;
            if (!Page.IsPostBack)
            {
                //for adding the PaymentType to the PaymentType dropdownlist
                Order     DataConnection = new Order(Page);
                DataTable dtbPaymentType;
                dtbPaymentType         = DataConnection.LookupDataSet("Payment", "GetPaymentType", new object[] { ColumnFlag, User.Identity.Name }).Tables["PAY_Payment_Type"];
                PaymentType.DataSource = dtbPaymentType;
                PaymentType.DataBind();
                //For displaying the ReceiptDetails
                OrderClasses.ReportCriteria ReceiptCrit1 = new OrderClasses.ReportCriteria();
                strReceiptNumber           = Request.QueryString["ReceiptNumber"];
                ReceiptCrit1.ReceiptNumber = strReceiptNumber;
                TurninClasses.Service.Turnin InsSvc = new TurninClasses.Service.Turnin();
                DataSet   dsReceiptDetails          = InsSvc.GetReceiptDetails(ReceiptCrit1);
                DataTable dtbReceiptDetails         = dsReceiptDetails.Tables[0];
                if (dtbReceiptDetails.Rows.Count > 0)
                {
                    lblReceiptDate.Text   = dtbReceiptDetails.Rows[0]["ReceiptDate"].ToString();
                    lblReceiptNumber.Text = dtbReceiptDetails.Rows[0]["ReceiptNumber"].ToString();
                    lblUsers.Text         = dtbReceiptDetails.Rows[0]["UFirstName"].ToString() + ", " + dtbReceiptDetails.Rows[0]["ULastName"].ToString() + " (" + dtbReceiptDetails.Rows[0]["RepID"].ToString() + ") - " + dtbReceiptDetails.Rows[0]["UserName"].ToString();
                    lblPaymentMethod.Text = dtbReceiptDetails.Rows[0]["PaymentName"].ToString();
                    //START CSR 3824-ch1  - Added by Cognizant on 08/30/2005 to
                    //Update the Datatable with the Receipt Changes Performed during Reissue
                    if (Session["ReissueInfo"] != null)
                    {
                        //Modified on 09/13/2005 to check whether the ReceiptNumber in the Session and Querystring are simillar
                        if (((OrderClasses.ReportCriteria)Session["ReissueInfo"]).ReceiptNumber == strReceiptNumber)
                        {
                            UpdateReceiptInfo(ref dtbReceiptDetails, (OrderClasses.ReportCriteria)Session["ReissueInfo"], dtbPaymentType);
                        }
                        else
                        {
                            Session["ReissueInfo"] = null;
                            Session["VoidInfo"]    = null;
                            Session["PaymentType"] = null;
                        }
                    }

                    //END
                    setSelectedIndex(PaymentType, dtbReceiptDetails.Rows[0]["PaymentID"].ToString());

                    DataView dv = dtbReceiptDetails.DefaultView;
                    ReceiptsRepeater.DataSource = dv;
                    ReceiptsRepeater.DataBind();
                }
            }
        }
        protected double dblTotal = 0;         //To Calculate the Total Amount

        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (!IsPostBack)
            {
                //For displaying the ReceiptDetails
                OrderClasses.ReportCriteria ReceiptCrit1 = new OrderClasses.ReportCriteria();

                if (Session["ReissueInfo"] != null)
                {
                    btnConfirmVoid.Visible = false;
                    tblVoid.Visible        = false;
                    ReceiptCrit1           = (OrderClasses.ReportCriteria)Session["ReissueInfo"];
                    trVoidMessage.Visible  = false;
                }
                else if (Session["VoidInfo"] != null)
                {
                    //PC Phase II changes CH1 - Removed the ImageButton "btnConfirmReissue" attributes and methods.
                    //btnConfirmReissue.Visible = false;
                    tblReissue.Visible    = false;
                    ReceiptCrit1          = (OrderClasses.ReportCriteria)Session["VoidInfo"];
                    trVoidMessage.Visible = true;
                }

                if ((Session["VoidInfo"] != null) || (Session["ReissueInfo"] != null))
                {
                    TurninClasses.Service.Turnin InsSvc = new TurninClasses.Service.Turnin();

                    DataSet   dsReceiptDetails  = InsSvc.GetReceiptDetails(ReceiptCrit1);
                    DataTable dtbReceiptDetails = dsReceiptDetails.Tables[0];

                    if (dtbReceiptDetails.Rows.Count > 0)
                    {
                        lblPaymentType.Text = dtbReceiptDetails.Rows[0]["PaymentName"].ToString();
                        //Update the Datatable with the Receipt Changes Performed during Reissue
                        if (Session["ReissueInfo"] != null)
                        {
                            UpdateReceiptInfo(ref dtbReceiptDetails, ReceiptCrit1);
                        }
                        DataView dv = dtbReceiptDetails.DefaultView;
                        ReceiptsRepeater.DataSource = dv;
                        ReceiptsRepeater.DataBind();
                    }
                }
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // SSO Integration - CH1 Start -Added the below code to clear the cache of the page to prevent the page loading on browser back button hit
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
            Response.Cache.SetNoStore();
            // SSO Integration - CH1 End -Added the below code to clear the cache of the page to prevent the page loading on browser back button hit
            CurrentUser    = Page.User.Identity.Name;
            TurninService  = new TurninClasses.Service.Turnin();
            lblErrMsg.Text = "";

            if (!Page.IsPostBack)
            {
                //STAR Retrofit II.Ch4 - START :The content of the cache "AUTH_DOS" is cleared, so as to populate the cache with updated
                //data,when the page is getting loaded for the first time.
                Cache.Remove("AUTH_DOS");
                //STAR Retrofit II.Ch4 - END

                //Make all the controls invisible
                InvisibleUserInfo();

                //Filling Report Types
                FillReport();

                //Filling the Status Combo
                FillStatus();
                //Filling the Cache for RepDo
                rptLib.FillDOListBox(_RepDO, DOs);

                rptLib.FillUserListBox(UserList, CurrentUser, "All", "-1", "-1", true, true);

                //PC Phase II changes CH1 - Start - Modified the below code to Handle Date Time Picker
                DateTime now       = DateTime.Now;
                DateTime startdate = new DateTime(now.Year, now.Month, 1);
                startDt.Text = startdate.ToString("MM-dd-yyyy HH:mm:ss");
                DateTime enddate = DateTime.Today;
                endDt.Text = enddate.ToString("MM-dd-yyyy") + " 23:59:59";
                //PC Phase II changes CH1 - End - Modified the below code to Handle Date Time Picker
            }
            LoadDateControl();
        }
        //Begin PC Phase II changes CH1 - Removed the ImageButton "btnConfirmReissue" attributes and methods.

        /* #region btnConfirmReissue_Click
         * protected void btnConfirmReissue_Click(object sender, System.Web.UI.ImageClickEventArgs e)
         * {
         *      //Calls the Receipt_Reissue SP
         *      OrderClasses.ReportCriteria ReceiptCrit1 = (OrderClasses.ReportCriteria)Session["ReissueInfo"];
         *      TurninClasses.Service.Turnin TurninService = new TurninClasses.Service.Turnin();
         *      string strNewReceiptNumber = "";
         *      strNewReceiptNumber = TurninService.ReceiptReIssue(ReceiptCrit1);
         *
         *      if (strNewReceiptNumber.Length > 0)
         *      {
         *              //Clear all the sessions when the operation is complete.
         *              Session["ReissueInfo"] = null;
         *              Session["VoidInfo"] = null;
         *              Session["PaymentType"] = null;
         *              Response.Redirect ("Reissue_Confirmation.aspx?ReceiptNumber=" + strNewReceiptNumber.ToString(),true);
         *      }
         *      else
         *      {
         *              InsRptLibrary InsMessage = new InsRptLibrary();
         *              InsMessage.SetMessage(lblErrMsg,"Reissue Failed",true);
         *              lblErrMsg.Visible = true;
         *      }
         *
         * }
         #endregion
         */
        //End PC Phase II changes CH1 - Removed the ImageButton "btnConfirmReissue" attributes and methods.
        #region btnConfirmVoid_Click
        protected void btnConfirmVoid_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            //Calls the Receipt_Void SP
            OrderClasses.ReportCriteria  ReceiptCrit1  = (OrderClasses.ReportCriteria)Session["VoidInfo"];
            TurninClasses.Service.Turnin TurninService = new TurninClasses.Service.Turnin();
            //Begin PC Phase II changes CH2 - Modified the Void flow by validating APDS application to existing flow else invoke PC IDPReversal service.
            string Appname = TurninService.PCVoidFlowCheck(ReceiptCrit1.ReceiptNumber);

            if (Appname.ToUpper().Equals(CSAAWeb.Constants.PC_APPID_PAYMENT_TOOL))
            {
                int NoOfRowsAffected = TurninService.ReceiptVoid(ReceiptCrit1);
                if (NoOfRowsAffected > 0)
                {
                    //Clear all the sessions when the operation is complete.
                    Session["ReissueInfo"] = null;
                    Session["VoidInfo"]    = null;
                    Session["PaymentType"] = null;
                    //PC Security Defect Fix CH1 -Added the below line to re-direct to the first page on success Turn-in
                    Response.Redirect("SalesTurnIn_Report.aspx");
                }
                else
                {
                    InsRptLibrary InsMessage = new InsRptLibrary();
                    InsMessage.SetMessage(lblErrMsg, "Void Failed", true);
                    lblErrMsg.Visible = true;
                }
            }
            else
            {
                List <string> IDPReversal_Response = new List <string>();
                string        msg = "";
                OrderClassesII.IssueDirectPaymentWrapper IDPWrapper = new OrderClassesII.IssueDirectPaymentWrapper();
                IDPReversal_Response = IDPWrapper.IDPReversal(ReceiptCrit1.ReceiptNumber, CSAAWeb.Constants.PC_VOID_STATUS, Page.User.Identity.Name.ToString());
                if (IDPReversal_Response.Count > 0)
                {
                    Session["BackBtnFlow"] = "PCONLINE";
                    btnConfirmVoid.Enabled = false;
                    A1.Disabled            = true;
                    if (IDPReversal_Response[0].ToString().Equals("SUCC"))
                    {
                        msg = "The receipt number " + ReceiptCrit1.ReceiptNumber + " has been voided. The voided receipt number is " + IDPReversal_Response[1].ToString();
                        InsRptLibrary InsMessage = new InsRptLibrary();
                        InsMessage.SetMessage(lblErrMsg, msg, true);
                        lblErrMsg.Visible = true;
                        //PC Security Defect Fix CH2 -Added the below line to re-direct to the first page on success Turn-in
                        Response.Redirect("SalesTurnIn_Report.aspx");
                    }
                    else
                    {
                        msg = IDPReversal_Response[0] + " " + IDPReversal_Response[1];
                        InsRptLibrary InsMessage = new InsRptLibrary();
                        InsMessage.SetMessage(lblErrMsg, msg, true);
                        lblErrMsg.Visible = true;
                    }
                }
            }
            //PC Security Defect Fix CH3 -Commented the below line to re-direct to the first page on success Turn-in and to retain on the same page for failure turn-in process
            //Response.Redirect("SalesTurnIn_Report.aspx");
            VoidAck.Visible    = false;
            lblVoidAck.Visible = false;


            //End PC Phase II changes CH2 - Modified the Void flow by validating APDS application to existing flow else invoke PC IDPReversal service.
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here

            if (!Page.IsPostBack)
            {
                //for adding the PaymentType to the PaymentType dropdownlist
                Order DataConnection = new Order(Page);


                //For displaying the ReceiptDetails
                OrderClasses.ReportCriteria rptCrit1 = new OrderClasses.ReportCriteria();
                //Start Changed by Cognizant 05/21/2004 for assigning the Receipt number and the Receipt Type from the query String

                rptCrit1.ReceiptNumber = Request.QueryString["ReceiptNumber"].ToString();

                //END
                //Start Added by Cognizant 05/27/2004 for assigning the ReceiptType.
                if (Request.QueryString["ReceiptType"].ToString() == "CC")
                {
                    lblReceiptType.Text = "Customer Copy";
                }
                if (Request.QueryString["ReceiptType"].ToString() == "MC")
                {
                    lblReceiptType.Text = "Merchant Copy";
                }
                if (Request.QueryString["ReceiptType"].ToString() == "DC")
                {
                    lblReceiptType.Text = "Duplicate Copy";
                }
                //END


                TurninClasses.Service.Turnin TurninService = new TurninClasses.Service.Turnin();
                DataSet   dsReceiptDetails  = TurninService.GetReceiptDetails(rptCrit1);
                DataTable dtbReceiptDetails = dsReceiptDetails.Tables[0];
                if (dtbReceiptDetails.Rows.Count > 0)
                {
                    //TimeZoneChange.Ch1-Added Text MST Arizona at the end of the Receipt date and time  by cognizant.
                    //CHG0109406 - CH1 - BEGIN - Modified the timezone from "MST Arizona" to Arizona
                    lblReceiptDateTime.Text = Convert.ToDateTime(dtbReceiptDetails.Rows[0]["ReceiptDateTime"].ToString()).ToString("MM/dd/yyyy   hh:mm tt") + " " + "Arizona";
                    //CHG0109406 - CH1 - END - Modified the timezone from "MST Arizona" to Arizona
                    lblReceiptNumber.Text = dtbReceiptDetails.Rows[0]["ReceiptNumber"].ToString();
                    //MAIG - CH1 - BEGIN - Commented the code to remove the Sales Rep Number
                    //lblSalesRepNumber.Text = dtbReceiptDetails.Rows[0]["RepID"].ToString();
                    //MAIG - CH1 - END - Commented the code to remove the Sales Rep Number
                    lblDistrictOfficeNumber.Text = dtbReceiptDetails.Rows[0]["Do"].ToString();
                    lblPaymentMethod.Text        = dtbReceiptDetails.Rows[0]["PaymentName"].ToString();
                    lblCreditCardType.Text       = dtbReceiptDetails.Rows[0]["CardType"].ToString();
                    if (dtbReceiptDetails.Rows[0]["ExpiryDate"].ToString().Length > 0)
                    {
                        lblExpirationDate.Text = Convert.ToDateTime(dtbReceiptDetails.Rows[0]["ExpiryDate"].ToString()).ToString("MM/yyyy");
                    }

                    //Generate the CheckSum digit for Membership ID
                    //Q4-Retrofit.Ch1- START:Code has been removed by Cognizant as a part of Q4 Retrofit
                    //if(dtbReceiptDetails.Rows[0]["ProductName"].ToString().Trim()=="Mbr")
                    // Code has been added to ensure that the Membership Numbers are displayed with a  preceding '429'
                    DataRow[] drarrMbrDetails = dtbReceiptDetails.Select(@"ProductName = 'Mbr'", "AssocID");
                    if (drarrMbrDetails.Length > 0)
                    {
                        //Modified as part of Q4 Retrofit Changes
                        //string strMembershipID=dtbReceiptDetails.Rows[0]["MemberID"].ToString();
                        //string strMembershipID = drarrMbrDetails[0]["MemberID"].ToString();
                        //MembershipClasses.Member MBRStartDigit = new MembershipClasses.Member();
                        //string[] strID = MBRStartDigit.FullMemberID.Split(' ');
                        //Modified as part of Q4 Retrofit Changes
                        //dtbReceiptDetails.Rows[0]["PolicyNumber"]=strID[0]+" "+dtbReceiptDetails.Rows[0]["PolicyNumber"].ToString()+" "+CSAAWeb.Cryptor.CheckDigit(strID[0].ToString()+strMembershipID);
                        //drarrMbrDetails[0]["PolicyNumber"] = strID[0] + " " + drarrMbrDetails[0]["PolicyNumber"].ToString() + " " + CSAAWeb.Cryptor.CheckDigit(strID[0].ToString() + strMembershipID);
                    }
                    //Q4-Retrofit.Ch1- END
                    ReceiptsRepeater.DataSource = dtbReceiptDetails;
                    ReceiptsRepeater.DataBind();
                    //Show the Credit card details for Credit Card Payment Type
                    if (Convert.ToInt32(dtbReceiptDetails.Rows[0]["PaymentID"]) == (int)PaymentClasses.PaymentTypes.CreditCard)
                    {
                        string strCreditCardNumber;
                        tblCardDetails.Visible       = true;
                        tbleCheckDetails.Visible     = false;
                        tbecheckmerchantcopy.Visible = false;
                        //Modified by cognizant as a part of removing encrypt and decrypt of credit card and echeck numbers on 07-21-2010.
                        //strCreditCardNumber=Cryptor.Decrypt(dtbReceiptDetails.Rows[0]["cardNumber"].ToString(),Config.Setting("CSAA_ORDERS_KEY"));
                        strCreditCardNumber = dtbReceiptDetails.Rows[0]["cardNumber"].ToString();
                        if (strCreditCardNumber.Length > 12)
                        {
                            lblCreditCardNumber.Text = "XXXXXXXXXXXX" + strCreditCardNumber.Substring(12);
                        }
                        lblAuthorizationCode.Text = dtbReceiptDetails.Rows[0]["AuthCode"].ToString();
                        //STAR AUTO 2.1.Ch1: START - Modified to hide the Expiration Date for credit card payments in Customer Copy & Duplicate Copy.
                        if (Request.QueryString["ReceiptType"].ToString() == "CC" || Request.QueryString["ReceiptType"].ToString() == "DC")
                        {
                            tblCardDetails.Rows[2].Visible = false;
                        }
                        //STAR AUTO 2.1.Ch1: END
                    }
                    //05/03/2011 RFC#135298 PT_echeck Ch1:Start Added the label control to display the echeck details in the receipt page by cognizant on 05/03/2011.
                    else if (Convert.ToInt32(dtbReceiptDetails.Rows[0]["PaymentID"]) == (int)PaymentClasses.PaymentTypes.ECheck)
                    {
                        tbecheckmerchantcopy.Visible = false;
                        string strBankAccNumber, strBankid;
                        // For echeck Bank acc number decrypt and padding on Oct 20 2009.
                        tblCardDetails.Visible    = false;
                        lblAuthorizationCode.Text = dtbReceiptDetails.Rows[0]["AuthCode"].ToString();
                        tbleCheckDetails.Visible  = true;
                        strBankid = dtbReceiptDetails.Rows[0]["BankId"].ToString();
                        //CHG0072116 - Receipt Issue Fix START- Added the length check for routing number before finding sub string for routing number
                        if (strBankid.Length > 5)
                        {
                            lblBankId.Text = "XXXXX" + strBankid.Substring(5); //Value from receipt details data set
                        }
                        //CHG0072116 - Receipt Issue Fix END- Added the length check for routing number before finding sub string for routing number
                        ////strBankAccNumber = Cryptor.Decrypt(dtbReceiptDetails.Rows[0]["BankAcntNo"].ToString(), Config.Setting("CSAA_ORDERS_KEY"));// For echeck Bank acc number decrypt and padding on Oct 20 2009
                        strBankAccNumber = dtbReceiptDetails.Rows[0]["BankAcntNo"].ToString();
                        //lblACNo.Text = dtbReceiptDetails.Rows[0]["BankAcntNo"].ToString(); //Value from receipt details data set  *///commented for echeck Bank acc number decrypt and padding on Oct 20 2009
                        if (strBankAccNumber.Length > 12)
                        {
                            lblACNo.Text = "XXXXXXXXXXXX" + strBankAccNumber.Substring(12);//echeck Bank acc number decrypt and padding added on Oct 20 2009
                        }
                        //05/06/2011 RFC#135298 PT_echeck ch2:Added the condition to display the authorization text, signature and date column for the echeck payment merchant receipt copy by cognizant.
                        if (Request.QueryString["ReceiptType"].ToString() == "MC")
                        {
                            tbecheckmerchantcopy.Visible = true;
                        }
                    }
                    //05/03/2011 RFC#135298 PT_echeck Ch1:END Added the label control to display the echeck details in the receipt page by cognizant on 05/03/2011.
                    else
                    {
                        tblCardDetails.Visible       = false;
                        tbleCheckDetails.Visible     = false;
                        tbecheckmerchantcopy.Visible = false;
                    }
                }
            }
        }