public ActionResult DeleteConfirmed(int id) { EmplyeeInfoDB emplyeeInfoDB = db.EmplyeeInfoDBs.Find(id); db.EmplyeeInfoDBs.Remove(emplyeeInfoDB); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idInfo,IdEmloyee,ExpLevel,StartingDate,Salary,VacationDay")] EmplyeeInfoDB emplyeeInfoDB) { if (ModelState.IsValid) { db.Entry(emplyeeInfoDB).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idInfo = new SelectList(db.EmployeeDBs, "IdEmployee", "FirstName", emplyeeInfoDB.idInfo); return(View(emplyeeInfoDB)); }
// GET: EmplyeeInfoDBs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmplyeeInfoDB emplyeeInfoDB = db.EmplyeeInfoDBs.Find(id); if (emplyeeInfoDB == null) { return(HttpNotFound()); } return(View(emplyeeInfoDB)); }
// GET: EmplyeeInfoDBs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmplyeeInfoDB emplyeeInfoDB = db.EmplyeeInfoDBs.Find(id); if (emplyeeInfoDB == null) { return(HttpNotFound()); } ViewBag.idInfo = new SelectList(db.EmployeeDBs, "IdEmployee", "FirstName", emplyeeInfoDB.idInfo); return(View(emplyeeInfoDB)); }