internal void Update(Puerto parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } OidPuerto = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; PuertoDespachanteRecord obj = Session().Get <PuertoDespachanteRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public virtual void CopyValues(PuertoDespachanteRecord source) { if (source == null) { return; } Oid = source.Oid; _oid_puerto = source.OidPuerto; _oid_despachante = source.OidDespachante; }