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';"); } }
///Update the Datatable with the Receipt Information Changes. ///This is only performed for Reissue operation, since updated information will be ///shown in the Reissue confirmation page ///Added by Cognizant on 09/23/2005 Error Fix in Reissue Confirmation Page private void UpdateReceiptInfo(ref DataTable dtReceiptDetails, OrderClasses.ReportCriteria ReportCrit1) { string [] ItemIDs = ReportCrit1.ItemIDs.Split(','); if (ReportCrit1.Amounts != "") { string [] Amounts = ReportCrit1.Amounts.Split(','); for (int i = 0; i < ItemIDs.Length; i++) { DataRow [] dr = dtReceiptDetails.Select("ItemID =" + ItemIDs[i]); dr[0]["ItemAmount"] = Convert.ToDecimal(Amounts[i]); } } //Security Defect CH1 -START- Added the belowcode to check if the session values is equal to "null".If so assign the session values to context. if (Session["PaymentType"] == null) { if (Context.Items.Contains("PaymentType")) { Session["PaymentType"] = Context.Items["PaymentType"].ToString(); } } if (Session["PaymentType"] != null) { lblPaymentType.Text = Session["PaymentType"].ToString(); } //Security Defect CH1 -End- Added the belowcode to check if the session values is equal to "null".If so assign the session values to context. }
///Added by Cognizant on 08/30/2005 to Populate the Receipt Details for Reissue ///Update the Datatable with the Receipt Information Changes. ///This is only performed for Reissue operation, since updated information will be ///shown in the Reissue confirmation page /// private void UpdateReceiptInfo(ref DataTable dtReceiptDetails, OrderClasses.ReportCriteria ReportCrit1, DataTable dtPaymentType) { string [] ItemIDs = ReportCrit1.ItemIDs.Split(','); string [] Amounts = ReportCrit1.Amounts.Split(','); if (ReportCrit1.Amounts != "") { for (int i = 0; i < ItemIDs.Length; i++) { DataRow [] dr = dtReceiptDetails.Select("ItemID =" + ItemIDs[i]); dr[0]["ItemAmount"] = Convert.ToDecimal(Amounts[i]); } } foreach (DataRow drReceipt in dtReceiptDetails.Rows) { drReceipt["PaymentName"] = Session["PaymentType"].ToString(); //Fetch the PaymentID-we have the PaymentName already in Session //Security Defect CH1 --START- Added the belowcode to assign the session values to context. if (Session["PaymentType"] == null) { Session["PaymentType"] = PaymentType.Items[PaymentType.SelectedIndex].Text; Context.Items.Add("PaymentType", Session["PaymentType"]); } // Security Defect CH1 -END- Added the belowcode to assign the session values to context. DataRow [] drPaymentType = dtPaymentType.Select("Description = '" + Session["PaymentType"].ToString() + "'"); drReceipt["PaymentID"] = drPaymentType[0]["ID"]; } }
/// <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(); } } }
//Begin PC Phase II changes CH2 - Removed the ImageButton "btnReissue". So commented the click event method. /* * /// <summary> * /// When the ReIssue button is Clicked * /// the ItemId and the Corresponding amount displayed for Turnin Item are Passed * /// to the ReportCriteria as Comma Separated values * /// The PaymentType Selected in the Dropdownlist,UserName and the ReceiptNumber are also passed * /// ReceiptReissue is Called to the Reissue the given ReceiptNumber * /// </summary> * protected void btnReissue_Click(object sender, System.Web.UI.ImageClickEventArgs e) * { * //Check ReceiptNumber Exist * if (lblReceiptNumber.ToString().Length > 0) * { * string strItemIDs = ""; * string strAmounts = "" ; * foreach(System.Web.UI.WebControls.RepeaterItem rptrItem in ReceiptsRepeater.Items ) * { * Label lblItemID = (Label)rptrItem.FindControl("lblItemId"); * * //if the item is not member Item then the Amount and the itemId are added to the string * if (!lblItemID.Attributes["ProductName"].ToString().Equals("Mbr")) * { * Label txtAmount = (Label) rptrItem.FindControl("txtAmount"); * strItemIDs = strItemIDs + lblItemID.Attributes["ItemNo"].ToString() + ","; * strAmounts = strAmounts + txtAmount.Text.Replace("$","").Replace(",","") + ","; * } * } * * //to replace the last comma in the strItemIds and strAmounts * if (strItemIDs.Length > 0 && strAmounts.Length >0) * { * strItemIDs = strItemIDs.Substring(0,strItemIDs.Length -1); * strAmounts = strAmounts.Substring(0,strAmounts.Length -1); * } * //Assign the Parameters to the ReportCriteria * OrderClasses.ReportCriteria ReceiptCrit1 = new OrderClasses.ReportCriteria(); * ReceiptCrit1.CurrentUser = this.User.Identity.Name; * ReceiptCrit1.ReceiptNumber = lblReceiptNumber.Text; * ReceiptCrit1.PaymentType = PaymentType.Items[PaymentType.SelectedIndex].Value; * ReceiptCrit1.Amounts = strAmounts; * ReceiptCrit1.ItemIDs = strItemIDs; * //START Modified by Cognizant on 08/23/2005 to Carry the Reissue information to the Confirmation Page * Session["ReissueInfo"] = ReceiptCrit1; * Session["VoidInfo"] = null; * //Security Defect CH2 - Added the belowcode to assign the session values to context. * Session["PaymentType"] = PaymentType.Items[PaymentType.SelectedIndex].Text; * Context.Items.Add("PaymentType", Session["PaymentType"]); * Response.Redirect("TurnIn_Void_Reissue_Confirmation.aspx",true); * //END * } * } **/ //End PC Phase II changes CH2 - Removed the ImageButton "btnReissue". So commented the click event method. #endregion #region btnVoid_Click /// <summary> /// When the Void button is Clicked /// UserName and the ReceiptNumber are passed to the Report Criteria /// ReceiptVoid is Called to the Void the given ReceiptNumber /// </summary> protected void btnVoid_Click(object sender, System.Web.UI.ImageClickEventArgs e) { if (lblReceiptNumber.ToString().Length > 0) { //Assign the Parameters to the ReportCriteria OrderClasses.ReportCriteria ReceiptCrit1 = new OrderClasses.ReportCriteria(); ReceiptCrit1.CurrentUser = this.User.Identity.Name; ReceiptCrit1.ReceiptNumber = lblReceiptNumber.Text; //START Modified by Cognizant on 08/23/2005 to Carry the Void information to the Confirmation Page Session["VoidInfo"] = ReceiptCrit1; Session["ReissueInfo"] = null; Response.Redirect("TurnIn_Void_Reissue_Confirmation.aspx", true); //END } }
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(); } } } }
//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. }
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; } } } }
private void LoadDetails() { try { OrderClasses.ReportCriteria rptCrit1 = new OrderClasses.ReportCriteria(); //Preparing the criteria for retrieving data rptCrit1.Status_Link_ID = cboStatus.SelectedItem.Value; rptCrit1.ReportType = Convert.ToInt16(cboReportType.SelectedItem.Value); rptCrit1.RepDO = _RepDO.SelectedItem.Value; rptCrit1.Users = GetUsersList(); //Check the Length of the Selected Users to not more than 2000 if (rptCrit1.Users.Length > 2000) { rptLib.SetMessage(lblErrMsg, "The total length of users should not exceed 2000 characters", true); InvisibleUserInfo(); return; } // PC Phase II changes CH1 - Added the below code to handle Date Time Picker - Start //If the selected report is Status Report if (startDt.Visible == true && endDt.Visible == true) { string start_date = startDt.Text; DateTime dt_start_date = DateTime.Parse(start_date); string end_date = endDt.Text; //CHG0112662 - BEGIN - Removed the AddDays to end date //DateTime dt_end_date = DateTime.Parse(end_date).AddDays(1); DateTime dt_end_date = DateTime.Parse(end_date); //CHG0112662 - END - Removed the AddDays to end date //rptCrit1.CurrentUser = Page.User.Identity.Name; rptCrit1.StartDate = dt_start_date; rptCrit1.EndDate = dt_end_date; //Assign the values to the labels AssignLabelValues(); bool bValid = rptLib.ValidateDate(lblErrMsg, rptCrit1.StartDate, rptCrit1.EndDate, rptCrit1.ReportType); if (bValid == true) { InvisibleUserInfo(); return; } } //PC Phase II changes CH1 - Added the below code to handle Date Time Picker - End //Default Value for date else { //Assign the values to the labels AssignLabelValues(); DateTime StartDate = new DateTime(1900, 1, 1); DateTime EndDate = new DateTime(1900, 1, 1); rptCrit1.StartDate = StartDate; rptCrit1.EndDate = EndDate; } //Obtaining the dataset for the chosen criteria /* * 11/25/2005 Q4-Retrofit.Ch1 - START - Added by COGNIZANT * Existing Webmethod TurninService.SalesRepCashierWorkflow is renamed as TurninService.PayWorkflowReport * for naming Convention */ DataSet dtsReportData = TurninService.PayWorkflowReport(rptCrit1); /* * 11/25/2005 Q4-Retrofit.Ch1 - END */ if (dtsReportData.Tables[0].Rows.Count == 1) { rptLib.SetMessage(lblErrMsg, "No Data Found. Please specify a valid criteria.", true); InvisibleUserInfo(); return; } else { VisibleUserInfo(); dtbReportData = dtsReportData.Tables[0]; Session["ReportData"] = dtbReportData; dgReport.PageIndex = 0; UpdateDataView(); } } catch (FormatException) { string invalidDate = @"<Script>alert('Select a valid date.')</Script>"; Response.Write(invalidDate); return; } }
protected void btnSubmit_Click(object sender, System.Web.UI.ImageClickEventArgs e) { try { //Couldn't help naming one proc after Bart who is fixated on the appearance and disappearance of controls. InvisibleBarts(); // string lstNames = UserList.SelectedItem.Text.Replace(" - " + UserList.SelectedItem.Value," "); // string lstUsers = UserList.SelectedItem.Value; OrderClasses.ReportCriteria rptCrit1 = new OrderClasses.ReportCriteria(); rptCrit1.ReportType = Convert.ToInt32(report_type.SelectedItem.Value); //PC Phase II changes CH2 - Start - Added the below code to Handle Date Time Picker rptCrit1.StartDate = Convert.ToDateTime(TextstartDate.Text); rptCrit1.EndDate = Convert.ToDateTime(TextendDate.Text); //PC Phase II changes CH2 - End - Added the below code to Handle Date Time Picker rptCrit1.ProductType = RevenueProduct.ProductType; rptCrit1.RevenueType = RevenueProduct.RevenueType; //Code Added by Cognizant rptCrit1.PaymentType = PaymentType.PaymentType; //Code Added by Cognizant rptCrit1.App = "-1"; rptCrit1.Role = "-1"; rptCrit1.RepDO = "-1"; rptCrit1.Users = UserList.SelectedItem.Value; //PC Phase II changes CH1 - Start - Added the below code to include the status value to report criteria rptCrit1.Status = Status.SelectedItem.Value; //PC Phase II changes CH1 - End - Added the below code to include the status value to report criteria bool bValid = rptLib.ValidateDate(lblErrMsg, rptCrit1.StartDate, rptCrit1.EndDate, rptCrit1.ReportType); if (bValid == true) { InvisibleControls(); return; } if (rptCrit1.Users.Length > 2000) { rptLib.SetMessage(lblErrMsg, "The total length of users should not exceed 2000 characters", true); InvisibleControls(); return; } if (report_type.SelectedItem.Value == "2") { TimeSpan ts = Convert.ToDateTime(TextendDate.Text) - Convert.ToDateTime(TextstartDate.Text); if (ts.Days > 2) { InvisibleControls(); rptLib.SetMessage(lblErrMsg, "Please limit the date range to not more than 2 Days.", true); return; } } //Call the insurance web service //PC Phase II 4/20 - START-Added logging to find the user ID and search criteria for the insurance reports, Transaction search InsuranceClasses.Service.Insurance InsSvc = new InsuranceClasses.Service.Insurance(); Logger.Log(CSAAWeb.Constants.INS_REPORT_USERID + Page.User.Identity.Name.ToString() + CSAAWeb.Constants.PARAMETER + rptCrit1); //PC Phase II 4/20 -END- Added logging to find the user ID and search criteria for the insurance reports, Transaction search // Create and Fill the DataSet DataSet ds = InsSvc.GetInsuranceReports(rptCrit1); Logger.Log(CSAAWeb.Constants.INS_REPORT_DATASET); //PC Phase II Changes CH3- Commented the below code to display Report Types for only Summary and Detail. //if (ds.Tables[0].Rows.Count == 0 & ds.Tables[1].Rows.Count == 0) if (ds.Tables[0].Rows.Count == 0) { rptLib.SetMessage(lblErrMsg, "No Data Found. Please specify a valid criteria.", true); InvisibleControls(); return; } else { VisibleControls(); } SetHeaders(); //CHG0109406 - CH2 - BEGIN - Set the label lblHeaderTimeZone to display the timezone for the results displayed lblHeaderTimeZone.Visible = true; //CHG0109406 - CH2 - END - Set the label lblHeaderTimeZone to display the timezone for the results displayed Session.Timeout = Convert.ToInt32(Config.Setting("SessionTimeOut")); Session["MyDataSet"] = ds; Session["MyReportType"] = report_type.SelectedItem.Value; //Added as a part of .NetMig 3.5 dgReport1.PageIndex = 0; dgReport2.PageIndex = 0; UpdateDataView(); } catch (FormatException f) { Logger.Log(f); string invalidDate = @"<Script>alert('Select a valid date.')</Script>"; Response.Write(invalidDate); lblPageNum1.Visible = false; lblPageNum2.Visible = false; return; } catch (Exception ex) { Logger.Log(ex); rptLib.SetMessage(lblErrMsg, MSCRCore.Constants.MSG_GENERAL_ERROR, true); } }