public XObjs.Twallet getTwalletByTransIDAdminID(string transID, string xmemberID, string xmembertype) { XObjs.Twallet x = new XObjs.Twallet(); SqlConnection connection = new SqlConnection(this.ConnectXpay()); SqlCommand command = new SqlCommand("SELECT * from twallet where (transID='" + transID + "') AND (xmemberID='" + xmemberID + "') AND (xmembertype='" + xmembertype + "') ", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { x.xid = reader["xid"].ToString(); x.transID = reader["transID"].ToString(); x.xmemberID = reader["xmemberID"].ToString(); x.xmembertype = reader["xmembertype"].ToString(); x.xpay_status = reader["xpay_status"].ToString(); x.xgt = reader["xgt"].ToString(); x.ref_no = reader["ref_no"].ToString(); x.xbankerID = reader["xbankerID"].ToString(); x.applicantID = reader["applicantID"].ToString(); x.xreg_date = reader["xreg_date"].ToString(); x.xsync = reader["xsync"].ToString(); x.xvisible = reader["xvisible"].ToString(); } reader.Close(); return x; }
public List<XObjs.Twallet> getValidatedTwalletByMemberID(string xmemberID, string transID) { List<XObjs.Twallet> xlist = new List<XObjs.Twallet>(); SqlConnection connection = new SqlConnection(this.ConnectXpay()); SqlCommand command = new SqlCommand("SELECT * from twallet where xmemberID='" + xmemberID + "' AND transID='" + transID + "' ", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { XObjs.Twallet x = new XObjs.Twallet(); x.xid = reader["xid"].ToString(); x.transID = reader["transID"].ToString(); x.xmemberID = reader["xmemberID"].ToString(); x.xpay_status = reader["xpay_status"].ToString(); x.xgt = reader["xgt"].ToString(); x.ref_no = reader["ref_no"].ToString(); x.xbankerID = reader["xbankerID"].ToString(); x.applicantID = reader["applicantID"].ToString(); x.xreg_date = reader["xreg_date"].ToString(); x.xsync = reader["xsync"].ToString(); x.xvisible = reader["xvisible"].ToString(); xlist.Add(x); } reader.Close(); return xlist; }
protected void btnSearch_Click(object sender, EventArgs e) { this.xsearch = this.txt_status.Text.Trim(); string txnref; if (this.xsearch.Contains("-")) { txnref = this.xsearch.Trim().Split(new char[] { '-' })[0]; } else { txnref = this.xsearch; } this.c_twall = this.ret.getTwalletByTransIDAdminID(txnref, this.adminID, this.agentType); this.c_app = this.ret.getApplicantByID(this.c_twall.applicantID); if (this.c_twall.xid != null) { if (this.c_twall.xgt == "xpay_bk") { this.xgt_type = "Bank"; } else { if (this.c_twall.xgt == "xpay_isw") { this.xgt_type = "Inter switch"; } else { this.xgt_type = "None"; } } if (this.c_twall.xpay_status == "1") { this.payment_status = "Paid"; } else { if (this.c_twall.xpay_status == "2") { this.payment_status = "Pending"; } else { this.payment_status = "Failed"; } } this.Session["c_twall"] = this.c_twall; this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.c_twall.xid); if (this.lt_fdets.Count > 0) { this.Session["lt_fdets"] = this.lt_fdets; } this.lt_hwall = this.ret.getHwalletByTransID(txnref); this.isw_fields = this.ret.getISWtransactionByTransactionID(txnref); this.isw_fields.TransactionDate = this.isw_fields.TransactionDate.Substring(0, 11).Trim(); int num = 1; int num2 = 0; foreach (XObjs.Hwallet current in this.lt_hwall) { XObjs.PaymentReciept paymentReciept = new XObjs.PaymentReciept(); XObjs.Fee_list fee_list = new XObjs.Fee_list(); fee_list = this.ret.getFee_listByID(this.ret.getFee_detailsByID(current.fee_detailsID).fee_listID); paymentReciept.sn = num.ToString(); paymentReciept.item_code = fee_list.item_code; paymentReciept.item_desc = fee_list.xdesc; int num3 = Convert.ToInt32(fee_list.init_amt) + Convert.ToInt32(fee_list.tech_amt); paymentReciept.amount = string.Format("{0:n}", num3); paymentReciept.transID = string.Concat(new string[] { current.transID, "-", current.fee_detailsID, "-", current.xid }); num2 += Convert.ToInt32(num3); this.lt_pr.Add(paymentReciept); num++; } this.total_amt = string.Format("{0:n}", (double)num2 + Math.Round(Convert.ToDouble(this.isw_fields.isw_conv_fee), 2)); this.show_receipt = 1; this.show_search = 0; return; } this.show_receipt = 0; this.show_search = 1; }