Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Department department = p_repo.GetDepartment(id);

            p_repo.DeleteDepartment(department);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public ActionResult Edit(int id, Department department)
        {
            try
            {
                // TODO: Add update logic here
                m_repo.UpdateDepartment(department);

                m_repo.DeleteDepartment(m_repo.GetDepartmentById(id));

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }