public JsonResult LoadAccountData(AccountSearchModel model, GridPager pager) { var pagerTuple = Tuple.Create(pager.SortColumn, pager.OrderBy, pager.Page, pager.Size, 0, 0); var result = _component.GetAccountRecordList(model.Username, ref pagerTuple); pager.Count = pagerTuple.Item5; pager.TotalPage = pagerTuple.Item6; var models = result.ToGridJson(pager, item => new { Id = item.Id, Username = item.Username, MerchantName = item.MerchantName == null ? "" : item.MerchantName, Cellphone = item.Cellphone, Email = item.Email == null ? "" : item.Email, Status = item.Status, Operate = item.Id }); return(Json(models, JsonRequestBehavior.AllowGet)); }