Пример #1
0
 public void SaveEntity(int keyValue, dm_bannerEntity entity)
 {
     try
     {
         if (keyValue > 0)
         {
             entity.Modify(keyValue);
             BaseRepository("dm_data").Update(entity);
         }
         else
         {
             entity.Create();
             BaseRepository("dm_data").Insert(entity);
         }
         #region Çå³ý»º´æÐÅÏ¢
         UserInfo userInfo = LoginUserInfo.Get();
         string   cacheKey = "Banner" + userInfo.companyId;
         redisCache.Remove(cacheKey, 7L);
         #endregion
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowServiceException(ex);
     }
 }
 public void SaveEntity(int keyValue, dm_bannerEntity entity)
 {
     try
     {
         dM_BannerService.SaveEntity(keyValue, entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         throw ExceptionEx.ThrowBusinessException(ex);
     }
 }