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)); } }
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)); } }
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)); } }
// GET: Booking/Details/5 public string Details(int id) { var bookings = new BookingBIL().getById(id); return(new JavaScriptSerializer().Serialize(bookings)); }
// GET: Booking public string Index() { var bookings = new BookingBIL().getAll(); return(new JavaScriptSerializer().Serialize(bookings)); }