root/trunk/eCard/eCardMVC/adMoto.Payments.Web/Global.asax.cs @ 976

Wersja 971, 1.5 KB (wprowadzona przez marek, 16 years temu)

re #215

Line 
1using System.Web.Mvc;
2using System.Web.Routing;
3using System.Threading;
4
5namespace adMoto.Payments.Web
6{
7    public class MvcApplication : System.Web.HttpApplication
8    {
9        public static void RegisterRoutes(RouteCollection routes)
10        {
11            routes.IgnoreRoute("elmah.axd");
12            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
13            var lang = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToLower();
14
15            routes.MapRoute(
16                "eCard",
17                "eCard/Status.aspx",
18                new { controller = "Platnosc", action = "Status" }
19                );
20
21            routes.MapRoute(
22                "ConfirmationOk",
23                "{language}/Platnosc/Ok/{id}/{order}/",
24                new { controller = "Platnosc", action = "Ok", id = "", order = "", language = "" }
25                );
26
27            routes.MapRoute(
28                "ConfirmationFail",
29                "{language}/Platnosc/Fail/{id}/",
30                new { controller = "Platnosc", action = "Ok", id = "", order = "", language = "" }
31                );
32
33            routes.MapRoute(
34                "Default",
35                "{language}/{controller}/{action}/{id}",
36                new { language = lang, controller = "Home", action = "Index", id = "" }
37                );
38        }
39        protected void Application_Start()
40        {
41            RegisterRoutes(RouteTable.Routes);
42        }
43
44    }
45}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.