示例#1
0
 public string Edit(Booking booking)
 {
     try
     {
         var bookings = new BookingBIL().update(booking);
         return(new JavaScriptSerializer().Serialize(bookings));
     }
     catch (Exception ex)
     {
         ExceptionHandler Exception = new ExceptionHandler();
         Exception.Code    = "01";
         Exception.Message = ex.Message;
         return(new JavaScriptSerializer().Serialize(Exception));
     }
 }
示例#2
0
 public string Delete(int id)
 {
     try
     {
         // TODO: Add delete logic here
         var bookings = new BookingBIL().delete(id);
         return(new JavaScriptSerializer().Serialize(bookings));
     }
     catch (Exception ex)
     {
         ExceptionHandler Exception = new ExceptionHandler();
         Exception.Code    = "01";
         Exception.Message = ex.Message;
         return(new JavaScriptSerializer().Serialize(Exception));
     }
 }
示例#3
0
 public string Create(Booking booking)
 {
     try
     {
         // TODO: Add insert logic here
         var bookings = new BookingBIL().insert(booking);
         return(new JavaScriptSerializer().Serialize(bookings));
     }
     catch (Exception ex)
     {
         ExceptionHandler Exception = new ExceptionHandler();
         Exception.Code    = "01";
         Exception.Message = ex.Message;
         return(new JavaScriptSerializer().Serialize(Exception));
     }
 }
示例#4
0
        // GET: Booking/Details/5
        public string Details(int id)
        {
            var bookings = new BookingBIL().getById(id);

            return(new JavaScriptSerializer().Serialize(bookings));
        }
示例#5
0
        // GET: Booking
        public string Index()
        {
            var bookings = new BookingBIL().getAll();

            return(new JavaScriptSerializer().Serialize(bookings));
        }