zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Web.Mvc;
 
namespace HH.WMS.WebUI.Areas.Sys
{
    public class SysAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Sys";
            }
        }
 
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Sys_default",
                "Sys/{controller}/{action}",
                new { action = "Index", id = UrlParameter.Optional },
                new string[] { "HH.WMS.WebUI.Areas." + this.AreaName + ".Controllers" }
            );
            //context.MapRoute(
            //    //this.AreaName + "default",
            //    //this.AreaName + "/{controller}/{action}/{id}",
            //    "Sys_default",
            //    "Sys/{controller}/{action}/{id}",
            //    new { area = this.AreaName, controller = "Home", action = "Index", id = UrlParameter.Optional },
            //    new string[] { "HH.WMS.WebUI.Areas." + this.AreaName + ".Controllers" }
            //);
 
            ////GlobalConfiguration.Configuration.Routes.MapHttpRoute(
            ////    this.AreaName + "Api",
            ////    "api/" + this.AreaName + "/{controller}/{action}/{id}",
            ////    new { area = this.AreaName, action = RouteParameter.Optional, id = RouteParameter.Optional, namespaceName = new string[] { string.Format("HH.WMS.WebUI.Areas.{0}.Controllers", this.AreaName) } },
            ////    new { action = new StartWithConstraint() }
            ////);
        }
    }
}