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