Beispiel #1
0
        public string Binding()
        {
            GridRequestParameters param = GridRequestParameters.Current;

            List <Context.LookupCode> items = RepoLookup.FindAll(param.Skip, param.Take, (param.Sortings != null ? param.Sortings.ToList() : null), param.Filters);

            List <LookupCode> ListModel = new List <LookupCode>();

            foreach (Context.LookupCode item in items)
            {
                ListModel.Add(new LookupCode(item));
            }

            int total = RepoLookup.Count(param.Filters);

            return(new JavaScriptSerializer().Serialize(new { total = total, data = ListModel }));
        }
Beispiel #2
0
        public string BindingKonsolidasi()
        {
            GridRequestParameters param = GridRequestParameters.Current;

            List <Context.LookupCode> items = RepoLookup.FindAll(param.Skip, 200, (param.Sortings != null ? param.Sortings.ToList() : null), param.Filters).Where(d => d.LookupCodeCategories.Category == "tms_customer_konsolidasi").ToList();

            List <LookupCode> ListModel = new List <LookupCode>();

            foreach (Context.LookupCode item in items)
            {
                LookupCode lc = new LookupCode(item);
                ListModel.Add(lc);
            }

            int total = RepoLookup.Count(param.Filters);

            return(new JavaScriptSerializer().Serialize(new { total = total, data = ListModel }));
        }