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

            OidFactura = parent.Oid;

            ValidationRules.CheckRules();

            if (!IsValid)
            {
                throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR);
            }

            parent.Session().Save(_base.Record);

            if ((OidExpediente != 0) && (parent.OidExpediente != OidExpediente))
            {
                Store.Expedient.Get(OidExpediente, false, true, parent.SessionCode);
            }

            MarkOld();
        }
示例#2
0
        internal void Insert(InputInvoice parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            OidFactura = parent.Oid;

            try
            {
                parent.Session().Save(Base.Record);
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }

            MarkOld();
        }