Ejemplo n.º 1
0
        public static SysConfigModel GetSysConfig(SysConfigCode strCode)
        {
            //if (lstSysConfig == null)
            //{
            //    lock (objLockSys)
            //    {
            //        if (lstSysConfig == null)
            //        {
            //            BaseService<SysConfig> ser = new BaseService<SysConfig>();
            //            lstSysConfig = ser.Entities.ToList();
            //        }
            //    }
            //}

            return(lstSysConfig.Find(a => a.ConfigCode == (int)strCode));
        }
Ejemplo n.º 2
0
        public static string GetSysConfig(SysConfigCode strCode, string strDefault)
        {
            var obj = GetSysConfig(strCode);

            return(obj == null || string.IsNullOrEmpty(obj.ConfigValue) ? strDefault : obj.ConfigValue);
        }