예제 #1
0
        public JsonResult TreeDataOnDemand(string path, string binding, int depth)
        {
            TreeModel model = new TreeModel();

            switch (depth)
            {
                case 0:
                    model.DataSource = RepositoryFactory.GetCategoryRepository(IncludeChildren.Products).Get();
                    break;
                default:
                    model.DataSource = RepositoryFactory.GetCategoryRepository().Get();
                    break;
            }

            return model.GetData(path, binding);
        }
예제 #2
0
        public JsonResult TreeDataOnDemand(string path, string binding, int depth)
        {
            TreeModel model = new TreeModel();

            switch (depth)
            {
            case 0:
                model.DataSource = RepositoryFactory.GetCategoryRepository(IncludeChildren.Products).Get();
                break;

            default:
                model.DataSource = RepositoryFactory.GetCategoryRepository().Get();
                break;
            }

            return(model.GetData(path, binding));
        }