public ActionResult DeleteConfirmed(string id) { EMPINFO eMPINFO = db.EMPINFOes.Find(id); db.EMPINFOes.Remove(eMPINFO); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "EmpID,Imię,Wiek,Stan_Konta")] EMPINFO eMPINFO) { if (ModelState.IsValid) { db.Entry(eMPINFO).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eMPINFO)); }
public ActionResult Create([Bind(Include = "EmpID,Imię,Wiek,Stan_Konta")] EMPINFO eMPINFO) { if (ModelState.IsValid) { db.EMPINFOes.Add(eMPINFO); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eMPINFO)); }
// GET: EMPINFOes/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EMPINFO eMPINFO = db.EMPINFOes.Find(id); if (eMPINFO == null) { return(HttpNotFound()); } return(View(eMPINFO)); }