Пример #1
0
 /// <summary>
 /// 保存(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="receiveEntity">邮件接收实体</param>
 /// <returns></returns>
 public void SaveReceiveEntity(string keyValue, EmailReceiveEntity receiveEntity)
 {
     try
     {
         if (!string.IsNullOrEmpty(keyValue))
         {
             receiveEntity.Modify(keyValue);
             this.BaseRepository().Update(receiveEntity);
         }
         else
         {
             receiveEntity.Create();
             this.BaseRepository().Insert(receiveEntity);
         }
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
Пример #2
0
 /// <summary>
 /// 保存(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="receiveEntity">邮件接收实体</param>
 /// <returns></returns>
 public void SaveReceiveEntity(string keyValue, EmailReceiveEntity receiveEntity)
 {
     try
     {
         emailReceiveService.SaveReceiveEntity(keyValue, receiveEntity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowBusinessException(ex);
         }
     }
 }