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