public async Task <bool> AddTourBooking(TourConBooking tourConBooking) { if (await _TourBookingDAO.InsertTourConRes(tourConBooking)) { return(true); } else { return(false); } }
public TourAdapter(Dictionary <string, object> dict) { string id = (string)dict["id"]; float TourPrice = (float)dict["TourPrice"]; string TourName = (string)dict["TourName"]; int GuestId = (int)dict["GuestId"]; DateTime ActivityDateTime = (DateTime)dict["ActivityDateTime"]; string GuestName = (string)dict["GuestName"]; _tourConBooking = _tourConBooking.SetTourBooking(id, GuestId, "BOOKED", "Tour", ActivityDateTime, TourPrice, TourName, GuestName); }
public async Task <bool> InsertTourConRes(TourConBooking tourConBooking) { _context.Add(tourConBooking); //Check for successful changes to database //Successful if (await _context.SaveChangesAsync() > 0) { return(true); } //Fail else { return(false); } }