protected void btnIsPending_Click(object sender, EventArgs e) { divPayment.Visible = true; Button linkButton = new Button(); linkButton = (Button)sender; int tRANSID; tRANSID = Convert.ToInt32(linkButton.CommandArgument); TRANS tRANS = TRANSManager.GetTRANSByID(tRANSID); txtTestAnswer.Text = tRANS.TESTANSWER; txtTestQuestion.Text = tRANS.TESTQUESTION; hfTransID.Value = tRANS.TRANSID.ToString(); txtMemberID.Text = tRANS.RECEIVERID.ToString(); txtMemberID.Enabled = false; //Load Transfer info lblTransavtionAmount.Text = tRANS.TRANSAMOUNT.ToString(); hfCauseOtherServiceChages.Value = tRANS.CAUSETRANSOTHERFEES; lblREFCODE.Text = tRANS.REFCODE.ToString(); lblFees.Text = tRANS.TRANSFEES.ToString(); lblOtherFees.Text = tRANS.TRANSOTHERFEES.ToString(); lblDiscount.Text = tRANS.TRANSPROMOCODE.ToString(); lblTotalAmount.Text = tRANS.TRANSTOTALAMOUNT.ToString(); cleanElements(); List <RECEIVER> receivers = new List <RECEIVER>(); receivers = searchMemberInfo(); txtAddress.Text = receivers[0].RECEIVERADDRESS1; txtRECEIVERFNAME.Text = receivers[0].RECEIVERFNAME; txtRECEIVERMNAME.Text = receivers[0].RECEIVERMNAME; txtRECEIVERLNAME.Text = receivers[0].RECEIVERLNAME; txtCity.Text = receivers[0].RECEIVERCITY; txtPhoneNumber.Text = receivers[0].RECEIVERPHONE; txtState.Text = receivers[0].RECEIVERSTATE; txtZIP.Text = receivers[0].RECEIVERZIP; CUSTOMER cUSTOMER = new CUSTOMER(); cUSTOMER = CUSTOMERManager.GetCUSTOMERByID(tRANS.CUSTID); if (cUSTOMER != null) { txtCUSName.Text = cUSTOMER.CUSTFNAME.ToString() + " " + cUSTOMER.CUSTMNAME.ToString() + " " + cUSTOMER.CUSTLNAME.ToString(); txtCUSAddress1.Text = cUSTOMER.CUSTADDRESS1.ToString(); txtCUSAddress2.Text = cUSTOMER.CUSTADDRESS2.ToString(); txtCUSCity.Text = cUSTOMER.CUSTCITY.ToString(); txtCUSState.Text = cUSTOMER.CUSTSTATE.ToString(); txtCUSZIP.Text = cUSTOMER.CUSTZIP.ToString(); txtCUSPhoneNumber.Text = cUSTOMER.CUSTWPHONE.ToString(); } }
private void showTRANSData(string refCode) { TRANS tRANS = new TRANS(); if (Request.QueryString["TRANSID"] != null) { tRANS = TRANSManager.GetTRANSByID(int.Parse(Request.QueryString["TRANSID"])); } else { tRANS = TRANSManager.GetTRANSByRefCode(refCode); } if (tRANS == null) { panData.Visible = false; panSearch.Visible = true; } else { panData.Visible = true; panSearch.Visible = true; int senderID = 0; int receiverID = 0; int locationID = 0; senderID = tRANS.CUSTID; receiverID = tRANS.RECEIVERID; locationID = tRANS.LOCATIONID; loadSenderInfo(senderID); loadReceiverInfo(receiverID); loadLocationInfo(locationID); txtDate.Text = tRANS.TRANSDT.ToShortDateString(); txtReferenceCode.Text = tRANS.REFCODE; hfReferenceCode.Value = tRANS.REFCODE; txtSendingAmount.Text = tRANS.TRANSAMOUNT.ToString(); txtServiceCharge.Text = tRANS.TRANSFEES.ToString(); txtOtherServiceCharge.Text = tRANS.TRANSOTHERFEES.ToString(); txtCauseOtherServiceCharges.Text = tRANS.CAUSETRANSOTHERFEES.ToString(); txtDiscount.Text = tRANS.TRANSPROMOCODE.ToString(); txtTotalCharge.Text = tRANS.TRANSTOTALAMOUNT.ToString(); txtTestQuestion.Text = tRANS.TESTQUESTION.ToString(); txtTestAnswer.Text = tRANS.TESTANSWER.ToString(); lblStatus.Text = tRANS.TRANSSTATUS == "VOID" ? "Deleted" : tRANS.TRANSSTATUS.ToString(); lblStatus.ForeColor = tRANS.TRANSSTATUS == "PAID" ? System.Drawing.Color.Green : System.Drawing.Color.Red; calculateTotal(); } }
protected void btnProcessTransaction_Click(object sender, EventArgs e) { //try //{ loadTransSession(); if (Session["sessionTRANS"] != null) { int resutl1 = 0; //Session.Remove("ssReferenceCode"); List <TRANS> SSTRANSFINAL = new List <TRANS>(); SSTRANSFINAL = (List <TRANS>)Session["sessionTRANS"]; TRANS tRANS1 = new TRANS(); for (int i = 0; i < SSTRANSFINAL.Count; i++) { if (SSTRANSFINAL[i].CUSTID > 0) { tRANS1.CUSTID = SSTRANSFINAL[i].CUSTID; } else { continue; } tRANS1.RECEIVERID = SSTRANSFINAL[i].RECEIVERID; tRANS1.LOCATIONID = SSTRANSFINAL[i].LOCATIONID; tRANS1.TRANSDT = SSTRANSFINAL[i].TRANSDT; tRANS1.TRANSAMOUNT = SSTRANSFINAL[i].TRANSAMOUNT; tRANS1.TRANSFEES = SSTRANSFINAL[i].TRANSFEES; tRANS1.TRANSOTHERFEES = SSTRANSFINAL[i].TRANSOTHERFEES; tRANS1.CAUSETRANSOTHERFEES = SSTRANSFINAL[i].CAUSETRANSOTHERFEES; tRANS1.TRANSPROMOCODE = SSTRANSFINAL[i].TRANSPROMOCODE; tRANS1.TRANSPROMO = SSTRANSFINAL[i].TRANSPROMO; tRANS1.TRANSTOTALAMOUNT = SSTRANSFINAL[i].TRANSTOTALAMOUNT; tRANS1.FLAG_SM_RECEIVER = SSTRANSFINAL[i].FLAG_SM_RECEIVER; tRANS1.SM_RECEIVER = SSTRANSFINAL[i].SM_RECEIVER; tRANS1.FLAG_CALL_RECEIVER = SSTRANSFINAL[i].FLAG_CALL_RECEIVER; tRANS1.RECEIVERPHONENO = SSTRANSFINAL[i].RECEIVERPHONENO; tRANS1.FLAG_DD = SSTRANSFINAL[i].FLAG_DD; tRANS1.FLAG_TESTQUESTION = SSTRANSFINAL[i].FLAG_TESTQUESTION; tRANS1.TESTQUESTION = SSTRANSFINAL[i].TESTQUESTION; tRANS1.TESTANSWER = SSTRANSFINAL[i].TESTANSWER; tRANS1.FLAG_CALLSENDER = SSTRANSFINAL[i].FLAG_CALLSENDER; tRANS1.FLAG_SMSSENDER = SSTRANSFINAL[i].FLAG_SMSSENDER; tRANS1.FLAG_EMAILSENDER = SSTRANSFINAL[i].FLAG_EMAILSENDER; tRANS1.SENDEREMAILADDRESS = SSTRANSFINAL[i].SENDEREMAILADDRESS; tRANS1.TRANSSTATUS = SSTRANSFINAL[i].TRANSSTATUS; tRANS1.TRANSRECEIVEDID = SSTRANSFINAL[i].TRANSRECEIVEDID; tRANS1.TRANSRECEIVEDATE = SSTRANSFINAL[i].TRANSRECEIVEDATE; tRANS1.CREATEDBY = SSTRANSFINAL[i].CREATEDBY; tRANS1.CREATEDON = SSTRANSFINAL[i].CREATEDON; tRANS1.UPDATEDBY = SSTRANSFINAL[i].UPDATEDBY; tRANS1.UPDATEDON = SSTRANSFINAL[i].UPDATEDON; tRANS1.AGENTID = SSTRANSFINAL[i].AGENTID; tRANS1.REFCODE = SSTRANSFINAL[i].REFCODE; resutl1 = TRANSManager.InsertTRANS(tRANS1); List <string> ReferenceCodeLst = new List <string>(); TRANS tRANSReferenceCode = new TRANS(); tRANSReferenceCode = TRANSManager.GetTRANSByID(resutl1); if (Session["ssReferenceCode"] == null) { ReferenceCodeLst.Add(tRANSReferenceCode.REFCODE.ToString()); if (tRANSReferenceCode != null) { Session["ssReferenceCode"] = ReferenceCodeLst; } } else { //TRANS tRANSReferenceCode = new TRANS(); //tRANSReferenceCode = TRANSManager.GetTRANSByID(resutl1); ////((List<string>)Session["ssReferenceCode"]).Add(tRANSReferenceCode.REFCODE); //if (tRANSReferenceCode != null) //{ ((List <string>)Session["ssReferenceCode"]).Add(tRANSReferenceCode.REFCODE.ToString()); //} } } if (resutl1 > 0) { //Session.Remove("snlocationID"); //Session.Remove("snsenderID"); Session.Remove("snreceiverID"); Session.Remove("sessionTRANS"); Response.Redirect("Transmit.aspx"); } } else { Response.Redirect("SearchSenderPage.aspx"); } //} //catch (Exception Ex) //{ // lblmessage.Text = Ex.ToString(); //} }