public ActionResult DeleteConfirmed(int id) { deviceinfoSet deviceinfoSet = db.deviceinfoSet.Find(id); db.deviceinfoSet.Remove(deviceinfoSet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,code,name,productor,devicetype,totallifetime,usedlifetime,buildtime,lineinfoSetId")] deviceinfoSet deviceinfoSet) { if (ModelState.IsValid) { db.Entry(deviceinfoSet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.lineinfoSetId = new SelectList(db.lineinfoSet, "Id", "code", deviceinfoSet.lineinfoSetId); return(View(deviceinfoSet)); }
// GET: deviceinfoSets/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } deviceinfoSet deviceinfoSet = db.deviceinfoSet.Find(id); if (deviceinfoSet == null) { return(HttpNotFound()); } return(View(deviceinfoSet)); }
// GET: deviceinfoSets/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } deviceinfoSet deviceinfoSet = db.deviceinfoSet.Find(id); if (deviceinfoSet == null) { return(HttpNotFound()); } ViewBag.lineinfoSetId = new SelectList(db.lineinfoSet, "Id", "code", deviceinfoSet.lineinfoSetId); return(View(deviceinfoSet)); }