public ActionResult DeleteConfirmed(int id) { Goest goest = db.Goest.Find(id); db.Goest.Remove(goest); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdGoest,IdNumber,SornameGoesst,NameGoest,SurnameGoest,Age,DateArrival,DateExit,Sum")] Goest goest) { if (ModelState.IsValid) { db.Entry(goest).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdNumber = new SelectList(db.Number, "id_Number", "Komplektaci_nomera", goest.IdNumber); return(View(goest)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Goest goest = db.Goest.Find(id); if (goest == null) { return(HttpNotFound()); } return(View(goest)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Goest goest = db.Goest.Find(id); if (goest == null) { return(HttpNotFound()); } ViewBag.IdNumber = new SelectList(db.Number, "id_Number", "Komplektaci_nomera", goest.IdNumber); return(View(goest)); }