Esempio n. 1
0
        public JsonResult DetailList(long id, int page = 1, int rows = 20)
        {
            var result = _iBonusService.GetDetail(id, page, rows);

            var datas = result.Models.ToList().Select(p => new BonusReceiveModel()
            {
                OpenId               = p.OpenId,
                Price                = p.Price,
                ReceiveTime          = p.ReceiveTime == null ? "" : ((DateTime)p.ReceiveTime).ToString("yyyy-MM-dd"),
                UserName             = p.Himall_Members == null ? "-" : p.Himall_Members.UserName,
                IsTransformedDeposit = p.IsTransformedDeposit
            }).ToList();
            DataGridModel <BonusReceiveModel> model = new DataGridModel <BonusReceiveModel>
            {
                rows  = datas,
                total = result.Total
            };

            return(Json(model));
        }
Esempio n. 2
0
        public JsonResult DetailList(long id, int page = 1, int rows = 20)
        {
            PageModel <BonusReceiveInfo> detail = _bonusService.GetDetail(id, page, rows);
            List <BonusReceiveModel>     list   = (
                from p in detail.Models.ToList()
                select new BonusReceiveModel()
            {
                OpenId = p.OpenId,
                Price = p.Price,
                ReceiveTime = (!p.ReceiveTime.HasValue ? "" : p.ReceiveTime.Value.ToString("yyyy-MM-dd")),
                UserName = (p.Himall_Members == null ? "-" : p.Himall_Members.UserName),
                IsTransformedDeposit = p.IsTransformedDeposit
            }).ToList();
            DataGridModel <BonusReceiveModel> dataGridModel = new DataGridModel <BonusReceiveModel>()
            {
                rows  = list,
                total = detail.Total
            };

            return(Json(dataGridModel));
        }