Ejemplo n.º 1
0
        public ActionResult Delete(Booking booking)
        {
            var redirectId = Repository.GetBooking(booking.Id).ProjectId;
            Repository.Delete(booking);

            return RedirectToAction("Index", new { projectId = redirectId });
        }
Ejemplo n.º 2
0
 public ActionResult Edit(Booking booking)
 {
     Repository.Update(booking);
     return RedirectToAction("Index", new { projectId = booking.ProjectId });
 }
Ejemplo n.º 3
0
        public ActionResult Create(Booking booking)
        {
            Repository.Add(booking);

            return RedirectToAction("Index", new { projectId = booking.ProjectId });
        }
Ejemplo n.º 4
0
 public void Delete(Booking booking)
 {
     _bookings.Remove(GetBooking(booking.Id));
 }
Ejemplo n.º 5
0
 public void Add(Booking booking)
 {
     _bookings.Add(booking);
 }
Ejemplo n.º 6
0
        public void Update(Booking booking)
        {
            var bookingToSave = GetBooking(booking.Id);

            bookingToSave.Date = booking.Date;
            bookingToSave.HoursWorked = booking.HoursWorked;
            bookingToSave.Description = booking.Description;
        }