Example #1
0
 public void SaveEntity(int keyValue, dm_announcementEntity 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 = "Announcement" + userInfo.companyId;
         redisCache.Remove(cacheKey, 7L);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowServiceException(ex);
     }
 }
Example #2
0
 public void SaveEntity(int keyValue, dm_announcementEntity entity)
 {
     try
     {
         dM_AnnouncementService.SaveEntity(keyValue, entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowBusinessException(ex);
     }
 }