public ActionResult DeleteConfirmed(int id)
        {
            Conractor conractor = db.Conractors.Find(id);

            db.Conractors.Remove(conractor);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "CotractorID,ContractorName,ConractorSupervisor")] Conractor conractor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(conractor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(conractor));
 }
        public ActionResult Create([Bind(Include = "CotractorID,ContractorName,ConractorSupervisor")] Conractor conractor)
        {
            if (ModelState.IsValid)
            {
                db.Conractors.Add(conractor);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(conractor));
        }
        // GET: Conractors/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Conractor conractor = db.Conractors.Find(id);

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