using System;
﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using TelerikMvcApp10.Models;

namespace TelerikMvcApp10.Controllers
{
	public partial class GridController : Controller
    {
		public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
		{
			var result = new List<OrderViewModel>();

			OrderViewModel order1 = new OrderViewModel() { OrderID = 1, TrackingSite = "https://www.google.com/" };
			OrderViewModel order2 = new OrderViewModel() { OrderID = 2, TrackingSite = "https://www.telerik.com/" };
			OrderViewModel order3 = new OrderViewModel() { OrderID = 3, TrackingSite = "https://docs.telerik.com/kendo-ui/introduction" };
			OrderViewModel order4 = new OrderViewModel() { OrderID = 4, TrackingSite = "https://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods" };
			OrderViewModel order5 = new OrderViewModel() { OrderID = 5, TrackingSite = "https://feedback.telerik.com/themes" };

			result.Add(order1);
            result.Add(order2);
            result.Add(order3);
            result.Add(order4);
            result.Add(order5);


            return Json(result.ToDataSourceResult(request));
		}
	}
}
