Ejemplo n.º 1
0
        public mempayment CreatePayment(int id, DateTime payDate, double fine,
                                        double payment, double cash, double change)
        {
            mempayment mem = new mempayment();

            mem.memID      = id;
            mem.payDate    = payDate;
            mem.fine       = (double)Math.Round(fine);
            mem.amountPaid = (double)Math.Round(payment);
            mem.cash       = (double)Math.Round(cash);
            mem.change     = (double)Math.Round(change);

            return(mem);
        }
Ejemplo n.º 2
0
        public string InsertPayment(mempayment payment)
        {
            try
            {
                wvac.mempayments.Add(payment);
                wvac.SaveChanges();

                return("Payment successful.");
            }

            catch (Exception ex)
            {
                return("Error: " + ex);
            }
        }