private void SetSettings()
 {
     using (IDataReader reader = DBForum.GetSettings(m_NodeId))
     {
         if (reader != null)
         {
             while (reader.Read())
             {
                 string name = (string)reader["Key"];
                 m_settings[name] = new ForumThreadNodeSetting((int)reader["SettingId"], name, (string)reader["Value"]);
             }
         }
     }
 }
        public void Add(string Name, string Value)
        {
            using (DbTransaction tran = DbTransaction.Begin())
            {
                int id = DBForum.SetSetting(m_NodeId, Name, Value);

                ForumThreadNodeSetting setting = (ForumThreadNodeSetting)m_settings[Name];
                if (setting != null && setting.SettingId == id)
                {
                    setting.Value = Value;
                }
                else
                {
                    m_settings[Name] = new ForumThreadNodeSetting(id, Name, Value);
                }

                tran.Commit();
            }
        }
 public string this[string Name]
 {
     get
     {
         string ret = null;
         ForumThreadNodeSetting setting = (ForumThreadNodeSetting)m_settings[Name];
         if (setting != null)
         {
             ret = setting.Value;
         }
         return(ret);
     }
     set
     {
         if (value != null)
         {
             this.Add(Name, value);
         }
         else
         {
             this.Remove(Name);
         }
     }
 }
 private void SetSettings()
 {
     using(IDataReader reader = DBForum.GetSettings(m_NodeId))
     {
         if(reader != null)
         {
             while(reader.Read())
             {
                 string name = (string)reader["Key"];
                 m_settings[name] = new ForumThreadNodeSetting((int)reader["SettingId"], name, (string)reader["Value"]);
             }
         }
     }
 }
        public void Add(string Name, string Value)
        {
            using(DbTransaction tran = DbTransaction.Begin())
            {
                int id = DBForum.SetSetting(m_NodeId, Name, Value);

                ForumThreadNodeSetting setting = (ForumThreadNodeSetting)m_settings[Name];
                if(setting != null && setting.SettingId == id)
                    setting.Value = Value;
                else
                    m_settings[Name] = new ForumThreadNodeSetting(id, Name, Value);

                tran.Commit();
            }
        }