예제 #1
0
 protected void btnwallet_Click(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i < gvWallet.Rows.Count; i++)
         {
             RadioButton rbWallet = (RadioButton)gvWallet.Rows[i].FindControl("rbAccountInfo");
             if (rbWallet.Checked)
             {
                 Label lblTokenID = (Label)gvWallet.Rows[i].FindControl("lblwalletTokenid");
                 String TokenID = lblTokenID.Text;
                 BusLogic objBus = new BusLogic();
                 Payment objPayment = new Payment();
                 objPayment.Accountid = txtaccountno.Text.Trim();
                 objPayment.PaymentAmount = txtPaymentAmountWallet.Text.Trim();
                 objPayment.TokenID = TokenID;
                 String strRetun = objBus.MakeWalletPayment(objPayment);
                 if (strRetun.ToUpper() == "OK")
                 {
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:alert('Payment Processed Successfully ' );", true);
                     PaymentHistory();
                 }
                 else {
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:alert('Payment Failed, Plesae try after sometime! ' );", true);
                 }
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }