//Room out of order public async Task <IActionResult> DeleteRoom(decimal id) { SetDashboard(3); if (HttpContext.Session.GetString("UType") != "A") { TempData["Error"] = "Insufficient login permission"; return(RedirectToAction("Index", "Login")); } var tRoom = new TRoom() { RoomId = id, RoomStatus = 0 }; _context.Entry(tRoom).Property("RoomStatus").IsModified = true; await _context.SaveChangesAsync(); return(RedirectToAction(nameof(ViewRoom))); }
//view Survey page public IActionResult Survey(int id) { var tRes = new TReservation { ResId = id, ResStatus = 1 }; _context.TReservations.Attach(tRes); _context.Entry(tRes).Property(x => x.ResStatus).IsModified = true; _context.SaveChanges(); ViewBag.ResId = id; return(View()); }