Пример #1
0
        public IActionResult CreateDepartment(Department department, int customerId)
        {
            if (ModelState.IsValid)
            {
                _customerService.AddCustomerDepartment(customerId, department);
                ViewBag.customerId = customerId;

                return(RedirectToAction("index", "departments"));
            }
            ViewBag.customerId = customerId;
            return(View("~/Views/Admin/Departments/CreateDepartment.cshtml", department));
        }