Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ControllerBuilder.Current.DefaultNamespaces.Clear();
- ControllerBuilder.Current.DefaultNamespaces.Add("App.Web.Driver");
- context.MapRoute(
- "Permit_default",
- "Permit/{controller}/{action}/{id}",
- new { controller = "Home", action = "Index", id = UrlParameter.Optional },
- new[] { "App.Web.Driver.Areas.Permit.Controllers" });
- context.MapRoute(
- "Permit_Payment",
- "Permit/{controller}/{action}/{id}",
- new { controller = "Payment", action = "AutoApprove", id = UrlParameter.Optional },
- new[] { "App.Web.Driver.Areas.Permit.Controllers" });
- namespace App.Web.Shared.Areas.Permit.Controllers
- {
- public class PaymentController : BaseController
- {
- protected PaymentController(ServiceLocator serviceLocator) : base(serviceLocator)
- {
- }
- [HttpGet]
- public ActionResult AutoApprove([Bind(Prefix = "id")] string permitRequestCode)
- {
- /// Sample code
- }
- }
- }
- namespace App.Web.Driver.Areas.Permit.Controllers
- {
- [AuthorizeAccess(Roles = ApplicationRoles.Driver | ApplicationRoles.PermitAdministrator)]
- public class PaymentController : Shared.Areas.Permit.Controllers.PaymentController // BaseController
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="PaymentController"/> class.
- /// </summary>
- /// <param name="serviceLocator">The service locator.</param>
- public PaymentController(ServiceLocator serviceLocator) : base(serviceLocator)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement