public static void RegisterRoutes(RouteCollection routes) { #region AttachmentRule routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(AttachmentRuleIndex, "administration/attachments/rules/all/{page}", new { controller = "attachmentrule", action = "index", page = "1" }), routes.MapRoute(AttachmentRuleHistory, "administration/attachments/rules/history/{sort}/{order}/{page}/{id}", new { controller = "attachmentrule", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(AttachmentRuleUpdate, "administration/attachments/rules/update/{id}", new { controller = "attachmentrule", action = "update", id = "" }), routes.MapRoute(AttachmentRuleDelete, "administration/attachments/rules/delete/{id}", new { controller = "attachmentrule", action = "delete", id = "" }), routes.MapRoute(AttachmentRuleCreate, "administration/attachments/rules/create", new { controller = "attachmentrule", action = "create" }) ); #endregion #region Attachment routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(AttachmentIndex, "administration/attachments/all/{sort}/{order}/{page}", new { controller = "attachment", action = "index", sort = "created", order = "descending", page = "1" }), routes.MapRoute(AttachmentHistory, "administration/attachments/history/{sort}/{order}/{page}/{id}", new { controller = "attachment", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(AttachmentUpdate, "administration/attachments/update/{id}", new { controller = "attachment", action = "update", id = "" }), routes.MapRoute(AttachmentDelete, "administration/attachments/delete/{id}", new { controller = "attachment", action = "delete", id = "" }) ); #endregion #region Country routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(CountryIndex, "administration/countries/all/{sort}/{order}/{page}", new { controller = "country", action = "index", sort = "title", order = "ascending", page = "1" }), routes.MapRoute(CountryHistory, "administration/countries/history/{sort}/{order}/{page}/{id}", new { controller = "country", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(CountryUpdate, "administration/countries/update/{id}", new { controller = "country", action = "update", id = "" }), routes.MapRoute(CountryDelete, "administration/countries/delete/{id}", new { controller = "country", action = "delete", id = "" }), routes.MapRoute(CountryCreate, "administration/countries/create", new { controller = "country", action = "create" }) ); #endregion #region Setting routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(SettingIndex, "administration/settings/all/{sort}/{order}/{page}", new { controller = "setting", action = "index", sort = "group", order = "ascending", page = "1" }), routes.MapRoute(SettingHistory, "administration/settings/history/{sort}/{order}/{page}/{id}", new { controller = "setting", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(SettingUpdate, "administration/settings/update/{id}", new { controller = "setting", action = "update", id = "" }), routes.MapRoute(SettingDelete, "administration/settings/delete/{id}", new { controller = "setting", action = "delete", id = "" }), routes.MapRoute(SettingCreate, "administration/settings/create", new { controller = "setting", action = "create" }) ); #endregion #region TimeZone routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(TimeZoneIndex, "administration/timezones/all/{sort}/{order}/{page}", new { controller = "timezone", action = "index", sort = "offset", order = "ascending", page = "1" }), routes.MapRoute(TimeZoneHistory, "administration/timezones/history/{sort}/{order}/{page}/{id}", new { controller = "timezone", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(TimeZoneUpdate, "administration/timezones/update/{id}", new { controller = "timezone", action = "update", id = "" }), routes.MapRoute(TimeZoneDelete, "administration/timezones/delete/{id}", new { controller = "timezone", action = "delete", id = "" }), routes.MapRoute(TimeZoneCreate, "administration/timezones/create", new { controller = "timezone", action = "create" }) ); #endregion #region Home routes.CreateArea("administration", "Coders.Web.Controllers.Administration", routes.MapRoute(HomeIndex, "administration", new { controller = "home", action = "index" }) ); #endregion }
public static void RegisterRoutesTo(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); // The areas below must be registered from greater subareas to fewer; // i.e., the root area should be the last area registered // Example illustrative routes with a nested area - note that the order of registration is important //routes.CreateArea("Organization/Department", "DI.Colef.Sia.Web.Controllers.Organization.Department", // routes.MapRoute(null, "Organization/Department/{controller}/{action}", new { action = "Index" }), // routes.MapRoute(null, "Organization/Department/{controller}/{action}/{id}") //); routes.MapRoute(null, "Login", new { controller = "Session", action = "Index" }); routes.MapRoute(null, "Logout", new { controller = "Session", action = "Destroy" }); routes.CreateArea("Productos", "DecisionesInteligentes.Colef.Sia.Web.Controllers.Productos", routes.MapRoute("Productos", "Productos/{controller}/{id}/{action}", null, new {id = @"\d{1,6}"}), routes.MapRoute(null, "Productos/{controller}/{action}", new {action = "Index"}) ); routes.CreateArea("Catalogos", "DecisionesInteligentes.Colef.Sia.Web.Controllers.Catalogos", routes.MapRoute(null, "Catalogos/{controller}/{id}/{action}", null, new {id = @"\d{1,6}"}), routes.MapRoute(null, "Catalogos/{controller}/{action}", new {action = "Index"}) ); // Routing config for the root area routes.CreateArea("Root", "DecisionesInteligentes.Colef.Sia.Web.Controllers", routes.MapRoute(null, "{controller}/{id}/{action}/{tipoProducto}", new { action = "Index", id = "", tipoProducto = "" }, new { id = @"\d{1,6}", tipoproducto = @"\d{1,6}" }), routes.MapRoute(null, "{controller}/{id}/{action}", null, new {id = @"\d{1,6}"}), routes.MapRoute("Default", "{controller}/{action}", new {controller = "Home", action = "Index"}) ); routes.MapRoute( null, "{controller}/{id}/{action}/{tipoproducto}", new { action = "Index", id = "", tipoproducto = "" }, new { id = @"\d{1,6}", tipoproducto = @"\d{1,6}" } ); routes.MapRoute( null, "{controller}/{id}/{action}", new { action = "Index", id = "" }, new { id = @"\d{1,6}" } ); routes.MapRoute( null, "{controller}/{action}", new {action = "Index"} ); }
public static void RegisterRoutes(RouteCollection routes) { #region Host Search routes.CreateArea("administration/users", "Coders.Web.Controllers.Users.Administration", routes.MapRoute(HostSearchIndex, "administration/users/hosts/search/results/{id}/{page}", new { controller = "hostsearch", action = "index", id = "", page = "1" }), routes.MapRoute(HostSearchDelete, "administration/users/hosts/search/delete/{id}", new { controller = "hostsearch", action = "delete", id = "" }), routes.MapRoute(HostSearchCreate, "administration/users/hosts/search/create", new { controller = "hostsearch", action = "create" }) ); #endregion #region Search routes.CreateArea("administration/users", "Coders.Web.Controllers.Users.Administration", routes.MapRoute(SearchIndex, "administration/users/search/results/{id}/{page}", new { controller = "search", action = "index", id = "", page = "1" }), routes.MapRoute(SearchDelete, "administration/users/search/delete/{id}", new { controller = "search", action = "delete", id = "" }), routes.MapRoute(SearchCreate, "administration/users/search/create", new { controller = "search", action = "create" }) ); #endregion #region Ban routes.CreateArea("administration/users", "Coders.Web.Controllers.Users.Administration", routes.MapRoute(BanIndex, "administration/users/bans/all/{sort}/{order}/{page}", new { controller = "ban", action = "index", sort = "created", order = "descending", page = "1" }), routes.MapRoute(BanUpdate, "administration/users/bans/update/{id}", new { controller = "ban", action = "update", id = "" }), routes.MapRoute(BanDelete, "administration/users/bans/delete/{id}", new { controller = "ban", action = "delete", id = "" }), routes.MapRoute(BanCreate, "administration/users/bans/create", new { controller = "ban", action = "create" }) ); #endregion #region Role routes.CreateArea("administration/users", "Coders.Web.Controllers.Users.Administration", routes.MapRoute(RoleIndex, "administration/users/roles/all", new { controller = "role", action = "index" }), routes.MapRoute(RoleHistory, "administration/users/roles/history/{sort}/{order}/{page}/{id}", new { controller = "role", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(RoleUpdate, "administration/users/roles/update/{id}", new { controller = "role", action = "update", id = "" }), routes.MapRoute(RoleDelete, "administration/users/roles/delete/{id}", new { controller = "role", action = "delete", id = "" }), routes.MapRoute(RoleCreate, "administration/users/roles/create", new { controller = "role", action = "create" }), routes.MapRoute(RolePrivilege, "administration/users/roles/privilege/{id}", new { controller = "role", action = "privilege", id = "" }) ); #endregion #region User routes.CreateArea("administration/users", "Coders.Web.Controllers.Users.Administration", routes.MapRoute(HomeIndex, "administration/users/all/{sort}/{order}/{page}", new { controller = "home", action = "index", sort = "name", order = "descending", page = "1" }), routes.MapRoute(HomeHistory, "administration/users/history/{sort}/{order}/{page}/{id}", new { controller = "home", action = "history", sort = "created", order = "descending", page = "1", id = "" }), routes.MapRoute(HomeUpdate, "administration/users/update/{id}", new { controller = "home", action = "update", id = "" }), routes.MapRoute(HomeDelete, "administration/users/delete/{id}", new { controller = "home", action = "delete", id = "" }), routes.MapRoute(HomeReset, "administration/users/reset/{id}", new { controller = "home", action = "reset", id = "" }), routes.MapRoute(HomeCreate, "administration/users/create", new { controller = "home", action = "create" }) ); #endregion }
public static void RegisterRoutesTo(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); // The areas below must be registered from greater subareas to fewer; // i.e., the root area should be the last area registered // Example illustrative routes with a nested area - note that the order of registration is important //routes.CreateArea("Organization/Department", "PaintballTournaments.Web.Controllers.Organization.Department", // routes.MapRoute(null, "Organization/Department/{controller}/{action}", new { action = "Index" }), // routes.MapRoute(null, "Organization/Department/{controller}/{action}/{id}") //); //routes.CreateArea("Organization", "PaintballTournaments.Web.Controllers.Organization", // routes.MapRoute(null, "Organization/{controller}/{action}", new { action = "Index" }), // routes.MapRoute(null, "Organization/{controller}/{action}/{id}") //); // Routing config for the root area routes.CreateArea("Root", "PaintballTournaments.Web.Controllers", routes.MapRoute(null, "", new { controller = "Home", action = "Index" }), routes.MapRoute(null, "{controller}/{action}/default.aspx", new { controller = "Home", action = "Index" }), routes.MapRoute(null, "{controller}/{action}/{id}/default.aspx") ); }
public static void RegisterRoutesTo(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); routes.CreateArea("Root", "Infoboard.Web", routes.MapRoute(null, "{controller}/{action}", new { controller = "Home", action = "Index" }), routes.MapRoute(null, "{controller}/{action}/{id}")); }
/// <summary> /// Registers the routes. /// </summary> /// <param name="routes">The routes.</param> public static void RegisterRoutes(RouteCollection routes) { #region Avatar routes.CreateArea("users", "Coders.Web.Controllers.Users", routes.MapRoute(AvatarIndex, "account/avatars/all/{page}", new { controller = "avatar", action = "index", page = "1" }), routes.MapRoute(AvatarSelect, "account/avatars/assign/{id}", new { controller = "avatar", action = "assign", id = "" }), routes.MapRoute(AvatarDelete, "account/avatars/delete/{id}", new { controller = "avatar", action = "delete", id = "" }), routes.MapRoute(AvatarCreate, "account/avatars/create", new { controller = "avatar", action = "create" }) ); #endregion #region Preference routes.CreateArea("users", "Coders.Web.Controllers.Users", routes.MapRoute(PreferenceUpdate, "account/preference/update", new { controller = "preference", action = "update" }) ); #endregion #region Search routes.CreateArea("users", "Coders.Web.Controllers.Users", routes.MapRoute(SearchIndex, "users/search/results/{id}/{page}", new { controller = "search", action = "index", id = "", page = "1" }), routes.MapRoute(SearchCreate, "users/search/create", new { controller = "search", action = "create" }) ); #endregion #region Auth routes.CreateArea("users", "Coders.Web.Controllers.Users", routes.MapRoute(AuthLogOn, "account/logon", new { controller = "auth", action = "logon" }), routes.MapRoute(AuthLogOff, "account/logoff", new { controller = "auth", action = "logoff" }), routes.MapRoute(AuthReset, "account/password/reset", new { controller = "auth", action = "reset" }), routes.MapRoute(AuthUpdate, "account/password/update", new { controller = "auth", action = "update" }) ); #endregion #region User routes.CreateArea("users", "Coders.Web.Controllers.Users", routes.MapRoute(Create, "account/create", new { controller = "home", action = "create" }), routes.MapRoute(Update, "account/update", new { controller = "home", action = "update" }), routes.MapRoute(Index, "users/all/{sort}/{order}/{page}", new { controller = "home", action = "index", sort = "name", order = "ascending", page = "1" }), routes.MapRoute(Detail, "users/{slug}/{id}", new { controller = "home", action = "detail", id = "", slug = "" }) ); #endregion }
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" }); routes.IgnoreRoute("{*allashx}", new { allashx = @".*\.ashx(/.*)?" }); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); routes.CreateArea("manager", "Cuyahoga.Web.Manager.Controllers", routes.MapRoute(null, "manager/Pages/Design/{id}/Section/{sectionId}", new { action = "Design", controller = "Pages" }), routes.MapRoute(null, "manager/{controller}/{action}/{id}", new { action = "Index", controller = "Dashboard", id = "" }), routes.MapRoute(null, "Login", new { action = "Index", controller = "Login" }) // Also put the login functionality in the manager area. ); routes.CreateArea("modules/shared", "Cuyahoga.Web.Modules.Shared.Controllers", routes.MapRoute(null, "modules/shared/{controller}/{action}/{id}", new { action = "Index", id = "" }) ); // Routing config for the root area (not currently used) //routes.CreateArea("root", "Cuyahoga.Web.Controllers", // routes.MapRoute(null, "{controller}/{action}", new { controller = "Home", action = "Index" }) //); }
public static void RegisterRoutesTo(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); // The areas below must be registered from greater subareas to fewer; // i.e., the root area should be the last area registered // Example illustrative route with a nested area //routes.CreateArea("Organization/Department", "Northwind.Web.Controllers.Organization.Department", // routes.MapRoute(null, "Organization/Department/{controller}/{action}", new { action = "Index" }) //); routes.CreateArea("Organization", "Northwind.Web.Controllers.Organization", routes.MapRoute(null, "Organization/{controller}/{action}", new { action = "Index" }), routes.MapRoute(null, "Organization/{controller}/{action}/{id}") ); // Routing config for the root area routes.CreateArea("Root", "Northwind.Web.Controllers", routes.MapRoute(null, "{controller}/{action}", new { controller = "Home", action = "Index" }) ); }
/// <summary> /// 注册产品和物料管理路径 /// </summary> /// <param name="routes"></param> private static void RegisterProduct(RouteCollection routes) { routes.CreateArea("Product", "Git.Storage.Web.Areas.Product.Controllers", routes.MapRoute("Product_Default", "{controller}/{action}", new { controller = "Home", action = "Index" })); }
public void RegisterRoutes(RouteCollection routes) { routes.CreateArea("Modules/StaticHtml", "Cuyahoga.Modules.StaticHtml.Controllers", routes.MapRoute("StaticHtmlRoute", "Modules/StaticHtml/{controller}/{action}/{id}", new { action = "Edit", controller = "", id = "" }) ); }
public void RegisterRoutes(RouteCollection routes) { routes.CreateArea("Modules/Articles", "Cuyahoga.Modules.Articles.Controllers", routes.MapRoute("ArticlesRoute", "Modules/Articles/{controller}/{action}/{id}", new { action = "Index", controller = "", id = "" }) ); }
public void RegisterRoutes(RouteCollection routes) { routes.CreateArea("Modules/Downloads", "Cuyahoga.Modules.Downloads.Controllers", routes.MapRoute("DownloadsRoute", "Modules/Downloads/{controller}/{action}/{id}", new { action = "Index", controller = "", id = "" }) ); }
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.CreateArea("Root", "Git.Storage.Web.Controllers", routes.MapRoute("Root_Default", "{controller}/{action}", new { controller = "Home", action = "Index" })); }