Пример #1
0
        public PersonVM()
        {
            var person          = new PersonDB();
            var centroEducativo = new CentroEducativoDB();

            PersonList          = person.GetPersons();
            CentroEducativoList = centroEducativo.GetCentrosEducativos();
        }
Пример #2
0
        public ActionResult Tree(string topOfTree)
        {
            ViewBag.Message = "             Choose a Person by Name";

            //commented code below works!
            //string myString = "<div class=\"tree\"> <ul>" +
            //"<li> <a href=\"#\">Joseph C Boman / Marilyn Whelehan</a> " +
            //    "<ul>  <li> <a href=\"#\">Jean</a> " +

            //        "<ul> <li> <a href=\"#\">Kristen</a></li>   " +
            //        "<li> <a href=\"#\">Allie</a> " +

            //"<ul> <li> <a href=\"#\">Ava</a> " +
            //"</li> </ul> </li> " +
            //    "</ul> </li>" +
            //"</li> </ul> " +
            //"</div> ";
            //StringBuilder myStringbuilder = new StringBuilder(myString);
            //ViewBag.BuildTree = myStringbuilder.ToString();

            // commented code below works!
            //Person
            //n = new Person("Gary Brinker", "Gary MomHere", "Ron Brinker"); nodeList.Add(n);
            //n = new Person("Jayden Cagle", "Sue Boman", "Chris Cagle"); nodeList.Add(n);
            //n = new Person("Joseph C. Boman", "", ""); nodeList.Add(n);
            //n = new Person("Allison Brinker - Boman", "Jean Brinker - Boman", "Gary Brinker"); nodeList.Add(n);
            //n = new Person("Jean Brinker - Boman", "Marilyn Whelehon", "Joseph C. Boman"); nodeList.Add(n);
            //n = new Person("Kristen Brinker - Boman", "Jean Brinker - Boman", "Gary Brinker"); nodeList.Add(n);
            //n = new Person("Ava Brinker - Boman", "Alley Brinker - Boman", "Fname Lname"); nodeList.Add(n);
            //n = new Person("Sue Boman", "Marilyn Whelehon", "Joseph C. Boman"); nodeList.Add(n);
            //n = new Person("Joe Boman jr.", "Marilyn Whelehon", "Joseph C. Boman"); nodeList.Add(n);

            // Populate the list of Persons
            nodeList = PersonDB.GetPersons();

            bool firstChildIndicator = true;

            //Person topPerson = new Person('Joseph C. Boman', N'Agnes Lorenz', N'William T. Boman', N'', N'Father', N'Test Dad Desc');
            //Person topPerson = new Person("Joseph C. Boman",  "",  "", "Father",  "Test Dad Desc", "test", "");

            string name = "Joseph C. Boman"; //First person with no known parents
            // string name = "Marilyn Whelehon"; //First person with no known parents

            //Person topPerson = new Person("Sarah Ann Lovelace", "", "", "", "", "", "Test Desc");
            //FindChildren(topPerson, "any old name", "", firstChildIndicator);

            //Person topPerson = new Person("Permaness Lovelace", "", "", "", "", "", "Test Desc");
            Person topPerson = new Person(topOfTree, "", "", "", "", "", "Test Desc");

            FindChildren(topPerson, "any old name", "", firstChildIndicator);

            ViewBag.AnotherTree = //"<a href=\"/Home/Person\">" + "</a>";
                                  "This is AnotherTree";
            //" <a href=\"@Url.Action(\"Home/Person\")\">" + " </a>  ";

            //treeStringbuilder.Insert(17, " style=\"border-style:solid; border-width:5px;\"");

            ViewBag.BuildTree = treeStringbuilder.ToString();
            // UnComment This Line

            return(View());
        }