public Payment(BusPassPayment bpp, BusPassport bp, User u, string monthName, string busPassTypeName) { paymentId = bpp.BusPassPaymentId; bussPassId = bp.BusPassportId; holder = u.Name + " " + u.Surname; price = bpp.Price; busPassType = busPassTypeName; month = monthName; dateOfPayment = bpp.DateOfPayment.Date.ToShortDateString(); }
public async Task <BusPassPayment> createPayment(BusPassPayment payment) { try { _context.Add(payment); await _context.SaveChangesAsync(); return(payment); } catch { return(null); } }
public async Task renewBusPass(BusPassPayment payment) { await _httpService.Post("/api/BusPassPayment", payment); }