public virtual void CopyValues(BankAccountRecord source) { if (source == null) { return; } Oid = source.Oid; _oid_asociada = source.OidAsociada; _estado = source.Estado; _tipo = source.Tipo; _entidad = source.Entidad; _valor = source.Valor; _swift = source.Swift; _cuenta_contable = source.CuentaContable; _cuenta_contable_gastos = source.CuentaContableGastos; _saldo_inicial = source.SaldoInicial; _observaciones = source.Observaciones; _fecha_firma = source.FechaFirma; _duracion_poliza = source.DuracionPoliza; _comision = source.Comision; _tipo_interes = source.TipoInteres; _pago_gastos_inicio = source.PagoGastosInicio; _dias_credito = source.DiasCredito; }
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(); }