示例#1
0
        public void Add(string Name, string Value)
        {
            using (DbTransaction tran = DbTransaction.Begin())
            {
                int id = DBUser.SetProperty(m_UserID, Name, Value);

                UserLightProperty prop = (UserLightProperty)m_properties[Name];
                if (prop != null && prop.PropertyID == id)
                {
                    prop.Value = Value;
                }
                else
                {
                    m_properties[Name] = new UserLightProperty(id, Name, Value);
                }

                tran.Commit();
            }
        }