예제 #1
0
        private tb_Poliza CargarPoliza(IRange rowPoliza, tb_Poliza polizaEF)
        {
            var anioPeriodo = rowPoliza[0, 1].Value.ToString().Substring(0, 4);
            var mesPeriodo  = rowPoliza[0, 1].Value.ToString().Substring(4, 2);

            polizaEF.NumeroPoliza      = Convert.ToInt32(rowPoliza[0, 4].Value.ToString());
            polizaEF.FechaDevengue     = DateTime.FromOADate(Double.Parse(rowPoliza[0, 5].Value.ToString()));
            polizaEF.FechaVigencia     = DateTime.FromOADate(Double.Parse(rowPoliza[0, 6].Value.ToString()));
            polizaEF.FechaEnvio        = DateTime.FromOADate(Double.Parse(rowPoliza[0, 17].Value.ToString()));
            polizaEF.FechaNotificacion = DateTime.FromOADate(Double.Parse(rowPoliza[0, 20].Value.ToString()));
            polizaEF.IdMoneda          = moneda.ObtenerMoneda(rowPoliza[0, 3].Value.ToString());

            //var d = rowPoliza[0, 2].Value.ToString();

            polizaEF.IdCobertura = Convert.ToInt32(rowPoliza[0, 2].Value.ToString());
//            polizaEF.IdCobertura = cobertura.ObtenerCobertura1(rowPoliza[0, 2].Value.ToString());

            polizaEF.IdModalidad        = modalidad.ObtenerModalidad(rowPoliza[0, 22].Value.ToString());
            polizaEF.PeriodoDiferido    = Convert.ToInt32(rowPoliza[0, 7].Value.ToString());
            polizaEF.PeriodoGarantizado = Convert.ToInt32(rowPoliza[0, 8].Value.ToString());
            polizaEF.Gratificacion      = (rowPoliza[0, 9].Value.ToString() == "1") ? true : false;
            polizaEF.DerechoACrecer     = (rowPoliza[0, 14].Value.ToString() == "1") ? true : false;
            polizaEF.Calce                       = (rowPoliza[0, 18].Value.ToString() == "1") ? true : false;
            polizaEF.Repacto                     = (rowPoliza[0, 25].Value.ToString() == "1") ? true : false;
            polizaEF.Prima                       = Convert.ToDecimal(rowPoliza[0, 13].Value.ToString());
            polizaEF.CICInical                   = Convert.ToDecimal(rowPoliza[0, 21].Value.ToString());
            polizaEF.CICFInal                    = Convert.ToDecimal(rowPoliza[0, 21].Value.ToString());
            polizaEF.TasaVenta                   = Convert.ToDecimal(rowPoliza[0, 12].Value.ToString());
            polizaEF.TasaReserva                 = Convert.ToDecimal(rowPoliza[0, 11].Value.ToString());
            polizaEF.RentaTemporal               = (rowPoliza[0, 26].Value.ToString() == "1") ? true : false;
            polizaEF.PorcentajeRentaTemporal     = Convert.ToDecimal(rowPoliza[0, 23].Value.ToString());
            polizaEF.PeriodoInicialRentaTemporal = Convert.ToInt32(rowPoliza[0, 24].Value.ToString());
            polizaEF.IdCotizacion                = 1;
            polizaEF.IdPeriodo                   = periodo.ObtenerPeriodo(anioPeriodo, mesPeriodo);
            polizaEF.Estudiante                  = (rowPoliza[0, 15].Value.ToString() == "1") ? true : false;
            polizaEF.PorcentajeGarantizado       = Convert.ToDecimal(rowPoliza[0, 16].Value.ToString());
            polizaEF.PensionIncial               = Convert.ToDecimal(rowPoliza[0, 10].Value.ToString());
            polizaEF.PensionDevengue             = Convert.ToDecimal(rowPoliza[0, 10].Value.ToString());
            polizaEF.PensionReserva              = Convert.ToDecimal(rowPoliza[0, 10].Value.ToString());
            polizaEF.IdEstado                    = estado.ObtenerEstado(rowPoliza[0, 19].Value.ToString());

            return(polizaEF);
        }