public ActionResult VerDetalleNV(int nvNumero) { try { NotadeVentaCabeceraModels NVC = new NotadeVentaCabeceraModels(); List <NotadeVentaCabeceraModels> NVCL = new List <NotadeVentaCabeceraModels>(); NotaDeVentaDetalleModels NVD = new NotaDeVentaDetalleModels(); List <NotaDeVentaDetalleModels> NVDL = new List <NotaDeVentaDetalleModels>(); NVC.NVNumero = nvNumero; NVD.NVNumero = nvNumero; var nvc = ReporteDAO.BuscarNVC(NVC); if (nvc != null) { NVCL = nvc; } else { ViewBag.mensaje = 1; ViewBag.NVnum = nvNumero; return(View()); } ViewBag.cabecera = NVCL; var nvd = ReporteDAO.BuscarNVD(NVD); if (nvd != null) { NVDL = nvd; } ViewBag.detalle = NVDL; return(View()); } catch (Exception ex) { return(View(ex.Message)); } }