public TaxiAdapter(Dictionary <string, object> dict) { string id = (string)dict["id"]; string TaxiPlateNumber = (string)dict["TaxiPlateNumber"]; int DriverContactNo = (int)dict["DriverContactNo"]; int GuestId = (int)dict["GuestId"]; DateTime ActivityDateTime = (DateTime)dict["ActivityDateTime"]; string GuestName = (string)dict["GuestName"]; _taxiConBooking = _taxiConBooking.SetTaxiBooking(id, GuestId, "BOOKED", "Taxi", ActivityDateTime, TaxiPlateNumber, DriverContactNo, GuestName); }
public async Task <bool> AddTaxiBooking(TaxiConBooking taxiConBooking) { if (await _TaxiBookingDAO.InsertTaxiConRes(taxiConBooking)) { return(true); } else { return(false); } }
public async Task <bool> InsertTaxiConRes(TaxiConBooking taxiConBooking) { _context.Add(taxiConBooking); //Check for successful changes to database //Successful if (await _context.SaveChangesAsync() > 0) { return(true); } //Fail else { return(false); } }