public void EditType(int id, string name) { TECHNIQUE_TYPE slctd_t = db.TECHNIQUE_TYPE.Find(id); slctd_t.NAME = name; db.SaveChanges(); }
public ActionResult DeleteConfirmed(int id) { TECHNIQUE_TYPE tECHNIQUE_TYPE = db.TECHNIQUE_TYPE.Find(id); db.TECHNIQUE_TYPE.Remove(tECHNIQUE_TYPE); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "OBJECTID,NAME")] TECHNIQUE_TYPE tECHNIQUE_TYPE) { if (ModelState.IsValid) { db.Entry(tECHNIQUE_TYPE).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tECHNIQUE_TYPE)); }
public void AddType(string name) { TECHNIQUE_TYPE new_type = new TECHNIQUE_TYPE { NAME = name }; db.TECHNIQUE_TYPE.Add(new_type); db.SaveChanges(); }
public ActionResult Create([Bind(Include = "OBJECTID,NAME")] TECHNIQUE_TYPE tECHNIQUE_TYPE) { if (ModelState.IsValid) { db.TECHNIQUE_TYPE.Add(tECHNIQUE_TYPE); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tECHNIQUE_TYPE)); }
// GET: AgroPark/TECHNIQUE_TYPE/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TECHNIQUE_TYPE tECHNIQUE_TYPE = db.TECHNIQUE_TYPE.Find(id); if (tECHNIQUE_TYPE == null) { return(HttpNotFound()); } return(View(tECHNIQUE_TYPE)); }