예제 #1
0
 public async Task <bool> AddTourBooking(TourConBooking tourConBooking)
 {
     if (await _TourBookingDAO.InsertTourConRes(tourConBooking))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 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);
     }
 }