using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Xml;
using System.Text;
using System.IO;

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

            return View();
        }

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

        [HttpPost]
        public string LoadClassificationTree()
        {
            string sampleString = "[{ Value: \"1\", Text: \"Product 1\", Expanded: true," +
                                    "Items: [{ Value: \"4\", Text: \"Product 4\", Expanded: true," +
                                   "Items: [{ Value: \"6\", Text: \"Product 6\" },{ Value: \"7\", Text: \"Product 7\" }]}," +
                                    "{ Value: \"5\", Text: \"Product 5\" }]},{ Value: \"2\", Text: \"Product 2 (unavailable)\", Enabled: false }," +
                                    "{ Value: \"3\", Text: \"Product 3\" }];";
            return sampleString;
        }      
    }
}
