예제 #1
0
        public int GetGlobalSiteOptionAsInt(string name, int defValue)
        {
            var val = GlobalSiteOptions.Where(c => c.strName == name).Select(c => c.strValue).FirstOrDefault();

            if (val == null)
            {
                return(defValue);
            }
            int ret;

            if (!int.TryParse(val, out ret))
            {
                ret = defValue;
            }
            return(ret);
        }
예제 #2
0
 public string GetGlobalSiteOption(string name)
 {
     return(GlobalSiteOptions.Where(c => c.strName == name).Select(c => c.strValue).FirstOrDefault());
 }