Esempio n. 1
0
        public override void OpenEditForm()
        {
            LoanEditForm form = new LoanEditForm(ActiveOID, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity = form.Entity;
            }
        }
Esempio n. 2
0
        public void GoToSourceAction()
        {
            if (ActiveItem == null)
            {
                return;
            }
            if (ActiveItem.EEstado == EEstado.Anulado)
            {
                return;
            }

            switch (ActiveItem.ETipoMovimientoBanco)
            {
            case EBankLineType.Cobro:
            {
                switch (ActiveItem.ETipoTitular)
                {
                case ETipoTitular.Cliente:
                {
                    ClienteInfo   cliente = ClienteInfo.Get(ActiveItem.OidTitular, true);
                    ChargeSummary item    = ChargeSummary.Get(cliente);
                    CobroEditForm form    = new CobroEditForm(cliente.Oid, item, null, this);
                    form.ShowDialog(this);
                }
                break;

                case ETipoTitular.Fomento:
                {
                    ChargeInfo            cobro = ChargeInfo.Get(ActiveItem.OidTitular, ETipoCobro.Fomento, false);
                    CobrosFomentoEditForm form  = new CobrosFomentoEditForm(cobro, this);
                    form.ShowDialog(this);
                }
                break;

                case ETipoTitular.REA:
                {
                    ChargeInfo        cobro = ChargeInfo.Get(ActiveItem.OidTitular, ETipoCobro.REA, false);
                    CobrosREAEditForm form  = new CobrosREAEditForm(cobro, this);
                    form.ShowDialog();
                }
                break;
                }
            }
            break;

            case EBankLineType.PagoFactura:
            {
                ETipoAcreedor tipo = moleQule.Library.Store.EnumConvert.ToETipoAcreedor(ActiveItem.ETipoTitular);

                if ((new List <ETipoTitular> {
                        ETipoTitular.TransportistaOrigen, ETipoTitular.TransportistaOrigen
                    }).Contains(ActiveItem.ETipoTitular))
                {
                    TransporterInfo transporter = TransporterInfo.Get(ActiveItem.OidTitular, moleQule.Library.Store.EnumConvert.ToETipoAcreedor(ActiveItem.ETipoTitular), false);
                    tipo = transporter.ETipoAcreedor;
                }

                PaymentSummary  item = PaymentSummary.Get(tipo, ActiveItem.OidTitular);
                PaymentEditForm form = new PaymentEditForm(this, ActiveItem.OidTitular, item);
                form.ShowDialog(this);
            }
            break;

            case EBankLineType.PagoGasto:
            {
                ExpensePaymentEditForm form = new ExpensePaymentEditForm(ActiveItem.OidTitular, ETipoPago.Gasto, this);
                form.ShowDialog();
            }
            break;

            case EBankLineType.PagoNomina:
            {
                PaymentSummary          item = PaymentSummary.Get(ETipoAcreedor.Empleado, ActiveItem.OidTitular);
                EmployeePaymentEditForm form = new EmployeePaymentEditForm(this, ActiveItem.OidTitular, item);
                form.ShowDialog();
            }
            break;

            case EBankLineType.PagoPrestamo:
            {
                LoanPaymentEditForm form = new LoanPaymentEditForm(ActiveItem.OidTitular, ETipoPago.Prestamo, this);
                form.ShowDialog();
            }
            break;

            case EBankLineType.Prestamo:
            {
                LoanEditForm form = new LoanEditForm(ActiveItem.OidTitular, this);
                form.ShowDialog();
            }
            break;

            case EBankLineType.EntradaCaja:
            case EBankLineType.SalidaCaja:
            {
                CashLineInfo linea = CashLineInfo.Get(ActiveItem.OidOperacion);

                if (linea.OidCierre != 0)
                {
                    CashCountEditForm form = new CashCountEditForm(linea.OidCierre, this);
                    form.ShowDialog();
                }
                else
                {
                    CashEditForm form = new CashEditForm(linea.OidCaja, this);
                    form.ShowDialog();
                }
            }
            break;

            case EBankLineType.Traspaso:
            {
                TraspasoEditForm form = new TraspasoEditForm(ActiveItem.OidTitular, this);
                form.ShowDialog();
            }
            break;

            case EBankLineType.ExtractoTarjeta:
            {
                CreditCardPaymentEditForm form = new CreditCardPaymentEditForm(ActiveItem.OidOperacion, ETipoPago.ExtractoTarjeta, this);
                form.Show();
            }
            break;
            }
        }
        private void OpenForm(ETipoEntidad entityType, long oid)
        {
            switch (entityType)
            {
            case ETipoEntidad.Cliente:
            {
                ClientEditForm form = new ClientEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.CuentaBancaria:
            {
                BankAccountEditForm form = new BankAccountEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Despachante:
            {
                DespachanteEditForm form = new DespachanteEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Empleado:
            {
                EmployeeEditForm form = new EmployeeEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Familia:
            {
                FamiliaEditForm form = new FamiliaEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Impuesto:
            {
                ImpuestoUIForm form = new ImpuestoUIForm(this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Naviera:
            {
                NavieraEditForm form = new NavieraEditForm(oid, this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Acreedor:
            case ETipoEntidad.Proveedor:
            {
                ProveedorEditForm form = new ProveedorEditForm(oid, moleQule.Library.Store.EnumConvert.ToETipoAcreedor(entityType), this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.TipoGasto:
            {
                TipoGastoEditForm form = new TipoGastoEditForm(oid);
                form.ShowDialog();
            } break;

            case ETipoEntidad.TransportistaDestino:
            case ETipoEntidad.TransportistaOrigen:
            {
                TransporterEditForm form = new TransporterEditForm(oid, moleQule.Library.Store.EnumConvert.ToETipoAcreedor(entityType), this);
                form.ShowDialog();
            } break;

            case ETipoEntidad.Prestamo:
            {
                LoanEditForm form = new LoanEditForm(oid, this);
                form.ShowDialog();
            } break;
            }
        }