Beispiel #1
0
        private List <HelpNavViewModel> GetHelpNav(int articleID)
        {
            List <HelpNavViewModel> model = new List <HelpNavViewModel>();

            var categorys = ArticleCateService.GetKendoALL().ToList();

            foreach (var category in categorys)
            {
                HelpNavViewModel item = new HelpNavViewModel();
                item.Name  = category.CateName;
                item.Items = ArticleService.GetALL().Where(x => x.ArticleCode == category.ID).Select(x => new HelpNavItemViewModel()
                {
                    Name = x.Name,
                    ID   = x.ID
                }).ToList();
                model.Add(item);
            }

            return(model);
        }
        public ActionResult Editing_Read([DataSourceRequest] DataSourceRequest request)
        {
            var lists = articleCateService.GetKendoALL().OrderBy(x => x.ID);

            return(Json(lists.ToDataSourceResult(request)));
        }