using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using Telerik.Web.UI;
using System.Web.Script.Services;
using MyNamespace;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [WebMethod(EnableSession = true)]    
    public static Dictionary<string, object> GetDataAndCount(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)
    {
        Dictionary<string, object> data = new Dictionary<string, object>();       
        
        List<EmployeeCensus> rows = new List<EmployeeCensus>();
        for (int i = startRowIndex; i < maximumRows + startRowIndex; i++)
        {
            int pretendValue =  i; 
            rows.Add(new EmployeeCensus(pretendValue, "Name " + pretendValue, 
                "LastName " + pretendValue, DateTime.Now.AddYears(i)));
        }

        data.Add("Data", rows);
        data.Add("Count",100);       

        return data;
    }
}
