Example #1
0
 public ActionResult Edit(EmployeeModel emp)
 {
     try
     {
         EmpCRUDOperations.UpdateEmp(emp);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #2
0
 public ActionResult Create(EmployeeModel Emp)
 {
     try
     {
         EmpCRUDOperations.AddEmp(Emp);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #3
0
 public ActionResult Delete(int id, EmployeeModel emp)
 {
     try
     {
         EmpCRUDOperations.DeleteEmp(id);
         return(RedirectToAction("Index"));
         // return View(emp);
         // return View();
     }
     catch
     {
         return(View());
     }
 }
Example #4
0
        public ActionResult getEmployees()
        {
            var emps = EmpCRUDOperations.getEmployees();

            return(View(emps));
        }
Example #5
0
        //
        // GET: /Emp1/Delete/5

        public ActionResult Delete(int id)
        {
            var emp = EmpCRUDOperations.getEmpbyId(id);

            return(View(emp));
        }