public override bool insertpayment()
        {
            bool details = false;

            if (payment >= totalamountwithdiscount)
            {
                balance = payment - totalamountwithdiscount;
                details = idh.insertpayment(orderid, paymenttype, totalamountwithdiscount);
                // MessageBox.Show(balance.ToString() + "balance");

                return(details);
            }
            else
            {
                balance = 0.00m;
                try
                {
                    throw new CashValidation(payment);
                }
                catch (CashValidation e)
                {
                    e.Validation();
                    details = false;
                }
                return(details);
            }
        }
Ejemplo n.º 2
0
        public override bool insertpayment()
        {
            bool details = false;

            //MessageBox.Show(cardno.Length.ToString(),"length");
            if (cardno.Length == 10)

            {
                // MessageBox.Show(orderid.ToString(), paymenttype);
                // MessageBox.Show(totalamountwithdiscount.ToString());

                details = itemdatabasehelper.insertpayment(orderid, paymenttype, totalamountwithdiscount);
            }
            else
            {
                try
                {
                    details = false;
                    throw new CardValidation(paymenttype);
                }
                catch (CardValidation e)
                {
                    details = false;
                    e.Validation();
                }
            }
            return(details);
        }