Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. ControllerBuilder.Current.DefaultNamespaces.Clear();
  2. ControllerBuilder.Current.DefaultNamespaces.Add("App.Web.Driver");
  3.  
  4. context.MapRoute(
  5. "Permit_default",
  6. "Permit/{controller}/{action}/{id}",
  7. new { controller = "Home", action = "Index", id = UrlParameter.Optional },
  8. new[] { "App.Web.Driver.Areas.Permit.Controllers" });
  9.  
  10. context.MapRoute(
  11. "Permit_Payment",
  12. "Permit/{controller}/{action}/{id}",
  13. new { controller = "Payment", action = "AutoApprove", id = UrlParameter.Optional },
  14. new[] { "App.Web.Driver.Areas.Permit.Controllers" });
  15.  
  16. namespace App.Web.Shared.Areas.Permit.Controllers
  17. {
  18.  
  19. public class PaymentController : BaseController
  20. {
  21. protected PaymentController(ServiceLocator serviceLocator) : base(serviceLocator)
  22. {
  23. }
  24.  
  25. [HttpGet]
  26. public ActionResult AutoApprove([Bind(Prefix = "id")] string permitRequestCode)
  27. {
  28. /// Sample code
  29. }
  30. }
  31. }
  32.  
  33. namespace App.Web.Driver.Areas.Permit.Controllers
  34. {
  35.  
  36. [AuthorizeAccess(Roles = ApplicationRoles.Driver | ApplicationRoles.PermitAdministrator)]
  37. public class PaymentController : Shared.Areas.Permit.Controllers.PaymentController // BaseController
  38. {
  39. /// <summary>
  40. /// Initializes a new instance of the <see cref="PaymentController"/> class.
  41. /// </summary>
  42. /// <param name="serviceLocator">The service locator.</param>
  43. public PaymentController(ServiceLocator serviceLocator) : base(serviceLocator)
  44. {
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement