public JsonResult ListTK(int page, int rows, string status, string OrderNum) { string OrderNo = "0"; if (!string.IsNullOrEmpty(OrderNum)) { OrderNo = OrderNum; } TKQuery tq = new TKQuery() { TKType = int.Parse(status), PageNo = page, PageSize = rows, OrderNo = Convert.ToInt64(OrderNo) }; PageModel <TK> tk = ServiceHelper.Create <ITKService>().getTkList(tq, 0, 0); var array = from item in tk.Models.ToArray() select new { Id = item.Id, OrderId = item.OrderId, TKAmont = item.TKAmont, TKDate = item.TKDate, EndDate = item.EndDate, TKResion = item.TKResion, TKType = item.TKType, BuyerName = ServiceHelper.Create <IMemberService>().GetMember(item.UserId) == null ? "" : ServiceHelper.Create <IMemberService>().GetMember(item.UserId).UserName, SellerName = ServiceHelper.Create <IManagerService>().GetMemberIdByShopId(item.SellerUserId) == null ? "" : ServiceHelper.Create <IManagerService>().GetMemberIdByShopId(item.SellerUserId).UserName, }; return(Json(new { rows = array, total = tk.Total })); }
public JsonResult List(int page, int rows, string OrderNo, int Type) { if (OrderNo == "") { OrderNo = "0"; } TKQuery tq = new TKQuery() { TKType = Type, PageNo = page, PageSize = rows, OrderNo = Convert.ToInt64(OrderNo) }; PageModel <TK> tk = ServiceHelper.Create <ITKService>().getTkList(tq, base.CurrentUser.Id, 0); var array = from item in tk.Models.ToArray() select new { Id = item.Id, OrderId = item.OrderId, TKAmont = item.TKAmont, TKDate = item.TKDate, EndDate = item.EndDate, TKResion = item.TKResion, TKType = item.TKType, SellerUserId = item.SellerUserId, SellerName = ServiceHelper.Create <IManagerService>().GetMemberIdByShopId(item.SellerUserId) == null ? "" : ServiceHelper.Create <IManagerService>().GetMemberIdByShopId(item.SellerUserId).UserName }; return(Json(new { rows = array, total = tk.Total })); }