Beispiel #1
0
        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);
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 protected override void DataPortal_Update()
 {
     if (IsDirty)
     {
         BankAccountRecord obj = Session().Get <BankAccountRecord>(Oid);
         obj.CopyValues(this._base.Record);
         Session().Update(obj);
         MarkOld();
     }
 }
Beispiel #4
0
        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();
        }