using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GridTest1.Models;

namespace GridTest1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            Person loPerson = new Person();
            List<Person> laPeople = new List<Person>();

            loPerson.ID = 1;
            loPerson.FirstName = "Pete";
            loPerson.LastName = "Smith";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 2;
            loPerson.FirstName = "Jane";
            loPerson.LastName = "Doe";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 3;
            loPerson.FirstName = "James";
            loPerson.LastName = "Brown";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 4;
            loPerson.FirstName = "Kevin";
            loPerson.LastName = "Bacon";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 5;
            loPerson.FirstName = "Alfred";
            loPerson.LastName = "Hitchcok";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 6;
            loPerson.FirstName = "Elvis";
            loPerson.LastName = "Presley";
            laPeople.Add(loPerson);


            loPerson.ID = 7;
            loPerson.FirstName = "James";
            loPerson.LastName = "Bond";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 8;
            loPerson.FirstName = "Phil";
            loPerson.LastName = "Collins";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 9;
            loPerson.FirstName = "Michael";
            loPerson.LastName = "Jackson";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 10;
            loPerson.FirstName = "Jennifer";
            loPerson.LastName = "Lopez";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 11;
            loPerson.FirstName = "Donald";
            loPerson.LastName = "Trump";
            laPeople.Add(loPerson);

            loPerson = new Person();
            loPerson.ID = 12;
            loPerson.FirstName = "Elvis";
            loPerson.LastName = "Presley";
            laPeople.Add(loPerson);

            var data = laPeople;

            return View(data);
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
