/// <summary>
        /// Action that takes input from the Index Action Redirect and instantiates a TimePerson
        /// object based on the received input
        /// </summary>
        /// <param name="minYear">Starting year</param>
        /// <param name="maxYear">Ending year</param>
        /// <returns>selectedPeople object that has all of our filtered data</returns>
        public IActionResult Results(int minYear, int maxYear)
        {
            TimePerson        peoples        = new TimePerson();
            List <TimePerson> selectedPeople = new List <TimePerson> (peoples.GetPeople(minYear, maxYear));

            return(View(selectedPeople));
        }
Exemple #2
0
        public IActionResult Results(int startYear, int endYear)
        {
            //Okay to do for titles
            ViewData["Message"] = "Person of the Year Results";

            TimePerson person = new TimePerson();

            return(View(person.GetPeople(startYear, endYear)));
        }
        /// <summary>
        /// displays list with filters
        /// </summary>
        /// <param name="begYear">the beginning year that the user typed</param>
        /// <param name="endYear">the end year that the user typed</param>
        /// <returns>a view of the Results.cshtml page</returns>
        public IActionResult Results(int begYear, int endYear)
        {
            TimePerson datPerson = new TimePerson();

            return(View(datPerson.GetPeople(begYear, endYear)));
        }