public async Task <IActionResult> ReportByDepartment(int departmentId, int timeOfId)
        {
            var timesOf = await _repository.GetTimesOfEvaluationAndPerformance(timeOfId);

            var department = await _repository.GetDepartment(departmentId);

            if (timesOf == null || department == null)
            {
                ViewBag.ErrorMessage = "لايوجد   بيانات";
                return(View("NotFound"));
            }



            var model = new DepartmentReportModelView
            {
                Name = department.Name,
                BusinessAndAchievements = await _repository.GetDepartmentBusinessInThisSicle(department.Id, timesOf.Id),
                Occasions   = await _repository.GetDepartmentOccasionsInThisSicle(department.Id, timesOf.Id),
                Evaluations = await _repository.GetDepartmentEvaluationsInThisSicle(department.Id, timesOf.Id),
                Courses     = await _repository.GetDepartmentCoursesInThisSicle(department.Id, timesOf.Id),
            };

            ViewBag.departmentId = department.Id;
            ViewBag.timesOfEvaluationAndPerformanceId = timesOf.Id;
            ViewBag.departmentName = department.Name;



            return(View(model));
        }