Exemple #1
0
 /// <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);
         }
     }
 }
Exemple #2
0
 public int UpdateEntity(MedicalRecordHomepageEntity entity)
 {
     try
     {
         return(this.BaseRepository().Update(entity));
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
Exemple #3
0
 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);
         }
     }
 }