public virtual void ShowPagosAction()
        {
            PaymentSummary  item = PaymentSummary.Get((ETipoAcreedor)ActiveItem.TipoAcreedor, ActiveItem.OidAcreedor);
            PaymentEditForm form = new PaymentEditForm(this, ActiveItem.OidAcreedor, item);

            form.ShowDialog(this);
        }
Ejemplo n.º 2
0
        public override void OpenEditForm()
        {
            switch (ActiveItem.ETipoAcreedor)
            {
            case ETipoAcreedor.Empleado:
            {
                EmployeePaymentEditForm form = new EmployeePaymentEditForm(this, ActiveItem.OidAgente, ActiveItem);
                if (form.Entity != null)
                {
                    AddForm(form);
                }
            }
            break;

            default:
            {
                PaymentEditForm form = new PaymentEditForm(this, ActiveItem.OidAgente, ActiveItem);
                if (form.Entity != null)
                {
                    AddForm(form);
                }
            }
            break;
            }
        }
        public void GotoPagosAction()
        {
            if (ActiveItem.EEstado == moleQule.Base.EEstado.Anulado)
            {
                return;
            }

            PaymentEditForm form = new PaymentEditForm(this, ActiveOID, PaymentSummary.Get(ActiveItem.ETipoAcreedor, ActiveOID));

            form.ShowDialog(this);
        }
        public override void OpenEditForm()
        {
            switch (ActiveItem.ETipoPago)
            {
            case ETipoPago.Factura:
            {
                PaymentSummary item = PaymentSummary.Get((ETipoAcreedor)ActiveItem.TipoAgente, ActiveItem.OidAgente);

                PaymentEditForm form = new PaymentEditForm(this, ActiveItem.OidAgente, item);
                if (form.Entity != null)
                {
                    form.Select(ActiveItem);
                    AddForm(form);
                }
                item.CloseSession();
            }
            break;

            case ETipoPago.Nomina:
            {
                if (ActiveItem.OidAgente == 0)
                {
                    PayrollPaymentEditForm form = new PayrollPaymentEditForm(ActiveItem.Oid, ETipoPago.Nomina, this);
                    if (form.Entity != null)
                    {
                        AddForm(form);
                        _entity = form.Entity;
                    }
                }
                else
                {
                    PaymentSummary item = PaymentSummary.Get((ETipoAcreedor)ActiveItem.TipoAgente, ActiveItem.OidAgente);

                    EmployeePaymentEditForm form = new EmployeePaymentEditForm(this, ActiveItem.OidAgente, item);
                    if (form.Entity != null)
                    {
                        form.Select(ActiveItem);
                        AddForm(form);
                    }
                    item.CloseSession();
                }
            }
            break;

            case ETipoPago.Prestamo:
            {
                LoanPaymentEditForm form = new LoanPaymentEditForm(ActiveItem.Oid, ETipoPago.Prestamo, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;

            case ETipoPago.Fraccionado:
            {
                PagoFraccionadoEditForm form = new PagoFraccionadoEditForm(ActiveItem.Oid, ETipoPago.Fraccionado, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;

            case ETipoPago.ExtractoTarjeta:
            {
                CreditCardPaymentEditForm form = new CreditCardPaymentEditForm(ActiveItem.Oid, ETipoPago.ExtractoTarjeta, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;

            default:
            {
                ExpensePaymentEditForm form = new ExpensePaymentEditForm(ActiveItem.Oid, ActiveItem.ETipoPago, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;
            }
        }