public void fillEmployeListBox(Bloc bloc) { listEmploye.Items.Clear(); List<Ressource> ressources = bloc.getListRessourceAffecte(); for (int i = 0; i < ressources.Count(); i++) { // Add the employee name to the listbox. if (ressources.ElementAt(i) is Profil) { listEmploye.Items.Add(((Profil)ressources.ElementAt(i)).getId() + " - " + ((Profil)ressources.ElementAt(i)).getNom() + " " + ((Profil)ressources.ElementAt(i)).getPrenom()); } } }
public void fillEquipeListBox(Bloc bloc) { listEquipe.Items.Clear(); List<Ressource> ressources = bloc.getListRessourceAffecte(); // MessageBox.Show(bloc.getListRessourceAffecte().Count.ToString()); for (int i = 0; i < ressources.Count(); i++) { if (ressources.ElementAt(i) is Equipe) { // Add the employee name to the listbox. listEquipe.Items.Add(((Equipe)ressources.ElementAt(i)).getNom()); } } }
private void UnlinkBlocToRessource(Ressource res, Bloc bloc) { for (int i = 0; i < bloc.getListRessourceAffecte().Count; i++) { if (res == bloc.getListRessourceAffecte()[i]) bloc.getListRessourceAffecte().Remove(res); } }