public ActionResult DeleteConfirmed(int id) { Cold_Water cold_water = db.Cold_WaterНабор.Find(id); db.Cold_WaterНабор.Remove(cold_water); db.SaveChanges(); return RedirectToAction("Index"); }
// // GET: /Cold/Details/5 public ActionResult Details(int id = 0) { Cold_Water cold_water = db.Cold_WaterНабор.Find(id); if (cold_water == null) { return HttpNotFound(); } return View(cold_water); }
// // GET: /Cold/Edit/5 public ActionResult Edit(int id = 0) { Cold_Water cold_water = db.Cold_WaterНабор.Find(id); if (cold_water == null) { return HttpNotFound(); } ViewBag.HomID = new SelectList(db.HomItems, "ID", "ID", cold_water.HomID); return View(cold_water); }
// // GET: /Cold/Delete/5 public ActionResult Delete(int id = 0) { Cold_Water cold_water = db.Cold_WaterНабор.Find(id); if (cold_water == null) { return(HttpNotFound()); } return(View(cold_water)); }
public ActionResult Edit(Cold_Water cold_water) { if (ModelState.IsValid) { db.Entry(cold_water).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.HomID = new SelectList(db.HomItems, "ID", "ID", cold_water.HomID); return View(cold_water); }
public ActionResult Create(Cold_Water cold_water) { if (ModelState.IsValid) { db.Cold_WaterНабор.Add(cold_water); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.HomID = new SelectList(db.HomItems, "HomeID", "Apartament_naber", cold_water.HomID); return View(cold_water); }
public ActionResult Create(Cold_Water cold_water, bool next) { if (ModelState.IsValid) { db.Cold_WaterНабор.Add(cold_water); db.SaveChanges(); if (next) { return(RedirectToAction("Create", "Hot", new { id = cold_water.HomID })); } return(RedirectToAction("Index", "Records", new { id = cold_water.HomID })); } ViewBag.HomID = new SelectList(db.HomItems, "ID", "ID", cold_water.HomID); return(View(cold_water)); }