コード例 #1
0
 /// <summary>
 /// 保存(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="configEntity">邮件配置实体</param>
 /// <returns></returns>
 public void SaveConfigEntity(string keyValue, EmailConfigEntity configEntity)
 {
     try
     {
         if (!string.IsNullOrEmpty(keyValue))
         {
             configEntity.Modify(keyValue);
             this.BaseRepository().Update(configEntity);
         }
         else
         {
             configEntity.Create();
             this.BaseRepository().Insert(configEntity);
         }
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// 保存(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="configEntity">邮件配置实体</param>
 /// <returns></returns>
 public void SaveConfigEntity(string keyValue, EmailConfigEntity configEntity)
 {
     try
     {
         emailConfigService.SaveConfigEntity(keyValue, configEntity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowBusinessException(ex);
         }
     }
 }