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

namespace WebApplication1.Controllers {
  public class TrucController : Controller {
    private static Truc[] Trucs = { new Truc( "Un", "25/12/1832" ), new Truc( "Deux", "26/12/2589" ), new Truc( "Trois", "27/12/1777" ) };
    public ActionResult Index() {
      ViewBag.Trucs = TrucController.Trucs;
			int n = Session["n"] == null ? 0 : (int)Session["n"];
			n++;
			Session["n"] = n;
			ViewBag.N = n;
			if( n %2 == 1 )
				return this.RedirectToAction("Index", "Truc" );
			else
				return View("Index");
    }
  }
}