Exemplo n.º 1
0
        public IActionResult EditSubDepartment(int subDepartmentId, DepartmentViewModel departmentViewModel)
        {
            if (!string.IsNullOrEmpty(departmentViewModel.SubDepartment.Description))
            {
                departmentViewModel.SubDepartment.SubDepartmentId = subDepartmentId;
                _DepartmentData.EditSubDepartment(departmentViewModel.SubDepartment);
                return(RedirectToAction("DepartmentofSubDepartment", "Department", new { departmentId = departmentViewModel.SubDepartment.DepartmentId }));
            }

            return(Content("I will try to find a way to add to table ID " + departmentViewModel.Department.DepartmentId + "New Name Name" + departmentViewModel.Department.Description));
        }