Пример #1
0
        public ActionResult FamilyTreePartialView(PersonViewModel node)
        {
            PersonModel        selectedNode = _dalModelRetriever.GetPersonById(node.Id);
            List <PersonModel> peopleList   = _dalModelRetriever.GetAllPeople();

            selectedNode.Relatives = _familyManager.FindChildren(selectedNode, peopleList);
            PersonModel lastDescendant = _familyManager.GetFullFamilyTreeFromRoot(selectedNode, peopleList);

            ViewData["SelectedNode"]     = selectedNode.Id;
            ViewData["LastDescendantId"] = lastDescendant.Id;
            return(PartialView("_FamilyTree", lastDescendant));
        }