public FormAjoutAssociation() { InitializeComponent(); List <Pays> lesPays = PaysManager.GetInstance().GetPays(); List <Mission> lesMissions = MissionManager.GetInstance().GetMission(); cbxMission.DisplayMember = "Libelle"; cbxMission.ValueMember = "Id"; cbxMission.DataSource = lesMissions; cbxPays.DisplayMember = "Libelle"; cbxPays.ValueMember = "Id"; cbxPays.DataSource = lesPays; }
public FormChoixPays(List <Pays> laListe) { InitializeComponent(); //on associe la collection à la Combobox this.cbxChoixPays.DataSource = PaysManager.GetInstance().GetPays(); // la valeur affichée dans la liste sera la colonne libelle de la collection this.cbxChoixPays.DisplayMember = "libelle"; // la valeur affichée dans la liste sera la colonne id de la collection this.cbxChoixPays.ValueMember = "id"; // }
public FormConsultAssociationMission() { InitializeComponent(); List <Pays> lesPays = PaysManager.GetInstance().GetPays(); lesAssociations = AssociationManager.GetInstance().GetAssociations(); dtgConsultAssociation.DataSource = null; dtgConsultAssociation.DataSource = lesAssociations; lesMissions = MissionManager.GetInstance().GetMission(); dtgConsultMissions.DataSource = null; dtgConsultMissions.DataSource = lesMissions; cbxPays.DisplayMember = "Libelle"; cbxPays.ValueMember = "Id"; cbxPays.DataSource = lesPays; cbxPays.Visible = false; dtgConsultAssociation.Visible = false; dtgConsultMissions.Visible = false; }