internal void CopyValues(IDataReader source) { if (source == null) { return; } _record.CopyValues(source); _responsable = Format.DataReader.GetString(source, "RESPONSABLE"); _auditor = Format.DataReader.GetString(source, "AUDITOR"); _tipo = Format.DataReader.GetString(source, "TIPO_AUDITORIA"); _plan = Format.DataReader.GetString(source, "PLAN"); }
protected override void DataPortal_Update() { if (IsDirty) { try { AuditoriaRecord obj = Session().Get <AuditoriaRecord>(Oid); obj.CopyValues(this.Base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } } }
internal void Update(TipoAuditoria parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } //Debe obtener la sesion del padre pq el objeto es padre a su vez SessionCode = parent.SessionCode; OidTipoAuditoria = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } AuditoriaRecord obj = parent.Session().Get <AuditoriaRecord>(Oid); obj.CopyValues(this.Base.Record); parent.Session().Update(obj); _cuestiones.Update(this); _informes.Update(this); _historial.Update(this); _notificaciones.Update(this); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }