public ActionResult DeleteConfirmed(int id) { NewDriver newDriver = db.NewDrivers.Find(id); db.NewDrivers.Remove(newDriver); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DriverId,Id,DriverFullName,Email,contactNumber,DriverStatus,DriverLocation,DriverDestination")] NewDriver newDriver) { if (ModelState.IsValid) { db.Entry(newDriver).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(newDriver)); }
public ActionResult Create([Bind(Include = "DriverId,Id,DriverFullName,Email,contactNumber,DriverStatus,DriverLocation,DriverDestination")] NewDriver newDriver) { if (ModelState.IsValid) { db.NewDrivers.Add(newDriver); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(newDriver)); }
// GET: NewDrivers/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } NewDriver newDriver = db.NewDrivers.Find(id); if (newDriver == null) { return(HttpNotFound()); } return(View(newDriver)); }
/** * {@inheritDoc} */ public void TestStarted() { if (GetBasedir() != null && GetBasedir().Length > 0) { try { FileServer.getFileServer().setBasedir(FileServer.getFileServer().GetBasedir() + GetBasedir()); } catch (IllegalStateException e) { log.Error("Failed to set file server base dir with " + GetBasedir(), e); } } // we set the classpath String[] paths = this.getTestPlanClasspathArray(); for (int idx = 0; idx < paths.Length; idx++) { NewDriver.addURL(paths[idx]); log.Info("add " + paths[idx] + " to classpath"); } }
/// <summary> /// Returns a description of the Task. /// </summary> /// <returns></returns> public override string ToString() => $"change the WebDriver instance to a new '{NewDriver.GetType()}'";