internal void CopyValues(IDataReader source) { if (source == null) { return; } _record.CopyValues(source); _almacen = Format.DataReader.GetString(source, "ALMACEN"); }
/// <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(InventarioAlmacenes parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; InventarioAlmacenRecord obj = Session().Get <InventarioAlmacenRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
protected override void DataPortal_Update() { if (IsDirty) { try { InventarioAlmacenRecord obj = Session().Get <InventarioAlmacenRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); MarkOld(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } } }
/// <summary> /// Actualiza un registro en la base de datos /// </summary> /// <param name="parent">Objeto padre</param> internal void Update(Almacen 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; OidAlmacen = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } InventarioAlmacenRecord obj = parent.Session().Get <InventarioAlmacenRecord>(Oid); obj.CopyValues(this._base.Record); parent.Session().Update(obj); _lineainventarios.Update(this); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }