// // GET: /Admin/SPage/Edit public ActionResult Edit(int id = 0) { SPageModel model = null; using (PageContext context = new PageContext()) { model = context.GetPage(HttpSession.CurrentSiteID, id); } return(ReturnView(model)); }
private ActionResult ReturnView(SPageModel model) { if (model.TypeEditorID == 2) { return(View("NewEditTinymce", model)); } else { return(View("NewEditMvc", model)); } }
public ActionResult Edit(SPageModel model) { if (ModelState.IsValid) { using (PageContext context = new PageContext()) { context.SetPage(HttpSession.CurrentSiteID, model); } return(RedirectToAction("Index")); } return(ReturnView(model)); }
public ActionResult Create(SPageModel model) { if (ModelState.IsValid) { using (PageContext context = new PageContext()) { context.AddPage(HttpSession.CurrentSiteID, model); } return(RedirectToAction("Index")); } ViewBag.EditPageTypes = true; return(View("NewEditTinymce", model)); }