Exemplo n.º 1
0
 public ActionResult Edit(StaticSection model, int cpage = 1)
 {
     if (ModelState.IsValid)
     {
         TempData["message"] = "Статический блок изменен";
         TempData["type"]    = 1;
         _rep.Edit(model);
         return(RedirectToAction("Index", new { page = cpage }));
     }
     else
     {
         return(View(model));
     }
 }
Exemplo n.º 2
0
 public void Delete(StaticSection section)
 {
     db.StaticSections.Remove(section);
     db.SaveChanges();
 }
Exemplo n.º 3
0
 public void Edit(StaticSection cnf)
 {
     db.Entry(cnf).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
 }