public string HL_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.HL_Core_GetByCode(code, defalt); } }
public CPViewPage() { string lang_code = Cookies.GetValue("CP.Lang", true); //ngon ngu mac dinh neu chua co if (lang_code == string.Empty) lang_code = "vi-VN"; CurrentLang = new SysLangEntity(); CurrentLang.Code = lang_code; ResourceService = new IniResourceService(Server.MapPath("~/" + HL.Core.Web.Setting.Sys_CPDir + "/Views/Lang/" + lang_code + ".ini")); }
public string HL_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.HL_Core_GetByCode(code, defalt)); } }
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.HL_Core_GetByCode(code, defalt); }
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.HL_Core_GetByCode(code, defalt)); }
public static string GetValue(string code, string defalt) { IniResourceService ResourceService = new IniResourceService(System.Web.HttpContext.Current.Server.MapPath("~/" + HL.Core.Web.Setting.Sys_CPDir + "/Views/Lang/" + CurrentCode + ".ini")); return ResourceService.HL_Core_GetByCode(code, defalt); }
public static string GetValue(string code, string defalt) { IniResourceService ResourceService = new IniResourceService(System.Web.HttpContext.Current.Server.MapPath("~/" + HL.Core.Web.Setting.Sys_CPDir + "/Views/Lang/" + CurrentCode + ".ini")); return(ResourceService.HL_Core_GetByCode(code, defalt)); }