예제 #1
0
        private void RetornarDisponible(object senderm, EventArgs args)
        {
            double disponible;

            try
            {
                if (this.formVariables.tbxIngresos.Text != string.Empty &&
                    this.formVariables.tbxDeduccionesColilla.Text != string.Empty &&
                    this.formVariables.tbxCuotasCreditoCacelarNomina.Text != string.Empty &&
                    this.formVariables.tbxDeduccionesDeSeguridadSocial.Text != string.Empty &&
                    this.formVariables.tbxOtrasDeduccionesColilla.Text != string.Empty &&
                    this.formVariables.tbxOtrosIngresos.Text != string.Empty &&
                    (this.formVariables.rbtnCiudad.Checked == true || this.formVariables.rbtnMunicipio.Checked == true) &&
                    this.formVariables.cbxVivienda.Text != string.Empty &&
                    this.formVariables.tbxCuotasACancelar.Text != string.Empty && this.formVariables.cbxFormaDePago.Text != string.Empty)

                {
                    if (this.formVariables.cbxFormaDePago.Text == "Nomina")
                    {
                        CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                        if (this.formVariables.cbxLeyLibranza.Checked == false)
                        {
                            disponible = Disponible.CalcularDisponibleNominaSinLibranza(Convert.ToDouble(this.formVariables.tbxIngresos.Text),
                                                                                        Convert.ToDouble(this.formVariables.tbxDeduccionesColilla.Text),
                                                                                        Convert.ToDouble(this.formVariables.tbxCuotasCreditoCacelarNomina.Text));
                            this.formVariables.tbxDisponible.Text = disponible.ToString("N2");
                            Cache.Disponible = disponible;
                        }

                        else if (this.formVariables.cbxLeyLibranza.Checked == true)
                        {
                            disponible = Disponible.CalcularDisponibleNominaConLibranza(Convert.ToDouble(this.formVariables.tbxIngresos.Text),
                                                                                        Convert.ToDouble(this.formVariables.tbxDeduccionesDeSeguridadSocial.Text), Convert.ToDouble(this.formVariables.tbxOtrasDeduccionesColilla.Text),
                                                                                        Convert.ToDouble(this.formVariables.tbxCuotasCreditoCacelarNomina.Text));
                            this.formVariables.tbxDisponible.Text = disponible.ToString("N2");
                            Cache.Disponible = disponible;
                        }
                    }
                    else if (this.formVariables.cbxFormaDePago.Text == "Caja")
                    {
                        CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                        disponible = Disponible.CalcularDisponibleCaja(Convert.ToDouble(this.formVariables.tbxIngresos.Text),
                                                                       Convert.ToDouble(this.formVariables.tbxOtrosIngresos.Text), Convert.ToDouble(this.formVariables.tbxDeduccionesColilla.Text),
                                                                       RetornarDANECiudadPueblo(), RetornarDANEVivienda(), Convert.ToDouble(this.formVariables.tbxCuotasACancelar.Text));
                        this.formVariables.tbxDisponible.Text = disponible.ToString("N2");
                        Cache.Disponible = disponible;
                    }
                }
                else
                {
                    formError = new FormError("Datos insuficientes para calcular el disponible.");
                    formError.ShowDialog();
                }
            }
            catch (Exception e)
            {
                formError = new FormError($"Error: {e}");
                formError.ShowDialog();
            }
        }
예제 #2
0
        public void RetornarAfectacionColilla(object sender, EventArgs args)
        {
            double afectacionColilla;

            try
            {
                if (this.formVariables.tbxDeduccionesColilla.Text != string.Empty && this.formVariables.tbxCuotasCreditoCacelarNomina.Text != string.Empty &&
                    this.formVariables.tbxIngresos.Text != string.Empty)
                {
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                    afectacionColilla = AfectacionColilla.CalcularAfectacionColilla(Convert.ToDouble(this.formVariables.tbxDeduccionesColilla.Text),
                                                                                    Convert.ToDouble(this.formVariables.tbxCuota.Text), Convert.ToDouble(this.formVariables.tbxCuotasCreditoCacelarNomina.Text),
                                                                                    Convert.ToDouble(this.formVariables.tbxIngresos.Text));
                    this.formVariables.tbxAfectacionColilla.Text = afectacionColilla.ToString("0.00%");
                    Cache.AfectacionColilla = afectacionColilla;
                }
                else
                {
                    formError = new FormError("Datos insuficientes para calcular la afectacion colilla.");
                    formError.ShowDialog();
                }
            }
            catch (Exception e)
            {
                formError = new FormError($"Error: {e}");
                formError.ShowDialog();
            }
        }
예제 #3
0
 private void AbrirWeb(object sender, EventArgs args)
 {
     if (((Button)sender).Name == this.formVentanaPrincipal.btnInstagram.Name)
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         CodigoComun.AbrirWebs("www.instagram.com/senacomunica/");
     }
     else if (((Button)sender).Name == this.formVentanaPrincipal.btnFacebook.Name)
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         CodigoComun.AbrirWebs("www.facebook.com/SENA/");
     }
     else if (((Button)sender).Name == this.formVentanaPrincipal.btnTwitter.Name)
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         CodigoComun.AbrirWebs("www.twitter.com/senacha2?lang=es");
     }
     else if (((Button)sender).Name == this.formVentanaPrincipal.btnYoutube.Name)
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         CodigoComun.AbrirWebs("www.youtube.com/user/SENATV");
     }
     else if (((Button)sender).Name == this.formVentanaPrincipal.btnPagina.Name)
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         CodigoComun.AbrirWebs("www.sena.edu.co/es-co/Paginas/default.aspx");
     }
 }
예제 #4
0
        private async void ExportarArchivoPDF(object sender, EventArgs eventArgs)
        {
            if (Cache.CriterioDelAnalista == string.Empty)
            {
                using (formError = new FormError("Complete toda la información del crédito antes de exportar un archivo PDF"))
                {
                    formError.ShowDialog();
                }
            }

            else
            {
                using (formConfirmacion = new FormConfirmacion("¿Desea generar un archivo PDF con la información del crédito?"))
                {
                    DialogResult result = formConfirmacion.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        CodigoComun.Alerta("Exportando, espere", FormVentanaEmergente.enmTipo.info);
                        await MostrarAlertaPDF();

                        CodigoComun.Alerta("Archivo exportado", FormVentanaEmergente.enmTipo.exito);
                        using (formAviso = new FormAviso($"Archivo guardo en la ruta: {ruta}"))
                        {
                            formAviso.ShowDialog();
                        }
                    }
                }

                EsconderSubMenu();
            }
        }
예제 #5
0
 private void RetornarEndeudamientoGlobal(object sender, EventArgs args)
 {
     try
     {
         if (this.formVariablesAnalisisComercial.tbxDeduccionesColilla.Text != string.Empty &&
             this.formVariablesAnalisisComercial.tbxCuotaCentrales.Text != string.Empty &&
             this.formVariablesAnalisisComercial.tbxCuotasACancelar.Text != string.Empty &&
             this.formVariablesAnalisisComercial.tbxIngresos.Text != string.Empty &&
             this.formVariablesAnalisisComercial.cbxVivienda.Text != string.Empty &&
             this.formVariablesAnalisisComercial.tbxOtrosIngresos.Text != string.Empty &&
             (this.formVariablesAnalisisComercial.rbtnCiudad.Checked == true || this.formVariablesAnalisisComercial.rbtnMunicipio.Checked == true))
         {
             CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
             CalcularEndeudamientoGlobal();
         }
         else
         {
             formError = new FormError("Datos insuficientes para calcular el endeudamiento global.");
             formError.ShowDialog();
         }
     }
     catch (Exception e)
     {
         formError = new FormError($"Error: {e}");
         formError.ShowDialog();
     }
 }
예제 #6
0
 private void RetornarTotalMora(object sender, EventArgs args)
 {
     if (this.formVariablesAnalisisComercial.cbxCantidadDeMoras.Text != string.Empty && this.formVariablesAnalisisComercial.cbxDiasMora.Text != string.Empty)
     {
         this.formVariablesAnalisisComercial.tbxComportamientoDePagos.Text = CodigoComun.RetornarMorasTotales(this.formVariablesAnalisisComercial.cbxCantidadDeMoras, this.formVariablesAnalisisComercial.cbxDiasMora);
     }
 }
        private void ConvertirTasaDos(object sender, EventArgs args)
        {
            try
            {
                formError = new FormError("Debe agregar la DTF y los puntos a sumar antes de simular.");

                if (this.formCalculadora.tbxDTF.Text != string.Empty && !string.IsNullOrEmpty(this.formCalculadora.tbxPuntos.Text))
                {
                    double TasaEA      = CalcularTasaEA(Convert.ToDouble(this.formCalculadora.tbxDTF.Text), Convert.ToInt32(this.formCalculadora.tbxPuntos.Text));
                    double TasaMensual = CalcularTasaMensual(TasaEA);
                    this.formCalculadora.tbxTasaEA.Text      = (TasaEA / 100).ToString("0.00%");
                    this.formCalculadora.tbxTasaMensual.Text = (TasaMensual / 100).ToString("0.00%");
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                }
                else
                {
                    formError.ShowDialog();
                }
            }
            catch (Exception)
            {
                using (formError = new FormError("La información no tiene el formato correcto "))
                {
                    formError.ShowDialog();
                }
            }
        }
        private void ConvertirTasa(object sender, EventArgs args)
        {
            formError = new FormError("Debe agregar un valor y tipo de tasa antes de simular");
            double valorTasa;

            if (this.formCalculadora.tbxAConvertir.Text != string.Empty && (this.formCalculadora.rbtTasaEfectiva1.Checked == true ||
                                                                            this.formCalculadora.rbtTasaNominal1.Checked == true))
            {
                if (this.formCalculadora.rbtTasaNominal1.Checked == true)
                {
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                    valorTasa = (CodigoComun.NominalAEfectiva(Convert.ToDouble(this.formCalculadora.tbxAConvertir.Text)));
                }
                else if (this.formCalculadora.rbtTasaEfectiva1.Checked == true)
                {
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                    valorTasa = (CodigoComun.EfectivaANominal(Convert.ToDouble(this.formCalculadora.tbxAConvertir.Text)));
                }
                else
                {
                    valorTasa = 0;
                }

                this.formCalculadora.tbxConvertida.Text = valorTasa.ToString("N3") + "%";
            }
            else
            {
                formError.ShowDialog();
            }
        }
예제 #9
0
        private void RetornarTotalIngresos(Object sender, EventArgs args)
        {
            OcultarCheckBox();
            AdvertenciaCambioDeFormaDePago();
            try
            {
                if (this.formVariables.tbxIngresos.Text != string.Empty && this.formVariables.tbxOtrosIngresos.Text != string.Empty)
                {
                    double ingresos      = Convert.ToDouble(this.formVariables.tbxIngresos.Text);
                    double otrosIngresos = Convert.ToDouble(this.formVariables.tbxOtrosIngresos.Text);

                    if (this.formVariables.cbxFormaDePago.Text == "Nomina")
                    {
                        double totalIngresos = CodigoComun.CalcularTotalIngresos(ingresos, otrosIngresos, 1);
                        this.formVariables.tbxTotalIngresos.Text = totalIngresos.ToString("N2");
                    }
                    else
                    {
                        double totalIngresos = CodigoComun.CalcularTotalIngresos(ingresos, otrosIngresos, 0.8);
                        this.formVariables.tbxTotalIngresos.Text = totalIngresos.ToString("N2");
                    }
                }
            }
            catch
            {
                formError = new FormError("El Valor de los ingresos no debe ser cero o un valor inválido");
                formError.ShowDialog();
            }
        }
예제 #10
0
 private void RetornarEstadosDeResultados(object sender, EventArgs args)
 {
     try
     {
         if (this.formVarialblesAnalisisMicro.tbxVentasMicro.Text != string.Empty && this.formVarialblesAnalisisMicro.tbxCostosDeVentasMicro.Text != string.Empty &&
             this.formVarialblesAnalisisMicro.tbxGastosDelNegocio.Text != string.Empty && this.formVarialblesAnalisisMicro.tbxIngresosFamiliaresYOtros.Text != string.Empty &&
             this.formVarialblesAnalisisMicro.tbxGastosFamiliaresYOtros.Text != string.Empty && this.formVarialblesAnalisisMicro.tbxCuotaCreditoARefinanciarMicro.Text != string.Empty)
         {
             CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
             RetornarUtilidadBruta();
             RetornarUtilidadOPerdidaOperativa();
             RetornarUtilidadOPerdidaneta();
             RetornarUtilidadDisponible();
             RetornarMargenDeConfianza();
             RetornarCapacidadDePagoConCuota();
             RetornarEndeudamientoDirecto();
         }
         else
         {
             formError = new FormError("Ingrese las varialbes de entrada en el  estado de resultados para calcular las utilidades");
             formError.ShowDialog();
         }
     }
     catch
     {
         formError = new FormError("Error en el formato numérico de las variables de entrada");
         formError.ShowDialog();
     }
 }
예제 #11
0
 private void GuardadoBtnOK()
 {
     using (formAviso = new FormAviso("Información guardada correctamente y lista para ser exportada"))
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         GuardarCache();
         formAviso.ShowDialog();
     }
 }
예제 #12
0
 private void SeleccionarFinalDeTextoIngresos(object sender, EventArgs args)
 {
     foreach (Control control in this.formCodeudor.pnlInformacionFinanciera.Controls)
     {
         if (control is TextBox)
         {
             CodigoComun.TextoFinalTextbox((TextBox)control);
         }
     }
 }
        private void CerrarForm(object sender, EventArgs args)
        {
            formConfirmacion = new FormConfirmacion("¿Desea salir del simulador?");
            DialogResult resultado = formConfirmacion.ShowDialog();

            if (resultado == DialogResult.OK)
            {
                CodigoComun.BtnCerrar(this.formBienvenida);
            }
        }
예제 #14
0
 private void SeleccionarFinalDeTextoEgresos(object sender, EventArgs args)
 {
     foreach (Control control in this.formVariablesAnalisisComercial.pnlEgresos.Controls)
     {
         if (control is TextBox)
         {
             CodigoComun.TextoFinalTextbox((TextBox)control);
         }
     }
 }
예제 #15
0
 private void SeleccionarFinalDeTexto(object sender, EventArgs args)
 {
     foreach (Control control in this.formConsumo.pnlPrincipal.Controls)
     {
         if (control is TextBox)
         {
             CodigoComun.TextoFinalTextbox((TextBox)control);
         }
     }
 }
예제 #16
0
        private void CerrarForm(object sender, EventArgs args)
        {
            using (formConfirmacion = new FormConfirmacion("¿Desea salir del simulador?"))
            {
                DialogResult resultado = formConfirmacion.ShowDialog();

                if (resultado == DialogResult.OK)
                {
                    CodigoComun.BtnCerrar(this.formVentanaPrincipal);
                    Application.Exit();
                }
            }
        }
예제 #17
0
 private void RetornarEdad(object sender, EventArgs args)
 {
     try
     {
         this.formVariablesAnalisisComercial.contadorEdad.Value = CodigoComun.CalcularEdad(this.formVariablesAnalisisComercial.dtpEdad);
     }
     catch
     {
         using (formError = new FormError("Seleccione una fecha de nacimiendo válida, no puede ser superior a la fecha actual"))
         {
             formError.ShowDialog();
         }
     }
 }
예제 #18
0
 private void CambiarScroll(object sender, EventArgs args)
 {
     if (((TextBox)sender).Name == this.formVarialblesAnalisisMicro.tbxIngresos.Name)
     {
         CodigoComun.SetScroll(this.formVarialblesAnalisisMicro, 300);
     }
     else if (((TextBox)sender).Name == this.formVarialblesAnalisisMicro.tbxIngresosCodeudor.Name)
     {
         CodigoComun.SetScroll(this.formVarialblesAnalisisMicro, 950);
     }
     else if (((TextBox)sender).Name == this.formVarialblesAnalisisMicro.tbxNombres.Name)
     {
         CodigoComun.SetScroll(this.formVarialblesAnalisisMicro, 0);
     }
 }
예제 #19
0
 private void CambiarScroll(object sender, EventArgs args)
 {
     if (((TextBox)sender).Name == this.formVariablesAnalisisComercial.tbxIngresos.Name)
     {
         CodigoComun.SetScroll(this.formVariablesAnalisisComercial, 300);
     }
     else if (((TextBox)sender).Name == this.formVariablesAnalisisComercial.tbxCuotaCentrales.Name)
     {
         CodigoComun.SetScroll(this.formVariablesAnalisisComercial, 700);
     }
     else if (((TextBox)sender).Name == this.formVariablesAnalisisComercial.tbxNombres.Name)
     {
         CodigoComun.SetScroll(this.formVariablesAnalisisComercial, 0);
     }
 }
예제 #20
0
 private void PlanDeCuotas(object sender, EventArgs args)
 {
     if (this.formConsumo.tbxMonto.Text != string.Empty && this.formConsumo.contadorPlazo.Value != 0 && this.formConsumo.contadorTasa.Value != 0)
     {
         this.formConsumo.dgvPlanPagoComercial.Rows.Clear();
         CodigoComun.PlanDeCuotas(this.formConsumo.dgvPlanPagoComercial, (Convert.ToDouble(this.formConsumo.tbxMonto.Text))
                                  , Convert.ToInt32(this.formConsumo.contadorPlazo.Value), (Math.Round(Convert.ToDouble(this.formConsumo.contadorTasa.Value), 2))
                                  , (Math.Round(Convert.ToDouble(this.formConsumo.tbxCuota.Text), 2)));
         LlenarCache();
     }
     else
     {
         formError = new FormError("Ingrese el valor del monto, plazo y cuota del crédito antes de simular el plan de pago");
         formError.ShowDialog();
     }
 }
예제 #21
0
 private void RetornarTotalDeducciones(object sender, EventArgs args)
 {
     try
     {
         if (this.formVariablesAnalisisComercial.tbxDeduccionesDeSeguridadSocial.Text != string.Empty && this.formVariablesAnalisisComercial.tbxOtrasDeduccionesColilla.Text != string.Empty)
         {
             double totalDeduccionesColilla;
             totalDeduccionesColilla = CodigoComun.RetornarTotalDeducciones(Convert.ToDouble(this.formVariablesAnalisisComercial.tbxDeduccionesDeSeguridadSocial.Text), Convert.ToDouble(this.formVariablesAnalisisComercial.tbxOtrasDeduccionesColilla.Text));
             this.formVariablesAnalisisComercial.tbxDeduccionesColilla.Text = totalDeduccionesColilla.ToString("N2");
         }
     }
     catch
     {
         formError = new FormError("El Valor de las deducciones no debe ser cero o un valor inválido");
         formError.ShowDialog();
     }
 }
예제 #22
0
        private void RetornarIndicadoresConsumo()
        {
            if (ValidarInformacion())
            {
                if (this.formCodeudor.cbxFormaDePago.Text == "Nomina")
                {
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                    indicadoresConsumoNomina = new IndicadoresConsumoNomina(Convert.ToDouble(this.formCodeudor.tbxIngresos.Text), Convert.ToDouble(this.formCodeudor.tbxDeduccionesDeSeguridadSocial.Text), Convert.ToDouble(this.formCodeudor.tbxOtrasDeduccionesColilla.Text),
                                                                            Convert.ToDouble(this.formCodeudor.tbxDeduccionesColilla.Text), Convert.ToDouble(this.formCodeudor.tbxCuota.Text), Convert.ToDouble(this.formCodeudor.tbxCuotasCentralesDeRiesgo.Text), Convert.ToDouble(this.formCodeudor.tbxValorCuotaLibranza.Text),
                                                                            Convert.ToDouble(this.formCodeudor.tbxTotalIngresos.Text));

                    //disponible
                    if (this.formCodeudor.cbxLeyLibranza.Checked == true)
                    {
                        Cache.DisponibleCodeudor             = indicadoresConsumoNomina.RetornarDisponibleConLibranza();
                        this.formCodeudor.tbxDisponible.Text = indicadoresConsumoNomina.RetornarDisponibleConLibranza().ToString("N2");
                    }
                    else
                    {
                        Cache.DisponibleCodeudor             = indicadoresConsumoNomina.RetornarDisponibleSinLibranza();
                        this.formCodeudor.tbxDisponible.Text = indicadoresConsumoNomina.RetornarDisponibleSinLibranza().ToString("N2");
                    }
                    //Afectacion colilla
                    Cache.AfectacionColillaCodeudor             = indicadoresConsumoNomina.RetornarAfectacionColilla();
                    this.formCodeudor.tbxAfectacionColilla.Text = indicadoresConsumoNomina.RetornarAfectacionColilla().ToString("0.00%");

                    //Endeudamiento global
                    Cache.EndeudamientoGlobalCodeudor             = indicadoresConsumoNomina.RetornarEndeudamientoGlobal();
                    this.formCodeudor.tbxEndeudamientoGlobal.Text = indicadoresConsumoNomina.RetornarEndeudamientoGlobal().ToString("0.00%");
                }

                else if (this.formCodeudor.cbxFormaDePago.Text == "Caja")
                {
                    RetornarIndicadoresCaja();
                }
            }
            else
            {
                using (formError = new FormError("Datos insuficientes para calcular los indicadores"))
                {
                    formError.ShowDialog();
                }
            }
        }
예제 #23
0
 private void CalcularCuota(object sender, EventArgs args)
 {
     try
     {
         if (this.formConsumo.tbxMonto.Text != string.Empty)
         {
             this.Cuota = CodigoComun.CalcularCuota(Convert.ToDouble(this.formConsumo.tbxMonto.Text), Convert.ToDouble(this.formConsumo.contadorTasa.Value), Convert.ToInt32(this.formConsumo.contadorPlazo.Value));
             this.formConsumo.tbxCuota.Text = this.Cuota.ToString("N2");
         }
     }
     catch
     {
         using (formError = new FormError("Error en el formato numérico de las variables de entrada"))
         {
             formError.ShowDialog();
             this.formConsumo.tbxMonto.Text = string.Empty;
         }
     }
 }
예제 #24
0
        private void RetornarTotalIngresos(Object sender, EventArgs args)
        {
            try
            {
                if (this.formVariablesAnalisisComercial.tbxIngresos.Text != string.Empty && this.formVariablesAnalisisComercial.tbxOtrosIngresos.Text != string.Empty)
                {
                    double ingresos      = Convert.ToDouble(this.formVariablesAnalisisComercial.tbxIngresos.Text);
                    double otrosIngresos = Convert.ToDouble(this.formVariablesAnalisisComercial.tbxOtrosIngresos.Text);

                    double totalIngresos = CodigoComun.CalcularTotalIngresos(ingresos, otrosIngresos, 0.8);
                    this.formVariablesAnalisisComercial.tbxTotalIngresos.Text = totalIngresos.ToString("N2");
                }
            }
            catch
            {
                formError = new FormError("El Valor de los ingresos no debe ser cero o un valor inválido");
                formError.ShowDialog();
            }
        }
예제 #25
0
 private void RetornarIndicadoresCaja()
 {
     if (ValidarInformacion())
     {
         CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
         using (indicadoresCaja = new IndicadoresCaja(Convert.ToDouble(this.formCodeudor.tbxDeduccionesColilla.Text), Convert.ToDouble(this.formCodeudor.tbxCuotasCentralesDeRiesgo.Text),
                                                      Convert.ToDouble(this.formCodeudor.tbxCuota.Text), Convert.ToDouble(this.formCodeudor.tbxCuotasACancelar.Text), Convert.ToDouble(this.formCodeudor.tbxIngresos.Text),
                                                      Convert.ToDouble(this.formCodeudor.tbxOtrosIngresos.Text), this.formCodeudor.rbtnCiudad, this.formCodeudor.cbxVivienda))
         {
             Cache.EndeudamientoGlobalCodeudor             = indicadoresCaja.RetornarEndeudamientoGlobal();
             this.formCodeudor.tbxEndeudamientoGlobal.Text = indicadoresCaja.RetornarEndeudamientoGlobal().ToString("0.00%");
             Cache.DisponibleCodeudor             = indicadoresCaja.RetornarDisponible();
             this.formCodeudor.tbxDisponible.Text = indicadoresCaja.RetornarDisponible().ToString("N2");
         }
     }
     else
     {
         LlamarFormError("Datos insuficientes para calcular los indicadores");
     }
 }
예제 #26
0
 private void AbrirFormAnalisis(object sender, EventArgs args)
 {
     if (this.formConsumo.tbxCedula.Text != string.Empty && this.formConsumo.tbxMonto.Text != string.Empty &&
         this.formConsumo.tbxCuota.Text != string.Empty && this.formConsumo.contadorPlazo.Value != 0 &&
         this.formConsumo.contadorTasa.Value != 0 && this.formConsumo.dgvPlanPagoComercial.Rows.Count > 0)
     {
         if (codigoComun.ActiveForm == null && validacionFormActivo != true)
         {
             CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
             OcultarFormPlanDeCuotas(false);
             this.formConsumo.trancisionFormAnalisis.Show(this.formConsumo.pnlCentro);
             ValidarTipoDeForm();
             validacionFormActivo = true;
         }
     }
     else
     {
         formError = new FormError("Ingrese el valor de todas las variables de entrada iniciales para el para el análisis del crédito");
         formError.ShowDialog();
     }
 }
예제 #27
0
        private void BotonAlmacenarInformacion(object sender, EventArgs args)
        {
            if (this.formAnalisisDeCredito.tbxCriterioDelAnalista.Text != string.Empty)
            {
                formConfirmacion = new FormConfirmacion("¿Desea almacenar la ifnformación del crédito simualdo?");
                DialogResult resultado = formConfirmacion.ShowDialog();

                if (resultado == DialogResult.OK)
                {
                    CodigoComun.Alerta("Correcto", FormVentanaEmergente.enmTipo.exito);
                    Cache.CumplimientoDePoliticias = this.formAnalisisDeCredito.lblMensaje.Text;
                    Cache.CriterioDelAnalista      = this.formAnalisisDeCredito.tbxCriterioDelAnalista.Text;
                    formAviso = new FormAviso("Información guardada correctamente y lista para ser exportada");
                    formAviso.ShowDialog();
                    this.formAnalisisDeCredito.Close();
                }
            }
            else
            {
                formError = new FormError("El criterio del analista es necesario para almacenar la información");
                formError.ShowDialog();
            }
        }
 private void EfectoLogin(object sender, EventArgs args)
 {
     CodigoComun.Timer(this.formCalculadora, this.formCalculadora.timerForm);
 }
 private double CalcularTasaMensual(double tasaEA) => (CodigoComun.EfectivaANominal(tasaEA));
 private void CerrarForm(object sender, EventArgs args)
 {
     CodigoComun.BtnCerrar(this.formCalculadora);
 }