public ActionResult DeleteConfirmed(int id) { EmployeeEncrypt employeeEncrypt = db.EmployeeEncrypts.Find(id); db.EmployeeEncrypts.Remove(employeeEncrypt); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "EmployeeID,Name,Position,Department,Address,AnnualSalary,SSN")] EmployeeEncrypt employeeEncrypt) { if (ModelState.IsValid) { db.spEmployeeEncryptUpdate(employeeEncrypt.EmployeeID, employeeEncrypt.Name, employeeEncrypt.Position, employeeEncrypt.Department, employeeEncrypt.Address, employeeEncrypt.AnnualSalary, employeeEncrypt.SSN); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employeeEncrypt)); }
public ActionResult Create([Bind(Include = "EmployeeID,Name,Position,Department,Address,AnnualSalary,SSN")] EmployeeEncrypt employeeEncrypt) { if (ModelState.IsValid) { db.EmployeeEncrypts.Add(employeeEncrypt); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employeeEncrypt)); }
// GET: EmployeeEncrypts/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmployeeEncrypt employeeEncrypt = db.EmployeeEncrypts.Find(id); if (employeeEncrypt == null) { return(HttpNotFound()); } return(View(employeeEncrypt)); }