public ActionResult DeleteConfirmed(int id) { Stand_Type stand_Type = db.Tb_Stand_Type.Find(id); db.Tb_Stand_Type.Remove(stand_Type); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "StandType,StandName,StandDescription,ResourceQuantity")] Stand_Type stand_Type) { if (ModelState.IsValid) { db.Entry(stand_Type).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stand_Type)); }
public ActionResult Create([Bind(Include = "StandType,StandName,StandDescription,ResourceQuantity")] Stand_Type stand_Type) { if (ModelState.IsValid) { db.Tb_Stand_Type.Add(stand_Type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stand_Type)); }
// GET: Stand_Type/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Stand_Type stand_Type = db.Tb_Stand_Type.Find(id); if (stand_Type == null) { return(HttpNotFound()); } return(View(stand_Type)); }