public ActionResult DeleteConfirmed(decimal id) { vuelo vuelo = db.vuelo.Find(id); db.vuelo.Remove(vuelo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idvuelo,aeropuertosalida,aeropuertodestino,fechasalida,fechallegada,precioturista,precioejecutiva,precioprimeraclase")] vuelo vuelo) { if (ModelState.IsValid) { db.Entry(vuelo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.aeropuertosalida = new SelectList(db.aeropuerto, "idaeropuerto", "ciudadnombre", vuelo.aeropuertosalida); ViewBag.aeropuertodestino = new SelectList(db.aeropuerto, "idaeropuerto", "ciudadnombre", vuelo.aeropuertodestino); return(View(vuelo)); }
// GET: vuelos/Details/5 public ActionResult Details(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vuelo vuelo = db.vuelo.Find(id); if (vuelo == null) { return(HttpNotFound()); } return(View(vuelo)); }
// GET: vuelos/Edit/5 public ActionResult Edit(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vuelo vuelo = db.vuelo.Find(id); if (vuelo == null) { return(HttpNotFound()); } ViewBag.aeropuertosalida = new SelectList(db.aeropuerto, "idaeropuerto", "ciudadnombre", vuelo.aeropuertosalida); ViewBag.aeropuertodestino = new SelectList(db.aeropuerto, "idaeropuerto", "ciudadnombre", vuelo.aeropuertodestino); return(View(vuelo)); }
public void TestMethod1() { RemoteWebDriver driver = new ChromeDriver(); driver.Manage().Window.Maximize(); // driver.Navigate().GoToUrl("file:///C:/Users/jcarderi/Desktop/prueba/Tiquetes%20Baratos%20-%20Tiquetes%20y%20Vuelos%20Baratos.html"); driver.Navigate().GoToUrl("https://www.tiquetesbaratos.com/?gclid=CjwKCAiArK_fBRABEiwA0gOOcwFRJIsAj1RBS-PJT9JtQcCwl0P8r2KU3Bf3BxZAcKgBq3AslWMkrxoCc2kQAvD_BwE"); vuelo vuelo = new vuelo(); iniciopage inicio = new iniciopage(driver); vuelo.ciudadOrigen = "valle"; vuelo.ciudadDestino = "cali"; inicio.Buscarvuelo(vuelo); }