public ActionResult DownLoadKnowlegeList(KnowlegeModel model) { _ilog.Info(string.Format("方法名:{0};参数:{1}", "DownLoadKnowlegeList", Serializer.ToJson(model))); var result = new StandardJsonResult <dynamic>(); result.Try(() => { if (!ModelState.IsValid) { throw new KnownException(ModelState.GetFirstError()); } var knowlege = service.MakeUrlWithFileName(model.FileName); result.Value = new { FileUrl = knowlege }; }); _ilog.Info(string.Format("方法名:{0};执行结果:{1}", "DownLoadKnowlegeList", Serializer.ToJson(result))); return(result); }
public ActionResult GetKnowlegeList(KnowlegeModel model) { _ilog.Info(string.Format("方法名:{0};参数:{1}", "GetKnowledgeList", Serializer.ToJson(model))); var result = new StandardJsonResult <dynamic>(); result.Try(() => { if (!ModelState.IsValid) { throw new KnownException(ModelState.GetFirstError()); } var knowlegelist = service.GetAllKnowlege(BCSession.User.EnterpriseID); result.Value = new { KnowlegeList = knowlegelist }; }); _ilog.Info(string.Format("方法名:{0};执行结果:{1}", "GetKnowledgeList", Serializer.ToJson(result))); return(result); }