예제 #1
0
        private static void MapFirst(System.Web.Routing.RouteCollection routes, string name, string path, object defaults, string[] namespaces, object constraints = null)
        {
            var route = routes.MapRoute(name, path, defaults);

            if (constraints != null)
            {
                route.Constraints = new System.Web.Routing.RouteValueDictionary(constraints);
            }
            routes.Remove(route);
            routes.Insert(0, route);
        }
        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            System.Web.Mvc.ViewEngines.Engines.Add(new ExtendedVendorViewEngine());


            routes.MapRoute("ExtendedVendorEditVendor",
                            "extendedvendor/vendor/edit/{Id}",
                            new { controller = "ExtendedVendor", action = "EditVendor", Id = 0 },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorSaveVendor",
                            "extendedvendor/vendor/save",
                            new { controller = "ExtendedVendor", action = "SaveVendor" },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorEditReview",
                            "extendedvendor/vendor/review/edit/{Id}",
                            new { controller = "ExtendedVendor", action = "EditReview", Id = 0 },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");



            routes.MapRoute("ExtendedVendorListReviewsAdmin",
                            "extendedvendor/vendor/review/list/{VendorId}",
                            new { controller = "ExtendedVendor", action = "ListReviewsAdmin", VendorId = 0 },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorDetails",
                            "vendor-details/{SeName}",
                            new { controller = "ExtendedVendor", action = "ExtendedVendorDetails" },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" });

            routes.MapRoute("ExtendedVendorListPayoutsAdmin",
                            "extendedvendor/vendor/payout/list/{VendorId}",
                            new { controller = "ExtendedVendor", action = "ListPayoutsAdmin", VendorId = 0 },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorEditPayout",
                            "extendedvendor/vendor/payout/edit/{Id}",
                            new { controller = "ExtendedVendor", action = "EditPayout", Id = 0 },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorSavePayout",
                            "extendedvendor/vendor/payout/save",
                            new { controller = "ExtendedVendor", action = "SavePayout" },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin");

            routes.MapRoute("ExtendedVendorEditReviewPublic",
                            "edit-extended-review/{OrderId}/{ProductId}",
                            new
            {
                controller = "ExtendedVendor",
                action     = "EditExtendedReview",
            },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" });

            routes.MapRoute("ExtendedVendorReviewCenterLoader",
                            "customer/review-center",
                            new
            {
                controller = "ExtendedVendor",
                action     = "UserReviews",
            },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" });

            routes.MapRoute("ExtendedVendorReviewCenter",
                            "account/review-center/{Type}",
                            new
            {
                controller = "ExtendedVendor",
                action     = "UserReviewsData",
                Type       = "product",
            },
                            new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" });
        }
예제 #3
0
        internal static void Register(System.Web.Routing.RouteCollection routes)
        {
            routes.MapRoute("home", "", new { controller = "Home", action = "Index" });
            routes.MapRoute("login", "login", new { controller = "Account", action = "Login" });
            routes.MapRoute("logout", "logout", new { controller = "Account", action = "Logout" });
            routes.MapRoute("setup", "setup/step1", new { controller = "Setup", action = "step1" });
            routes.MapRoute("create-admin-account", "setup/create-admin-account", new { controller = "Setup", action = "CreateAdmin" });
            routes.MapRoute("create-api-key", "setup/create-api-key", new { controller = "Setup", action = "CreateAPIKey" });
            routes.MapRoute("update-schema", "setup/update-schema", new { controller = "Setup", action = "UpdateSchema" });
            routes.MapRoute("add-azure-subscription", "services/add-azure-subscription", new { controller = "Home", action = "AddAzureSubscription" });
            routes.MapRoute("add-azure-subscription-step-1", "services/add-azure-subscription/step1", new { controller = "Home", action = "AddAzureSubscriptionStep1" });
            routes.MapRoute("add-azure-subscription-step-2", "services/add-azure-subscription/step2", new { controller = "Home", action = "AddAzureSubscriptionStep2" });
            routes.MapRoute("add-azure-subscription-step-3", "services/add-azure-subscription/step3", new { controller = "Home", action = "AddAzureSubscriptionStep3" });
            routes.MapRoute("add-azure-subscription-step-4", "services/add-azure-subscription/step4", new { controller = "Home", action = "AddAzureSubscriptionStep4" });

            routes.MapRoute("add-azure-subscription-download-certificate", "services/add-azure-subscription/download-certificate", new { controller = "Home", action = "DownloadCertificate" });
            routes.MapRoute("api-settings", "api-settings", new { controller = "Home", action = "ApiSettings" });
            routes.MapRoute("test-api", "test-api", new { controller = "Home", action = "TestApi" });
            routes.MapRoute("logs", "logs", new { controller = "Home", action = "Logs" });

            routes.MapRoute("add-azure-sql-database", "services/add-azure-sql-database", new { controller = "Home", action = "AddAzureSQLDatabase" });
            routes.MapRoute("add-azure-sql-database-step-1", "services/add-azure-sql-database-step-1", new { controller = "Home", action = "AddAzureSQLDatabaseStep1" });
            routes.MapRoute("add-azure-sql-database-step-2", "services/add-azure-sql-database-step-2", new { controller = "Home", action = "AddAzureSQLDatabaseStep2" });
            routes.MapRoute("add-azure-sql-database-step-3", "services/add-azure-sql-database-step-3", new { controller = "Home", action = "AddAzureSQLDatabaseStep3" });

            routes.MapRoute("dashboard", "dashboard", new { controller = "Home", action = "Dashboard" });
            routes.MapRoute("dashboard-add-chart", "dashboard/add-chart", new { controller = "Home", action = "AddDashboardChart" });
            routes.MapRoute("dashboard-remove-chart", "dashboard/remove-chart", new { controller = "Home", action = "RemoveDashboardChart" });
            routes.MapRoute("dashboard-get-chart-info", "dashboard/get-chart-info", new { controller = "Home", action = "GetChartInfoById" });


            routes.MapRoute("ThankYouForCreatingAccount", "setup/thankyou", new { controller = "Setup", action = "ThankYou" });
        }
        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            ViewEngines.Engines.Insert(0, new CustomViewEngine());
            ViewEngines.Engines.Insert(1, new FormViewEngine());

            var route = routes.MapRoute("Plugin.Dreamy.Forms.Manage", "Admin/Forms/Manage",
                                        new { controller = "Forms", action = "Manage" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });

            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.List", "Admin/Forms/List",
                                    new { controller = "Forms", action = "List" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.Create", "Admin/Forms/Create",
                                    new { controller = "Forms", action = "Create" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.Edit", "Admin/Forms/Edit/{id}",
                                    new { controller = "Forms", action = "Edit", id = UrlParameter.Optional }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.Delete", "Admin/Forms/Delete/{id}",
                                    new { controller = "Forms", action = "Delete", id = UrlParameter.Optional }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.FieldList", "Admin/Forms/FieldList/{formId}",
                                    new { controller = "Forms", action = "FieldList", formId = UrlParameter.Optional }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.FieldInsert", "Admin/Forms/FieldInsert/{fieldformId}",
                                    new { controller = "Forms", action = "FieldInsert", fieldformId = UrlParameter.Optional }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.FieldUpdate", "Admin/Forms/FieldUpdate",
                                    new { controller = "Forms", action = "FieldUpdate" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.FieldDelete", "Admin/Forms/FieldDelete",
                                    new { controller = "Forms", action = "FieldDelete" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.GetHtmlFormsList", "Admin/Forms/GetHtmlFormsList",
                                    new { controller = "Forms", action = "GetHtmlFormsList" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.SubmissionsList", "Admin/Forms/SubmissionsList",
                                    new { controller = "Forms", action = "SubmissionsList" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.Submissions", "Admin/Forms/Submissions",
                                    new { controller = "Forms", action = "Submissions" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.SubmissionPreview", "Admin/Forms/SubmissionPreview/{SubmissionId}",
                                    new { controller = "Forms", action = "SubmissionPreview" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);

            route = routes.MapRoute("Plugin.Dreamy.Forms.SubmissionUpdate", "Admin/Forms/SubmissionUpdate",
                                    new { controller = "Forms", action = "SubmissionUpdate" }, new[] { "Nop.Plugin.Dreamy.Forms.Controllers" });
            routes.Remove(route);
            routes.Insert(0, route);
        }