protected void BtnOk_Click(object sender, EventArgs e)
        {
            PaymentBLL pay = new PaymentBLL();

            pay.CustId       = 1;
            pay.CardHolder   = TxtBxCardHolder.Text;
            pay.CardNUmber   = Int32.Parse(TxtBxCardNo.Text);
            pay.SecurityCode = int.Parse(TxtBxSecuityNo.Text);
            pay.ExpiryDate   = CalendarExpiry.SelectedDate;
            //this will be used to insert values of payment info
            if (paymentbll.InsertPayment(pay))
            {
                LabelOutput.Text      = "Your Payment has been approved !!!";
                LabelOutput.ForeColor = System.Drawing.Color.Green;
            }
            else
            {
                LabelOutput.Text      = "PLease try again!!";
                LabelOutput.ForeColor = System.Drawing.Color.Red;
            }
        }
 public bool InsertPayment(PaymentBLL pay)
 {
     return(paymentDAL.InsertPayment(pay));
 }
Exemple #3
0
        //this will be used to insert the credit card info in payment table
        public bool InsertPayment(PaymentBLL pay)
        {
            int result = adpPay.Insert(pay.CustId, pay.CardHolder, pay.CardNUmber, pay.SecurityCode, pay.ExpiryDate);

            return(result == 1);
        }
 public Payment()
 {
     paymentbll = new PaymentBLL();
 }