Example #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';");
            }
        }
        /// <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();
                    }
                }
            }
        }
Example #4
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;
                    }
                }
            }
        }