public ActionResult DeleteConfirmed(int id)
        {
            BusDriverData busDriverData = db.BusDriverDatas.Find(id);

            db.BusDriverDatas.Remove(busDriverData);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Longitude,Latitude,Measurement_Timestamp,Position_Accuracy,Speed,Speed_Accuracy,Direction,Accel_x,Accel_y,Accel_z,Gyro_x,Gyro_y,Gyro_z,BusId,Trace_Match")] BusDriverData busDriverData)
 {
     if (ModelState.IsValid)
     {
         db.Entry(busDriverData).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusId = new SelectList(db.Buses, "BusId", "BusName", busDriverData.BusId);
     return(View(busDriverData));
 }
        // GET: BusDriverDatas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BusDriverData busDriverData = db.BusDriverDatas.Find(id);

            if (busDriverData == null)
            {
                return(HttpNotFound());
            }
            return(View(busDriverData));
        }
        // GET: BusDriverDatas/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BusDriverData busDriverData = db.BusDriverDatas.Find(id);

            if (busDriverData == null)
            {
                return(HttpNotFound());
            }
            ViewBag.BusId = new SelectList(db.Buses, "BusId", "BusName", busDriverData.BusId);
            return(View(busDriverData));
        }