public ActionResult DeleteConfirmed(int id)
 {
     DataAccess.Repository.InputType inputType = db.InputTypes.Find(id);
     db.InputTypes.Remove(inputType);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit([Bind(Include = "Id,Name,Description,Active,CreatedTime,LastUpdatedTime,CreatedByUserID,LastUpdatedByUserID")] DataAccess.Repository.InputType inputType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inputType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedByUserID     = new SelectList(db.Users, "Id", "Name", inputType.CreatedByUserID);
     ViewBag.LastUpdatedByUserID = new SelectList(db.Users, "Id", "Name", inputType.LastUpdatedByUserID);
     return(View(inputType));
 }
 // GET: InputTypes/Details/5
 public ActionResult Details(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     DataAccess.Repository.InputType inputType = db.InputTypes.Find(id);
     if (inputType == null)
     {
         return(HttpNotFound());
     }
     return(View(inputType));
 }
 // GET: InputTypes/Edit/5
 public ActionResult Edit(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     DataAccess.Repository.InputType inputType = db.InputTypes.Find(id);
     if (inputType == null)
     {
         return(HttpNotFound());
     }
     ViewBag.CreatedByUserID     = new SelectList(db.Users, "Id", "Name", inputType.CreatedByUserID);
     ViewBag.LastUpdatedByUserID = new SelectList(db.Users, "Id", "Name", inputType.LastUpdatedByUserID);
     return(View(inputType));
 }