/// <summary> /// 修改 /// </summary> /// <param name="keyValue">主键值</param> /// <param name="userEntity">用户实体</param> /// <returns></returns> public void SaveEntity(string keyValue, CatheterEvaluationEntity entity) { try { int id = 0; if (keyValue != "") { int.TryParse(keyValue, out id); entity.ID = id; } else { int.TryParse(GetKey(), out id); entity.ID = id; } this.BaseRepository().Insert(entity); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }
public void UpdateEntity(CatheterEvaluationEntity entity) { try { this.BaseRepository().Update(entity); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }
public void PhysicalDelRecord(string keyValue) { try { CatheterEvaluationEntity entity = new CatheterEvaluationEntity() { ID = Convert.ToInt32(keyValue) }; this.BaseRepository().Delete(entity); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }