Example #1
0
 public ActionResult Edit(Resource resource)
 {
     if (ModelState.IsValid)
     {
         db.Entry(resource).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(resource));
 }
Example #2
0
 public ActionResult Edit(Company company)
 {
     if (ModelState.IsValid)
     {
         context.Entry(company).State = EntityState.Modified;
         context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(company));
 }
 public ActionResult Edit(Project project)
 {
     if (ModelState.IsValid)
     {
         db.Entry(project).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(project));
 }
 public ActionResult Edit(Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
 public ActionResult Edit(Person person)
 {
     if (ModelState.IsValid)
     {
         context.Entry(person).State = EntityState.Modified;
         context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(person));
 }