예제 #1
0
        public string Binding()
        {
            //kamus
            GridRequestParameters param = GridRequestParameters.Current;

            Business.Infrastructure.FilterInfo filters = param.Filters;
            Guid?          idOwner = (User as CustomPrincipal).IdOwner;
            int            total   = 0;
            List <expense> items   = new List <expense>();

            if (idOwner.HasValue)
            {
                AddOwnerFilter(filters, idOwner.Value);

                items = RepoExpense.FindAll(param.Skip, param.Take, (param.Sortings != null ? param.Sortings.ToList() : null), param.Filters);
                total = RepoExpense.Count(param.Filters);
            }

            return(new JavaScriptSerializer().Serialize(new { total = total, data = new CostPresentationStub().MapList(items) }));
        }