Example #1
0
 public static void Delete(SystemSetting _oDel)
 {
     if (null != _oDel)
     {
         EntityAccess<SystemSetting>.Access.Delete(_oDel);
     }
 }
Example #2
0
 public static void DeleteUserSetting(int _nUserId)
 {
     if (_nUserId > 0)
     {
         SystemSetting oGet = new SystemSetting();
         oGet.UserId = _nUserId;
         SystemSetting[] alist = EntityAccess<SystemSetting>.Access.List(oGet);
         if (alist != null && alist.Length >= 1)
         {
             SystemSetting[] array = alist;
             for (int i = 0; i < array.Length; i++)
             {
                 SystemSetting oSetting = array[i];
                 SystemSetting.Delete(oSetting);
             }
         }
     }
 }
Example #3
0
 public static void SetSetting(string _strKey, object _oValue, int _nUserId)
 {
     if (!string.IsNullOrEmpty(_strKey))
     {
         SystemSetting oSave = SystemSetting.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);
     }
 }
Example #4
0
 public static int Save(SystemSetting _oSave)
 {
     int result;
     if (null == _oSave)
     {
         result = -1;
     }
     else
     {
         result = EntityAccess<SystemSetting>.Access.Save(_oSave);
     }
     return result;
 }