public ActionResult Edit(EmployeeModel emp) { try { EmpCRUDOperations.UpdateEmp(emp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(EmployeeModel Emp) { try { EmpCRUDOperations.AddEmp(Emp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, EmployeeModel emp) { try { EmpCRUDOperations.DeleteEmp(id); return(RedirectToAction("Index")); // return View(emp); // return View(); } catch { return(View()); } }
public ActionResult getEmployees() { var emps = EmpCRUDOperations.getEmployees(); return(View(emps)); }
// // GET: /Emp1/Delete/5 public ActionResult Delete(int id) { var emp = EmpCRUDOperations.getEmpbyId(id); return(View(emp)); }