示例#1
0
 public ActionResult EditArticlePost(ArticleEditModel model)
 {
     var fileHelper = new FileHelper();
     fileHelper.Upload();
     model.FormData.UrlOfCoverImage = string.Join(";", fileHelper.GetFileInfosByKey("FormData.CoverImg").ToArray().Select(o => o.ServerFileName));
     if (model.Id.HasValue)
         _articleAction.UpdateArticle(model);
     else
         _articleAction.NewArticle(model);
     return RedirectToMessage("文章保存成功");
 }
示例#2
0
 public ActionResult EditNodeRecordPost(EditNodeRecordModel model)
 {
     var fileHelper = new FileHelper();
     fileHelper.Upload();
     model.FormData.FirstImage = string.Join(";", fileHelper.GetFileInfosByKey("FormData.FirstImage").ToArray().Select(o => o.ServerFileName));
     model.FormData.SecondImage = string.Join(";", fileHelper.GetFileInfosByKey("FormData.SecondImage").ToArray().Select(o => o.ServerFileName));
     if (model.Id.HasValue)
         _nodeRecordAction.UpdateNodeRecord(model);
     else
         _nodeRecordAction.NewNodeRecord(model);
     return RedirectToMessage("节点内容保存成功");
 }