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

using OnlineEnrollment.ViewModels;

using Telerik.Web.Mvc;

namespace OnlineEnrollment.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        [GridAction]
        public ActionResult _FirstLook()
        {
            List<ClientViewModel> clients = new List<ClientViewModel>();
            clients.Add(new ClientViewModel() { ClientId = 1, FirstName = "Nick", LastName = "Test1" });
            clients.Add(new ClientViewModel() { ClientId = 2, FirstName = "Pat", LastName = "Test2", BirthDate = new DateTime(1978, 9, 20) });
            clients.Add(new ClientViewModel() { ClientId = 3, FirstName = "Alan", LastName = "Test3", BirthDate = new DateTime(1980, 5, 25) });

            return View(new GridModel(clients));
        }
    }
}
