示例#1
0
        public ListResult <WarningCardEntity> Find(ModelParam <string> args)
        {
            var bll   = new WarningCardBLL();
            var total = 0;
            var data  = bll.GetData(args.Data, args.PageSize, args.PageIndex, out total);

            return(new ListResult <WarningCardEntity>()
            {
                Success = true, Total = total, Data = data
            });
        }
示例#2
0
        public JsonResult GetData(int rows, int page, string key)
        {
            if (rows == -1)
            {
                rows = int.MaxValue;
            }
            var bll   = new WarningCardBLL();
            var total = 0;
            var data  = bll.GetData(key, rows, page, out total);

            return(Json(new { rows = data, records = total, page, total = Math.Ceiling((decimal)total / rows) }, JsonRequestBehavior.AllowGet));
        }