Exemplo n.º 1
0
        public ActionResult Create(LOCAL_INCIDENTS local_incidents)
        {
            if (ModelState.IsValid)
            {
                db.LOCAL_INCIDENTS.Add(local_incidents);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(local_incidents);
        }
Exemplo n.º 2
0
 public ActionResult Edit(LOCAL_INCIDENTS local_incidents)
 {
     if (ModelState.IsValid)
     {
         db.Entry(local_incidents).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(local_incidents);
 }