Exemplo n.º 1
0
        public ActionResult CauseGroupDeleteConfirmed(int id)
        {
            CauseGroup group = db.CauseGroups.Single(p => p.CauseGroupId == id);

            db.CauseGroups.Remove(group);
            db.SaveChanges();
            return(RedirectToAction("CauseGroupList"));
        }
Exemplo n.º 2
0
 public ActionResult CauseGroupNew(CauseGroup group)
 {
     if (ModelState.IsValid)
     {
         db.CauseGroups.Add(group);
         db.SaveChanges();
         return(RedirectToAction("CauseGroupList"));
     }
     return(View(group));
 }
Exemplo n.º 3
0
 public ActionResult CauseGroupEdit(CauseGroup group)
 {
     if (ModelState.IsValid)
     {
         db.CauseGroups.Attach(group);
         db.Entry(group).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("CauseGroupList"));
     }
     return(View(group));
 }
Exemplo n.º 4
0
        public ActionResult CauseGroupDelete(int id)
        {
            CauseGroup group = db.CauseGroups.Single(p => p.CauseGroupId == id);

            return(View(group));
        }