コード例 #1
0
        public JsonResult GetFeedCowList(int feid)
        {
            List <FeedCowInfo> FeedCowInfo = jobBll.GetFeedCowlistByfeid(feid);
            var gridData = new { Rows = FeedCowInfo, Total = FeedCowInfo.Count };

            return(Json(gridData, JsonRequestBehavior.AllowGet));

            #region MyRegion
            //FeedCowInfo[] feedlistCowInfo = client.GetFeedCowInfoList(feid);
            //List<FeedCowInfo> listfeedCowInfo = new List<FeedCowInfo>();
            //foreach (var item in feedlistCowInfo)
            //{
            //    listfeedCowInfo.Add(new FeedCowInfo()
            //    {
            //        csid = item.csid,
            //        csname = item.csname,
            //        flint = item.flint,
            //        flweig = item.flweig
            //    });
            //}
            //var gridData = new { Rows = listfeedCowInfo, Total = listfeedCowInfo.Count };
            //return Json(gridData, JsonRequestBehavior.AllowGet);
            #endregion
        }