public ActionResult Index(int rootId = 0, int parentId = 0, int childId = 0) { ViewBag.ListRoot = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Root, 0); ViewBag.ListParent = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Parent, rootId); ViewBag.ListChild = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Child, parentId); var data = ProductTypeService.GetList(rootId, parentId, childId); var model = new ProductTypeViewModels { RootId = rootId, ParentId = parentId, ChildId = childId, Data = data }; return(View("Index", model)); }