コード例 #1
0
        public async Task OnDeleteDepartment(DepartmentProfessor department)
        {
            var result = await _confirmationDialogHelper.ConfirmationWindowCall(ElementType.Department);

            if (result)
            {
                var dep = new Domain.Department()
                {
                    Id   = department.DepartmentId,
                    Code = department.Code,
                    Name = department.Name
                };
                Departments.Remove(department);
                _departmentRepository.DeleteDepartment(dep);
            }
        }
コード例 #2
0
        public List <Professor> GetProfessors(DepartmentProfessor department)
        {
            var Professors = from depProf in _context.ProfessorDepartments
                             where depProf.DepartmentId == department.DepartmentId
                             from prof in _context.Professors
                             where prof.Id == depProf.ProfessorId
                             select new Professor
            {
                Id         = prof.Id,
                FirstName  = prof.FirstName,
                LastName   = prof.LastName,
                Cin        = prof.Cin,
                Diplome    = prof.Diplome,
                Email      = prof.Email,
                HiringDate = prof.HiringDate
            };

            return(Professors.ToList());
        }
コード例 #3
0
        public async Task OnUpdateDepartment(DepartmentProfessor department)
        {
            await _eventAggregator.PublishOnBackgroundThreadAsync(ViewType.UpdateDepartment);

            await _eventAggregator.PublishOnBackgroundThreadAsync(department);
        }