Esempio n. 1
0
        public JsonResult GetOrganizationList(int limit = 10, int offset = 1)
        {
            B_Organization b_org = new B_Organization();
            List <Order>   order = new List <Order>()
            {
                Order.Asc("sort_id")
            };

            List <Domain.Navigation> list = new List <Domain.Navigation>();
            List <SearchTemplate>    st   = new List <SearchTemplate>()
            {
                new SearchTemplate()
                {
                    key = "parent_id", value = 0, searchType = Common.EnumBase.SearchType.Eq
                },
                new SearchTemplate()
                {
                    key = "", value = new int[] { offset, limit }, searchType = Common.EnumBase.SearchType.Paging
                }
            };
            var list_org      = b_org.GetList(st, order);
            var list_org_cout = b_org.GetCount(st);

            return(Json(new { total = list_org_cout, rows = list_org }, JsonRequestBehavior.AllowGet));
        }