コード例 #1
0
 public virtual ActionResult Index(string body)
 {
     JsonResultData data = new JsonResultData(ModelState);
     data.RunWithTry((resultData) =>
     {
         Robots_Txt robot_txt = new Robots_Txt(Site);
         robot_txt.Save(body);
         data.AddMessage("The robots.txt has been saved.".Localize());
     });
     return Json(data);
 }
コード例 #2
0
ファイル: Robots_TxtController.cs プロジェクト: Epitomy/CMS
 public virtual ActionResult Index(string body)
 {
     JsonResultEntry resultEntry = new JsonResultEntry(ModelState);
     try
     {
         Robots_Txt robot_txt = new Robots_Txt(Site);
         robot_txt.Save(body);
         resultEntry.AddMessage("The robots.txt has been saved.".Localize());
     }
     catch (Exception e)
     {
         resultEntry.AddException(e);
     }
     return Json(resultEntry);
 }