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