예제 #1
0
 public static ChucNangDto GetCurModuleByUrl(string url)
 {
     try
     {
         var rtn        = new ChucNangDto();
         var utilObject = UrlUltility.GetSingleModule(url);
         rtn = Common.Map <ChucNangDto>(utilObject);
         return(rtn);
     }
     catch (Exception ex)
     {
         LLogging.WriteLog(MethodBase.GetCurrentMethod().DeclaringType.ToString(), LLogging.LogType.ERR, ex);
         return(null);
     }
 }
예제 #2
0
        public static ChucNangDto GetCurModule()
        {
            var url = UrlUltility.GetUrlWithoutQueryString();

            if (string.IsNullOrEmpty(url))
            {
                return(null);
            }
            if (string.Equals(url, "/"))
            {
                url = "/Home";
            }
            var module = GetCurModuleByUrl(url);

            if (module.IsNullOrEmpty())
            {
                url = url.TrimEnd('/');
            }
            module = GetCurModuleByUrl(url);
            return(module);
        }