Esempio n. 1
0
 public void SaveEntity(int keyValue, dm_readtaskEntity entity)
 {
     try
     {
         if (keyValue > 0)
         {
             entity.Modify(keyValue);
             BaseRepository("dm_data").Update(entity);
         }
         else
         {
             entity.Create();
             BaseRepository("dm_data").Insert(entity);
         }
         UserInfo userInfo = LoginUserInfo.Get();
         string   cacheKey = "ReadEarn" + userInfo.companyId;
         redisCache.Remove(cacheKey, 7L);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowServiceException(ex);
     }
 }
Esempio n. 2
0
 public void AddClickReadEarnTask(int id, int count, string appid)
 {
     try
     {
         dm_readtaskEntity entity = GetEntity(id);
         if (entity != null)
         {
             entity.peoplecount += count;
         }
         entity.Modify(id);
         BaseRepository("dm_data").Update(entity);
         string cacheKey = "ReadEarn" + appid;
         redisCache.Remove(cacheKey, 7L);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowServiceException(ex);
     }
 }