//method to create payment public mempayment CreatePayment(int id, DateTime payDate, double fine, double payment, double cash, double change) { MemPayModel mp = new MemPayModel(); mempayment mem = mp.CreatePayment(id, payDate, fine, payment, cash, change); return(mem); }
//method to call create payment and update membership record public string GetPayment(int id, DateTime payDate, double fine, double payment, double cash, double change) { MemPayModel mp = new MemPayModel(); mempayment mem = CreatePayment(id, payDate, fine, payment, cash, change); MembershipModel mm = new MembershipModel(); mm.UpdateMembership(id, payment); return(mp.InsertPayment(mem) + "\n\nYour change is PHP" + (cash - payment)); }