public ActionResult Index()
 {
     var model = new IndustryCateSearchViewModel();
     return View(model);
 }
        public ActionResult getall(IndustryCateSearchViewModel model, int page = 1, int rows = 500)
        {
            var query = IndustryCateService.GetALL();

            if (!string.IsNullOrEmpty(model.IndustryCate_SearchName))
            {
                query = query.Where(x => x.CateName.Contains(model.IndustryCate_SearchName));
            }

            var count = query.Count();

            var data = query.Select(x => new IndustryCateListViewModel()
            {
                ID = x.ID,

                CateName = x.CateName,

                PID = x.PID,
                _parentId = x.PID,
                Code = x.Code,

                Level = x.Level,

                OrderIndex = x.OrderIndex,

            })
            .OrderBy(x => x.ID)
            .Skip((page - 1) * rows)
            .Take(rows).ToList();

            var obj = new
            {
                rows = data,
                total = count
            };
            return Json(obj);
        }