Example #1
0
        public static PortalSetting GetSetting()
        {
            DataCaching   data    = new DataCaching();
            PortalSetting setting = (PortalSetting)data.GetCache(key);

            if (setting != null)
            {
                return(setting);
            }
            setting = DataAccessProvider.Instance().GetPortalSetting();
            data.InsertCacheNoExpireTime(key, setting);
            return(setting);
        }
Example #2
0
 //Portals
 public override PortalSetting GetPortalSetting()
 {
     PortalSetting setting = new PortalSetting();
     DataSet ds = SqlHelper.ExecuteDataset(this.ConnectionString, "Portal_PortalSettings_GetSettings");
     if (ds != null && ds.Tables.Count > 0)
     {
         DataTable dtSettings = ds.Tables[0];
         foreach (DataRow row in dtSettings.Rows)
         {
             setting[row["SettingName"].ToString()] = row["SettingValue"].ToString();
         }
     }
     return setting;
 }