public string BindingDetail() { //kamus GridRequestParameters param = GridRequestParameters.Current; List <expense_item> items = RepoExpense.FindAllItem(param.Skip, param.Take, (param.Sortings != null ? param.Sortings.ToList() : null), param.Filters); int total = RepoExpense.CountItem(param.Filters); return(new JavaScriptSerializer().Serialize(new { total = total, data = new DetailStub().MapList(items) })); }
public string BindingItem() { //kamus GridRequestParameters param = GridRequestParameters.Current; Business.Infrastructure.FilterInfo filters = param.Filters; int total = 0; //expense expenseSet = new expense(); //List<expense_item> items = RepoExpense.FindAllItem().Where(x => x.id_expense == expenseSet.id).ToList(); List <expense_item> items = new List <expense_item>(); items = RepoExpense.FindAllItem(param.Skip, param.Take, (param.Sortings != null ? param.Sortings.ToList() : null), param.Filters); total = RepoExpense.CountItem(param.Filters); return(new JavaScriptSerializer().Serialize(new { total = total, data = new CostPresentationStub().MapListItem(items) })); }