// // GET: /Confirmar/Delete/5 public ActionResult Delete(string id) { Session["Mensaje"] = ""; ReservaConfirmada model = obtenerReserva(id); return(View(model)); }
private ReservaConfirmada obtenerReserva(string Codreserva) { List <ReservaConfirmada> reservas = (List <ReservaConfirmada>)Session["Reservas"]; ReservaConfirmada model = reservas.Single(delegate(ReservaConfirmada reserva) { if (reserva.CodReserva == Codreserva) { return(true); } else { return(false); } }); return(model); }