public void UpdateTransportplanstatus(Transportplan gewählterPlan, TransportplanStatusTyp tpStTyp) { Contract.Requires(gewählterPlan != null); gewählterPlan.Status = tpStTyp; }
public void UpdateTransportplanstatus(int tpNr, TransportplanStatusTyp tpStTyp) { Check.Argument(tpNr > 0, "TpNr muss größer als 0 sein."); Check.OperationCondition(!transactionService.IsTransactionActive, "Keine aktive Transaktion erlaubt."); transactionService.ExecuteTransactional(() => { Transportplan gewählterPlan = this.tp_REPO.FindByTpNr(tpNr); if (gewählterPlan == null) { throw new TransportplanNichtGefundenException(gewählterPlan.TpNr); } this.tpK_BL.UpdateTransportplanstatus(gewählterPlan, tpStTyp); }); }