public void GetTest() { int LibroId = 0; // TODO: Inicializar en un valor adecuado Libro expected = null; // TODO: Inicializar en un valor adecuado Libro actual; actual = LibroBLL.Get(LibroId); Assert.AreEqual(expected, actual); Assert.Inconclusive("Compruebe la exactitud de este método de prueba."); }
// GET: Libros/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Libro libro = LibroBLL.Get(id); if (libro == null) { return(HttpNotFound()); } return(View(libro)); }
// GET: Libros/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Libro libro = LibroBLL.Get(id); if (libro == null) { return(HttpNotFound()); } ViewBag.id_cat = new SelectList(CategoriaBLL.List(), "id_cat", "nombre_cat", libro.id_cat); return(View(libro)); }
// GET: Libros/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Libro libro = LibroBLL.Get(id); if (libro == null) { return(HttpNotFound()); } ViewBag.title = "Detalle del Libro"; return(View(libro)); }
// // GET: /Libro/Details/5 public ActionResult Details(int id) { try { Libro l = LibroBLL.Get(id); if (l != null) { return(View(l)); } else { return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError("Nulo", "", "", "", ""))); } } catch (Exception ex) { return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError(ex))); } }
// // GET: /Libro/Edit/5 public ActionResult Edit(int id) { ListaLibEjem = null; ListaLibEjemDel = null; try { Libro l = LibroBLL.Get(id); if (l != null) { ViewBag.Autores = AutorBLL.ListActivos(); ViewBag.Editoriales = EditorialBLL.ListActivos(); ViewBag.Clasificaciones = ClasificacionBLL.ListActivos(); return(View(l)); } else { return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError("Nulo", "", "", "", ""))); } } catch (Exception ex) { return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError(ex))); } }