コード例 #1
0
 public HttpResponseMessage GetDMYData([FromUri] HomeRequest request)
 {
     try
     {
         var data = _Home.GetDMYData(request);
         return(AjaxResult.Success(data).ToJsonApi());
     }
     catch (Exception)
     {
         return(AjaxResult.Error("操作失败").ToJsonApi());
     }
 }
コード例 #2
0
        /// <summary>
        /// 获取年月日数据
        /// </summary>
        /// <returns></returns>
        public ActionResult GetDMYData(HomeRequest request)
        {
            var data = _Home.GetDMYData(request);

            return(Content(data.ToJson()));
        }