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

namespace RefreshDropDown.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult GetVendorContacts([DataSourceRequest]DataSourceRequest request)
        {
            var result = new List<object>()
            {
                new { ContactName = "Steve" },
                new { ContactName = "Jane" },
                new { ContactName = "John" },
                new { ContactName = "Ivan" },
                new { ContactName = "Tom" },
                new { ContactName = "Jack" }
            };

            return Json(result, JsonRequestBehavior.AllowGet);
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
