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