Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EmployeeGradAssignment employeeGradAssignment = _employeeGradAssignmentService.GetById(id);

            _employeeGradAssignmentService.Delete(employeeGradAssignment.ID);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit(EmployeeGradAssignment employeeGradAssignment)
 {
     if (ModelState.IsValid)
     {
         _employeeGradAssignmentService.Update(employeeGradAssignment);
         return(RedirectToAction("Index"));
     }
     ViewBag.EmployeeID     = new SelectList(_employeeService.Get(x => x.ToList().OrderBy(e => e.FullName).ToList()), "ID", "FullName", employeeGradAssignment.EmployeeID);
     ViewBag.EmployeeGradID = new SelectList(_employeeGradService.Get(x => x.OrderBy(e => e.ShortName).ToList()), "ID", "FullName", employeeGradAssignment.EmployeeGradID);
     return(View(employeeGradAssignment));
 }
Beispiel #3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(StatusCode(StatusCodes.Status400BadRequest));
            }
            EmployeeGradAssignment employeeGradAssignment = _employeeGradAssignmentService.GetById(id.Value);

            if (employeeGradAssignment == null)
            {
                return(StatusCode(StatusCodes.Status404NotFound));
            }
            return(View(employeeGradAssignment));
        }
Beispiel #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(StatusCode(StatusCodes.Status400BadRequest));
            }
            EmployeeGradAssignment employeeGradAssignment = _employeeGradAssignmentService.GetById(id.Value);

            if (employeeGradAssignment == null)
            {
                return(StatusCode(StatusCodes.Status404NotFound));
            }
            ViewBag.EmployeeID     = new SelectList(_employeeService.Get(x => x.ToList().OrderBy(e => e.FullName).ToList()), "ID", "FullName", employeeGradAssignment.EmployeeID);
            ViewBag.EmployeeGradID = new SelectList(_employeeGradService.Get(x => x.OrderBy(e => e.ShortName).ToList()), "ID", "FullName", employeeGradAssignment.EmployeeGradID);
            return(View(employeeGradAssignment));
        }