コード例 #1
0
        public ActionResult Index(int pageIndex, int pageSize, string keyWord)
        {
            var pageData = _itemService.GetPage(pageIndex, pageSize, keyWord);
            var result   = new LayPadding <DATAITEM_VIEWMODEL>()
            {
                result = true,
                msg    = "success",
                list   = pageData.Items,
                count  = pageData.TotalItems
            };

            return(Content(result.ToJson()));
        }
コード例 #2
0
        public ActionResult GetSdItemParam(int page, int limit, string sdItemId, string keyWord = "")
        {
            int count    = 0;
            var pageData = _itemService.GetPage(page, limit, "", "", keyWord);
            var result   = new Dictionary <string, object>()
            {
                { "code", 0 },
                { "msg", "success" },
                { "data", pageData.Items },
                { "count", pageData.TotalItems }
            };

            //var listDataItemViewModel = _dataItemServices.GetPage(page, limit, "SdItemId", "desc", out count, sdItemId, keyWord);
            //return Success(listDataItemViewModel, count);
            return(Content(result.ToJson()));
        }