Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        // 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));
        }