private void FillRiskReport(Cotizacion cot)
        {
            if (cot == null)
            {
                return;
            }

            if (cot.bk_te_LazCasualty != null)
            {
                cot.bk_te_LazCasualty.RetroactiveList   = new SelectList(_CatalogoService.AllTableData((int)enumTable.RRRetroactive), "Value", "Label");
                cot.bk_te_LazCasualty.TriggerList       = new SelectList(_CatalogoService.AllTableData((int)enumTable.RRTrigger), "Value", "Label");
                cot.bk_te_LazCasualty.TypeOcurrencyList = new SelectList(_CatalogoService.AllTableData((int)enumTable.RRTypeOcurrency), "Value", "Label");
            }

            if (cot.bk_te_IncCOPE != null)
            {
                //ViewBag.ISOList = new SelectList(_CatalogoService.AllTableData((int)enumTable.RRISO), "Value", "Label");
                ViewBag.ISOList = _CatalogoService.AllTableData((int)enumTable.RRISO);
                //ViewBag.ExposicionList = new SelectList(_CatalogoService.AllExposiciones(), "ExposicionID", "nombre");
                ViewBag.ExposicionList = _CatalogoService.AllExposiciones();
            }

            if (cot.bk_te_IncASAreaFuego != null)
            {
                //ViewBag.TipoConstIncendioList = new SelectList(_CatalogoService.AllTipoConstructivoIncendios(), "TipoConstructivoIncendioID", "Descripcion");
                ViewBag.TipoConstIncendioList = _CatalogoService.AllTipoConstructivoIncendios();
                ViewBag.SICDivisionList       = _CatalogoService.AllSICDivisiones();
            }
        }
        public ActionResult Index(string id, string rfc)
        {
            ViewBag.SICDivisionList = _CatalogoService.AllSICDivisiones();

            if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(rfc))
            {
                id = Session["AseguradoID"].ToString();
            }

            int i;

            if (int.TryParse(id, out i))
            {
                Asegurado asegurado;

                if (i == 0 && rfc == null)
                {
                    return(RedirectToAction("List"));
                }

                if (i == 0 && (rfc.Length == 13 || rfc.Length == 12))
                {
                    asegurado = new Asegurado(rfc.ToUpper());
                }
                else
                {
                    asegurado = _AseguradoService.FindAseguradobyID(i);
                    Session["AseguradoID"] = i;
                }

                if (asegurado == null)
                {
                    return(View());
                }

                asegurado.TipoPersonaList  = new SelectList(_CatalogoService.AllTipoPersonas(), "TipoPersonaID", "Descripcion");
                asegurado.GeneroList       = new SelectList(_CatalogoService.AllGeneros(), "GeneroID", "nombre");
                asegurado.EstadoCivilList  = new SelectList(_CatalogoService.AllEstadoCiviles(), "EstadoCivilID", "Descripcion");
                asegurado.TipoTelefonoList = new SelectList(_CatalogoService.AllTipoTelefonos(), "TipoTelefonoID", "Descripcion");
                ViewBag.OFAC = MessagesValidation.Error(asegurado.ErrorOFAC());

                return(View(asegurado));
            }

            return(View());
        }