Exemple #1
0
        public string VSW_Core_GetByCode(string code, string defalt)
        {
            if (listResource.ContainsKey(code))
            {
                return(listResource[code]);
            }
            else
            {
                if (_IniResourceService == null)
                {
                    _IniResourceService = new IniResourceService(HttpContext.Current.Server.MapPath("~/Views/Lang/" + lang_code + ".ini"));
                }

                return(_IniResourceService.VSW_Core_GetByCode(code, defalt));
            }
        }
Exemple #2
0
        public static string GetValue(string code, string defalt)
        {
            SysLangEntity _Lang = SysLangService.Instance.CreateQuery()
                                  .Where(o => o.Code == CurrentCode)
                                  .ToSingle_Cache();

            if (_Lang == null)
            {
                return(defalt);
            }

            WebResourceEntity _Resource = WebResourceService.Instance.GetByCode_Cache(code, _Lang.ID);

            if (_Resource != null)
            {
                return(_Resource.Value);
            }

            IniResourceService _IniResourceService = new IniResourceService(HttpContext.Current.Server.MapPath("~/Views/Lang/" + _Lang.Code + ".ini"));

            return(_IniResourceService.VSW_Core_GetByCode(code, defalt));
        }
Exemple #3
0
        public static string GetValue(string code, string defalt)
        {
            IniResourceService ResourceService = new IniResourceService(System.Web.HttpContext.Current.Server.MapPath("~/" + VSW.Core.Web.Setting.Sys_CPDir + "/Views/Lang/" + CurrentCode + ".ini"));

            return(ResourceService.VSW_Core_GetByCode(code, defalt));
        }