protected void btnFullPayment_Click(object sender, EventArgs e) { TRANS tRANS = new TRANS(); tRANS = TRANSManager.GetTRANSByRefCode(txtReferenceCode.Text); TRANS tempTRANS = new TRANS(); tempTRANS = tRANS; tempTRANS.TRANSSTATUS = "PAID"; tempTRANS.TRANSRECEIVEDATE = DateTime.Now; tempTRANS.SENDEREMAILADDRESS = txtReceiverEmail.Text; tempTRANS.UPDATEDBY = int.Parse(Session["userInfoID"].ToString());//Session["lOCATION"] != null ? ((LOCATIONGROUP)Session["lOCATION"]).LOCATIONGROUPID : ((AGENT)Session["aGENT"]).AGENTID; tempTRANS.UPDATEDON = DateTime.Now; if (TRANSManager.UpdateTRANS_Paid(tempTRANS)) { lblMessage.Text = "Paid Successfully"; lblMessage.ForeColor = System.Drawing.Color.Green; showTRANSData(txtReferenceCode.Text); } }
private void processPayemnt(string status) { int receiverID = 0; receiverID = selecetedGridRow(); if (gvRECEIVER.Visible) { //update the sender RECEIVER tempRECEIVER = new RECEIVER(); tempRECEIVER.RECEIVERID = int.Parse(txtMemberID.Text); tempRECEIVER.USERNAME = ""; tempRECEIVER.RECEIVERFNAME = txtRECEIVERFNAME.Text; tempRECEIVER.RECEIVERMNAME = txtRECEIVERMNAME.Text; tempRECEIVER.RECEIVERLNAME = txtRECEIVERLNAME.Text; tempRECEIVER.RECEIVERADDRESS1 = txtAddress.Text; tempRECEIVER.RECEIVERADDRESS2 = ""; tempRECEIVER.RECEIVERCITY = txtCity.Text; tempRECEIVER.RECEIVERSTATE = txtState.Text; tempRECEIVER.RECEIVERZIP = txtZIP.Text; tempRECEIVER.RECEIVERPHONE = txtPhoneNumber.Text; tempRECEIVER.CREATEDBY = 1; tempRECEIVER.SCANURL = ""; tempRECEIVER.CREATEDON = DateTime.Now; tempRECEIVER.UPDATEDBY = int.Parse(Session["userInfoID"].ToString()); tempRECEIVER.UPDATEDON = DateTime.Now; bool result = RECEIVERManager.UpdateRECEIVER(tempRECEIVER); } else { //add receiver RECEIVER rECEIVER = new RECEIVER(); rECEIVER.USERNAME = User.Identity.Name.ToString(); rECEIVER.RECEIVERFNAME = txtRECEIVERFNAME.Text; rECEIVER.RECEIVERMNAME = txtRECEIVERMNAME.Text; rECEIVER.RECEIVERLNAME = txtRECEIVERLNAME.Text; rECEIVER.RECEIVERADDRESS1 = txtAddress.Text; rECEIVER.RECEIVERADDRESS2 = ""; rECEIVER.RECEIVERCITY = txtCity.Text; rECEIVER.RECEIVERSTATE = txtState.Text; rECEIVER.RECEIVERZIP = txtZIP.Text; rECEIVER.RECEIVERPHONE = txtPhoneNumber.Text; rECEIVER.CREATEDBY = int.Parse(Session["userInfoID"].ToString()); rECEIVER.CREATEDON = DateTime.Now; rECEIVER.UPDATEDBY = int.Parse(Session["userInfoID"].ToString()); rECEIVER.UPDATEDON = DateTime.Now; rECEIVER.SCANURL = ""; txtMemberID.Text = RECEIVERManager.InsertRECEIVER(rECEIVER).ToString(); } //Process payment TRANS tempTRANS = new TRANS(); tempTRANS.TRANSID = int.Parse(hfTransID.Value); tempTRANS.RECEIVERPHONENO = txtPhoneNumber.Text; tempTRANS.SENDEREMAILADDRESS = txtReceiverEmail.Text; //basically in DB there is no Receiver email id that is why we have given that here it will be the receiver id tempTRANS.CAUSETRANSOTHERFEES = hfCauseOtherServiceChages.Value + "\n" + txtCauseOtherServiceCharges.Text; tempTRANS.TRANSSTATUS = status; tempTRANS.TRANSRECEIVEDID = txtMemberID.Text; tempTRANS.TRANSRECEIVEDATE = DateTime.Now; tempTRANS.UPDATEDBY = int.Parse(Session["userInfoID"].ToString());//Session["lOCATION"] != null ? ((LOCATIONGROUP)Session["lOCATION"]).LOCATIONGROUPID : ((AGENT)Session["aGENT"]).AGENTID; tempTRANS.UPDATEDON = DateTime.Now; if (TRANSManager.UpdateTRANS_Paid(tempTRANS)) { lblmessage.Text = "Payment done successfully..."; lblmessage.ForeColor = System.Drawing.Color.Green; lblSubTotalSendingAmountTotal.Text = "0"; lblSubTotalFeesTotal.Text = "0"; lblSubTotalDiscountTotal.Text = "0"; lblSubTotalTotalAmountTotal.Text = "0"; if (txtRefCodeForSearch.Text != "") { txtRefCodeForSearch.Text = ""; return; } loadReport(); txtReceiverEmail.Text = ""; divPayment.Visible = false; } else { lblmessage.Text = "Error found.."; lblmessage.ForeColor = System.Drawing.Color.Red; } }