Beispiel #1
0
 /// <summary>
 /// 保存(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="newsEntity">公告实体</param>
 /// <returns></returns>
 public void SaveEntity(string keyValue, NewsEntity newsEntity)
 {
     try
     {
         noticeService.SaveEntity(keyValue, newsEntity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowBusinessException(ex);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="keyValue">主键</param>
 public void DeleteEntity(string keyValue)
 {
     try
     {
         NewsEntity entity = new NewsEntity()
         {
             F_NewsId = keyValue,
         };
         this.BaseRepository().Delete(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }