Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public static void Delete(SystemSetting _oDel)
 {
     if (null == _oDel)
         return;
     EntityAccess<SystemSetting>.Access.Delete(_oDel);
 }
Ejemplo n.º 4
0
 public static int Save(SystemSetting _oSave)
 {
     if (null == _oSave)
         return -1;
     return EntityAccess<SystemSetting>.Access.Save(_oSave);
 }