/// <summary> /// 保存实体数据(新增、修改) /// </summary> /// <param name="keyValue">主键</param> /// <returns></returns> public void SaveEntity(string keyValue, Mes_InPriceEntity entity, Mes_PriceEntity entity2) { try { if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); entity2.Create(); this.BaseRepository().Update(entity); this.BaseRepository().Insert(entity2); } else { entity.Create(); entity2.Create(); this.BaseRepository().Insert(entity); this.BaseRepository().Insert(entity2); } } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }
/// <summary> /// 保存实体数据(新增、修改) /// </summary> /// <param name="keyValue">主键</param> /// <returns></returns> public void SaveEntity(string keyValue, Mes_InPriceEntity entity, Mes_PriceEntity entity2) { try { inPriceService.SaveEntity(keyValue, entity, entity2); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowBusinessException(ex); } } }