コード例 #1
0
 public ActionResult Save(SectionContentParagraph content)
 {
     if (!ModelState.IsValid)
     {
         return(View("Form", content));
     }
     if (content.ActionType == ActionType.Create)
     {
         _sectionContentProviderService.Add(content);
     }
     else
     {
         _sectionContentProviderService.Update(content);
     }
     ViewBag.Close = true;
     return(View("Form", content));
 }
コード例 #2
0
 public ActionResult Save(SectionContentParagraph content)
 {
     if (!ModelState.IsValid)
     {
         return View("Form", content);
     }
     if (content.ActionType == ActionType.Create)
     {
         new SectionContentService().Add(content);
     }
     else
     {
         new SectionContentParagraphService().Update(content);
     }
     ViewBag.Close = true;
     return View("Form", content);
 }