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); } }
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()); }
public async Task OnUpdateDepartment(DepartmentProfessor department) { await _eventAggregator.PublishOnBackgroundThreadAsync(ViewType.UpdateDepartment); await _eventAggregator.PublishOnBackgroundThreadAsync(department); }