Example #1
0
        public IActionResult AddWorkDays(DoctorAddWorkDays doctorAddWorkDays)
        {
            if (ModelState.IsValid)
            {
                var userId = Convert.ToInt32(User.FindFirstValue(ClaimTypes.NameIdentifier));

                _doctorService.AddWordDays(doctorAddWorkDays.DateOfWork, userId);

                TempData["message"] = string.Format("Рабочие дни с графиком были добавлены!");

                return(RedirectToAction("Index", "Doctor"));
            }

            return(View());
        }