Пример #1
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="userEntity">用户实体</param>
 /// <returns></returns>
 public void SaveEntity(string keyValue, DepartTransEntity entity)
 {
     try
     {
         this.BaseRepository().Insert(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
Пример #2
0
 public void UpdateEntity(DepartTransEntity entity)
 {
     try
     {
         this.BaseRepository().Update(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
Пример #3
0
 public void PhysicalDelRecord(string keyValue)
 {
     try
     {
         DepartTransEntity entity = new DepartTransEntity()
         {
             ID = keyValue
         };
         this.BaseRepository().Delete(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }