コード例 #1
0
        //
        // 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));
        }
コード例 #2
0
 private ActionResult ReturnView(SPageModel model)
 {
     if (model.TypeEditorID == 2)
     {
         return(View("NewEditTinymce", model));
     }
     else
     {
         return(View("NewEditMvc", model));
     }
 }
コード例 #3
0
 public ActionResult Edit(SPageModel model)
 {
     if (ModelState.IsValid)
     {
         using (PageContext context = new PageContext())
         {
             context.SetPage(HttpSession.CurrentSiteID, model);
         }
         return(RedirectToAction("Index"));
     }
     return(ReturnView(model));
 }
コード例 #4
0
 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));
 }