Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id);

            db.ArrivalTimeTables.Remove(arrivalTimeTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,AirID,FlightNo,CityID,StatusID,ArrivalTime,TerminalID")] ArrivalTimeTable arrivalTimeTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(arrivalTimeTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AirID      = new SelectList(db.Airlines_Arrivals, "AirID", "Airline", arrivalTimeTable.AirID);
     ViewBag.CityID     = new SelectList(db.Cities_Arrivals, "CityID", "City", arrivalTimeTable.CityID);
     ViewBag.StatusID   = new SelectList(db.Status_Arrivals, "StatusID", "Status", arrivalTimeTable.StatusID);
     ViewBag.TerminalID = new SelectList(db.Terminal_Arrivals, "TerminalID", "Terminals", arrivalTimeTable.TerminalID);
     return(View(arrivalTimeTable));
 }
Пример #3
0
        // GET: ArrivalTimeTables/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id);

            if (arrivalTimeTable == null)
            {
                return(HttpNotFound());
            }
            return(View(arrivalTimeTable));
        }
Пример #4
0
        // GET: ArrivalTimeTables/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id);

            if (arrivalTimeTable == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AirID      = new SelectList(db.Airlines_Arrivals, "AirID", "Airline", arrivalTimeTable.AirID);
            ViewBag.CityID     = new SelectList(db.Cities_Arrivals, "CityID", "City", arrivalTimeTable.CityID);
            ViewBag.StatusID   = new SelectList(db.Status_Arrivals, "StatusID", "Status", arrivalTimeTable.StatusID);
            ViewBag.TerminalID = new SelectList(db.Terminal_Arrivals, "TerminalID", "Terminals", arrivalTimeTable.TerminalID);
            return(View(arrivalTimeTable));
        }