Esempio n. 1
0
        private void PreencherSimuladorAbaTabelasSubPlano()
        {
            if (Convert.ToInt32(cmbAba5Sub5Sub1Produto.SelectedValue) == (int)ProdutoPrincipal.PLANOPROTECAO &&
                cmbAba5Sub5Sub2Morte.SelectedIndex > 0 && cmbAba5Sub5Sub2Funeral.SelectedIndex > 0)
            {
                TPlanoProtecaoDOMINIO registro = ControllerPlanoProtecao.CalcularPremioFuneral(Convert.ToDecimal(cmbAba5Sub5Sub2Morte.SelectedValue), 0, 0, Convert.ToInt32(cmbAba5Sub5Sub2Funeral.SelectedValue), Convert.ToInt32(cmbAba5Sub5Sub1FaixaBase.SelectedValue));

                lblAba5Sub5Sub2AssistOUConjValor.Text = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.CoberturaAcidente);
                lblAba5Sub5Sub2IPAValor.Text          = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.CoberturaEmergencia);
                lblAba5Sub5Sub2PremioPlanoValor.Text  = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.ValorPremioIdadeBase.GetValueOrDefault());
            }

            if (Convert.ToInt32(cmbAba5Sub5Sub1Produto.SelectedValue) == (int)ProdutoPrincipal.PLANOSENIOR &&
                cmbAba5Sub5Sub2Morte.SelectedIndex > 0 && cmbAba5Sub5Sub2Funeral.SelectedIndex > 0)
            {
                TPlanoSeniorDOMINIO registro = ControllerPlanoSenior.CalcularPremioFuneral(Convert.ToDecimal(cmbAba5Sub5Sub2Morte.SelectedValue), Convert.ToInt32(cmbAba5Sub5Sub2Funeral.SelectedValue), Convert.ToInt32(cmbAba5Sub5Sub1FaixaBase.SelectedValue));

                lblAba5Sub5Sub2PremioPlanoValor.Text = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.ValorPremioIdadeBase.GetValueOrDefault());
            }

            if (Convert.ToInt32(cmbAba5Sub5Sub1Produto.SelectedValue) == (int)ProdutoPrincipal.PLANOCASAL &&
                cmbAba5Sub5Sub2Morte.SelectedIndex > 0 && cmbAba5Sub5Sub2Funeral.SelectedIndex > 0)
            {
                TPlanoCasalDOMINIO registro = ControllerPlanoCasal.CalcularPremioFuneral(Convert.ToDecimal(cmbAba5Sub5Sub2Morte.SelectedValue), 0, Convert.ToInt32(cmbAba5Sub5Sub2Funeral.SelectedValue), Convert.ToInt32(cmbAba5Sub5Sub1FaixaBase.SelectedValue));

                lblAba5Sub5Sub2AssistOUConjValor.Text = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.CoberturaConjuge);
                lblAba5Sub5Sub2PremioPlanoValor.Text  = String.Format(new CultureInfo("pt-BR"), "{0:C}", registro.ValorPremioIdadeBase.GetValueOrDefault());
            }
        }
Esempio n. 2
0
 private void VerificaPlanoProtecaoFuneral()
 {
     if (ddlPlanoProtecaoFuneralMorteNovo.SelectedIndex > 0 && ddlPlanoProtecaoFuneralIPANovo.SelectedIndex > 0 && ddlPlanoProtecaoFuneralAssistenciaNovo.SelectedIndex > 0 && ddlPlanoProtecaoFuneralCategoriaNovo.SelectedIndex > 0)
     {
         PlanoProtecaoFuneralNovoVO             = ControllerPlanoProtecao.CalcularPremioFuneral(Convert.ToDecimal(ddlPlanoProtecaoFuneralMorteNovo.SelectedValue), Convert.ToDecimal(ddlPlanoProtecaoFuneralIPANovo.SelectedValue), Convert.ToDecimal(ddlPlanoProtecaoFuneralAssistenciaNovo.SelectedValue), Convert.ToInt32(ddlPlanoProtecaoFuneralCategoriaNovo.SelectedValue), FaixaBase);
         txtPlanoProtecaoFuneralPremioNovo.Text = PlanoProtecaoFuneralNovoVO.ValorPremioIdadeBase.GetValueOrDefault().ToString();
     }
 }
        private void VerificaPlanoProtecaoFuneral()
        {
            try
            {
                Decimal morte   = Convert.ToDecimal(cmbAba5Sub1APMorte.SelectedValue);
                Int32   funeral = Convert.ToInt32(cmbAba5Sub1APFuneral.SelectedValue);

                lblAba5Sub1APIPAValor.Text = String.Format(new CultureInfo("pt-BR"), "{0:C}", cmbAba5Sub1APMorte.SelectedValue);

                DadosTPlanoProtecaoNovo             = ControllerPlanoProtecao.CalcularPremioFuneral(morte, 0, 0, funeral, FaixaBase);
                PremioPlano                         = DadosTPlanoProtecaoNovo.ValorPremioIdadeBase.GetValueOrDefault();
                lblAba5Sub1PremioPlanoValor.Text    = String.Format(new CultureInfo("pt-BR"), "{0:C}", DadosTPlanoProtecaoNovo.ValorPremioIdadeBase.GetValueOrDefault());
                lblAba5Sub1PremioAgregadoValor.Text = String.Format(new CultureInfo("pt-BR"), "{0:C}", PremioAgregado);
                lblAba5Sub1PremioRendaValor.Text    = String.Format(new CultureInfo("pt-BR"), "{0:C}", PremioRenda);
                lblAba5Sub1PremioTotalValor.Text    = String.Format(new CultureInfo("pt-BR"), "{0:C}", DadosTPlanoProtecaoNovo.ValorPremioIdadeBase.GetValueOrDefault() + PremioAgregado + PremioRenda);
            }
            catch
            {
            }
        }