internal void DeleteSelf(Charge parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            // if we're new then don't update the database
            if (this.IsNew)
            {
                return;
            }

            try
            {
                SessionCode = parent.SessionCode;
                ChargeOperationRecord obj = Session().Get <ChargeOperationRecord>(Oid);
                if (obj != null)
                {
                    Session().Delete(obj);
                }
            }
            catch (Exception ex)
            {
                throw new iQPersistentException(iQExceptionHandler.GetAllMessages(ex));
            }

            MarkNew();
        }
        public virtual void CopyValues(ChargeOperationRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid               = source.Oid;
            _oid_cobro        = source.OidCobro;
            _oid_factura      = source.OidFactura;
            _cantidad         = source.Cantidad;
            _fecha_asignacion = source.FechaAsignacion;
        }
        internal void Update(OutputInvoice parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }


            try
            {
                SessionCode = parent.SessionCode;
                ChargeOperationRecord obj = Session().Get <ChargeOperationRecord>(Oid);
                obj.CopyValues(Base.Record);
                Session().Update(obj);
            }
            catch (Exception ex)
            {
                throw new iQPersistentException(iQExceptionHandler.GetAllMessages(ex));
            }

            MarkOld();
        }