Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Bus_details bus_details = db.details.Find(id);

            db.details.Remove(bus_details);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "ID,busNumber,bStopNumber,busAddress,busStopLocation,latitude,longitude,heading")] Bus_details bus_details)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bus_details).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bus_details));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "ID,busNumber,bStopNumber,busAddress,busStopLocation,latitude,longitude,heading")] Bus_details bus_details)
        {
            if (ModelState.IsValid)
            {
                db.details.Add(bus_details);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bus_details));
        }
Exemple #4
0
        // GET: Bus_details/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Bus_details bus_details = db.details.Find(id);

            if (bus_details == null)
            {
                return(HttpNotFound());
            }
            return(View(bus_details));
        }