Example #1
0
        private void PayWithCOH_click(object sender, EventArgs e)
        {
            decimal amountPaid = AmountBeingPayedUpDown.Value;

            DatabaseWriter.WritePaymentToDB(amountPaid, activeCustomer, 2);

            DeductDebtAccordingly(amountPaid);

            // Close this form after customer submits payment details.
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        /*
         * Create new payment row and save to db
         * Deduct payment.
         */
        public virtual void CompletePaymentWithCC(object sender, EventArgs e)
        {
            decimal amountPaid = AmountBeingPayedUpDown.Value;

            DatabaseWriter.WritePaymentToDB(amountPaid, activeCustomer, 1);

            DeductDebtAccordingly(amountPaid);
            MessageBox.Show("HEEREE");

            // Close this form after customer submits payment details.
            this.DialogResult = DialogResult.OK;
            this.Close();
        }