public ActionResult DeleteConfirmed(int id)
        {
            DthModels dthModels = db.DthModels.Find(id);

            db.DthModels.Remove(dthModels);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "DthId,DthEmployee,DthTimeEntered,DthTimeCleared")] DthModels dthModels)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dthModels).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DthEmployee = new SelectList(db.EmployeeModels, "Id", "FirstName", dthModels.DthEmployee);
     return(View(dthModels));
 }
        // GET: DthModels/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DthModels dthModels = db.DthModels.Find(id);

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

            if (dthModels == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DthEmployee = new SelectList(db.EmployeeModels, "Id", "FirstName", dthModels.DthEmployee);
            return(View(dthModels));
        }