public ActionResult DeleteConfirmed(int id)
        {
            EngTehWorkerProf engTehWorkerProf = db.EngTehWorkerProfs.Find(id);

            db.EngTehWorkerProfs.Remove(engTehWorkerProf);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "EngTehWorkerId,EngTehProfId,StartWorkDate,QuitDate")] EngTehWorkerProf engTehWorkerProf)
 {
     if (ModelState.IsValid)
     {
         db.Entry(engTehWorkerProf).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EngTehProfId   = new SelectList(db.EngTehProfs, "IdEngTehProf", "EngTehProfName", engTehWorkerProf.EngTehProfId);
     ViewBag.EngTehWorkerId = new SelectList(db.EngTehWorkers, "IdEngTehWorker", "EngTehWorkerName", engTehWorkerProf.EngTehWorkerId);
     return(View(engTehWorkerProf));
 }
        // GET: EngTehWorkerProfs/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EngTehWorkerProf engTehWorkerProf = db.EngTehWorkerProfs.Find(id);

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

            if (engTehWorkerProf == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EngTehProfId   = new SelectList(db.EngTehProfs, "IdEngTehProf", "EngTehProfName", engTehWorkerProf.EngTehProfId);
            ViewBag.EngTehWorkerId = new SelectList(db.EngTehWorkers, "IdEngTehWorker", "EngTehWorkerName", engTehWorkerProf.EngTehWorkerId);
            return(View(engTehWorkerProf));
        }