예제 #1
0
        protected void btnCard_Click(object sender, EventArgs e)
        {
            try
            {
                BusLogic objBus = new BusLogic();
                Payment objPayment = new Payment();
                objPayment.Accountid = txtaccountno.Text.Trim();
                objPayment.PaymentAmount = txtPaymentAmountCard.Text.Trim();
                objPayment.CreditCard = txtcardnbr.Text.Trim();
                String strRetun = objBus.MakePayment(objPayment);
                if (strRetun.ToUpper() == "OK")
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:javascript:alert('Payment Processed Successfully ' );", true);
                    PaymentHistory();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:javascript:alert('Payment Failed, Plesae try after sometime! ' );", true);
                }

            }
            catch (Exception)
            {

                throw;
            }
        }