internal void CopyValues(IDataReader source) { if (source == null) { return; } _record.CopyValues(source); long query = Format.DataReader.GetInt64(source, "QUERY"); if (query == 1) { long oid_agente = Format.DataReader.GetInt64(source, "OID_AGENTE"); long oid_entidad = Format.DataReader.GetInt64(source, "OID_ENTIDAD"); string oid = oid_agente.ToString("00000") + oid_entidad.ToString("00") + _record.Oid.ToString("00000"); _record.Oid = Convert.ToInt64(oid); _entidad = Format.DataReader.GetString(source, "TIPO_ENTIDAD"); } _oid_documento = Format.DataReader.GetInt64(source, "OID"); _n_agentes = Format.DataReader.GetInt32(source, "SHARED"); }
protected override void DataPortal_Update() { if (IsDirty) { try { DocumentRecord obj = Session().Get <DocumentRecord>(OidDocumento); obj.CopyValues(Base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } } }
/// <summary> /// Actualiza el registro en la base de datos /// </summary> /// <param name="parent">Lista padre</param> /// <remarks>La utiliza la BusinessListBaseEx correspondiente para actualizar elementos<remarks/> internal void Update(Documentos parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; DocumentRecord obj = Session().Get <DocumentRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); }