RouteConfig.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using System.Web.Routing;
  7. namespace GreenTree.Nachtragsmanagement.Web
  8. {
  9. public class RouteConfig
  10. {
  11. public static void RegisterRoutes(RouteCollection routes)
  12. {
  13. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  14. routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
  15. routes.MapRoute(
  16. name: "Default",
  17. url: "{controller}/{action}/{id}",
  18. defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  19. );
  20. routes.MapRoute(
  21. "GreenTree.Nachtragsmanagement.Web.Administration.Users",
  22. "admin/viewusers",
  23. new
  24. {
  25. controller = "Admin",
  26. action = "ViewUsers"
  27. },
  28. new[]
  29. {
  30. "GreenTree.Nachtragsmanagement.Web.Controllers"
  31. }
  32. );
  33. routes.MapRoute(
  34. "GreenTree.Nachtragsmanagement.Web.Administration.Roles",
  35. "admin/viewroles",
  36. new
  37. {
  38. controller = "Admin",
  39. action = "ViewRoles"
  40. },
  41. new[]
  42. {
  43. "GreenTree.Nachtragsmanagement.Web.Controllers"
  44. }
  45. );
  46. routes.MapRoute(
  47. "GreenTree.Nachtragsmanagement.Web.Administration.Plugins",
  48. "admin/viewplugins",
  49. new
  50. {
  51. controller = "Admin",
  52. action = "ViewPlugins"
  53. },
  54. new[]
  55. {
  56. "GreenTree.Nachtragsmanagement.Web.Controllers"
  57. }
  58. );
  59. routes.MapRoute(
  60. "GreenTree.Nachtragsmanagement.Web.Deviation.Deviations",
  61. "admin/viewdeviations",
  62. new
  63. {
  64. controller = "Deviation",
  65. action = "ViewDeviations"
  66. },
  67. new[]
  68. {
  69. "GreenTree.Nachtragsmanagement.Web.Controllers"
  70. }
  71. );
  72. }
  73. }
  74. }