public static void DeleteUserSetting(int _nUserId) { if (_nUserId <= 0) return; SystemSetting oGet = new SystemSetting(); oGet.UserId = _nUserId; SystemSetting[] alist = EntityAccess<SystemSetting>.Access.List(oGet); if (null != alist && alist.Length >= 1) { foreach(SystemSetting oSetting in alist) SystemSetting.Delete(oSetting); } }
public static void SetSetting(string _strKey,object _oValue, int _nUserId) { if (string.IsNullOrEmpty(_strKey)) return; SystemSetting oSave = GetSetting(_strKey, _nUserId); if (null == oSave) { oSave = new SystemSetting(); oSave.Key = _strKey; } oSave.Value = _oValue == null ? null : _oValue.ToString(); if (_nUserId > 0) { oSave.UserId = _nUserId; } SystemSetting.Save(oSave); }
public static void Delete(SystemSetting _oDel) { if (null == _oDel) return; EntityAccess<SystemSetting>.Access.Delete(_oDel); }
public static int Save(SystemSetting _oSave) { if (null == _oSave) return -1; return EntityAccess<SystemSetting>.Access.Save(_oSave); }