Beispiel #1
0
        public List<XObjs.Fee_list> getAllFee_list()
        {
            List<XObjs.Fee_list> xlist = new List<XObjs.Fee_list>();
            SqlConnection connection = new SqlConnection(this.ConnectXpay());
            SqlCommand command = new SqlCommand("SELECT * FROM fee_list", connection);
            connection.Open();
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                XObjs.Fee_list x = new XObjs.Fee_list();
                x.xid = reader["xid"].ToString();
                x.init_amt = reader["init_amt"].ToString();
                x.item = reader["item"].ToString();
                x.item_code = reader["item_code"].ToString();
                x.tech_amt = reader["tech_amt"].ToString();
                x.xcategory = reader["xcategory"].ToString();
                x.xdesc = reader["xdesc"].ToString();
                x.xlogstaff = reader["xlogstaff"].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;
        }
Beispiel #2
0
 public XObjs.Fee_list getFee_listByItemCode(string item_code)
 {
     XObjs.Fee_list x = new XObjs.Fee_list();
     SqlConnection connection = new SqlConnection(this.ConnectXpay());
     SqlCommand command = new SqlCommand("SELECT * FROM fee_list WHERE item_code='" + item_code + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         x.xid = reader["xid"].ToString();
         x.init_amt = reader["init_amt"].ToString();
         x.item = reader["item"].ToString();
         x.item_code = reader["item_code"].ToString();
         x.tech_amt = reader["tech_amt"].ToString();
         x.xcategory = reader["xcategory"].ToString();
         x.xdesc = reader["xdesc"].ToString();
         x.xlogstaff = reader["xlogstaff"].ToString();
         x.xreg_date = reader["xreg_date"].ToString();
         x.xsync = reader["xsync"].ToString();
         x.xvisible = reader["xvisible"].ToString();
     }
     reader.Close();
     return x;
 }
 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;
 }