public ViewResult StudentReservationSuccess(PoolDB p) { if (repository.RezData(p.PoolID).Count() == p.Limit) { p.BookingStatus = "Dolu"; repository.UpdatePool(p); } return(View()); }
public IActionResult StudentReservationDetail(PoolDB pool) { lock (Lock) { if (repository.RezData(pool.PoolID).Count() != pool.Limit) { Reservation r1 = new Reservation(); var u = repository.findUser(HttpContext.Session.GetString("UserTC")); r1.UserID = u.UserID; r1.PoolID = pool.PoolID; repository.AddReservation(r1); return(RedirectToAction(nameof(StudentReservationSuccess), pool)); } else { return(RedirectToAction(nameof(StudentReservationFailed))); } } }
public IActionResult AddPool(PoolDB p) { repository.AddPool(p); return(RedirectToAction(nameof(AdminPoolList), p)); }
public IActionResult UpdatePool(PoolDB pool) { repository.UpdatePool(pool); //return RedirectToAction(nameof(AdminView)); return(RedirectToAction(nameof(AdminPoolList), pool)); }