internal void CopyValues(IDataReader source) { if (source == null) { return; } _saldo = _record.SaldoInicial + Format.DataReader.GetDecimal(source, "SALDO"); _cuenta_asociada = Format.DataReader.GetString(source, "CUENTA_ASOCIADA"); _record.CopyValues(source); }
internal void Update(BankAccounts 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.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; BankAccountRecord obj = Session().Get <BankAccountRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
protected override void DataPortal_Update() { if (IsDirty) { BankAccountRecord obj = Session().Get <BankAccountRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); MarkOld(); } }
internal void Update(BankAccount parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } this.OidCuentaAsociada = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; if (_base.Record.FechaFirma <= DateTime.MinValue) { _base.Record.FechaFirma = DateTime.Now; } if (_base.Record.DuracionPoliza <= DateTime.MinValue) { _base.Record.DuracionPoliza = DateTime.MaxValue; } BankAccountRecord obj = Session().Get <BankAccountRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); Assembly assembly = Assembly.Load("moleQule.Library.Invoice"); Type type = assembly.GetType("moleQule.Library.Invoice.MovimientoBanco"); type.InvokeMember("EditItemComisiones", BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.Public, null, null, new object[3] { GetInfo(false), this.GetInfo(false), parent.SessionCode }); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }