Beispiel #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            IGestionEmployes
                gestionEmployes = GestionEmployesBuilderClassFactory.getInterface();

            if (comboBoxAttribut.Text == "Numéro de rue")
            {
                dataGridAdresses.DataSource = gestionEmployes.findAdressesByNumeroRue(textBoxSearch.Text);
            }
            else if (comboBoxAttribut.Text == "Nom de rue")
            {
                dataGridAdresses.DataSource = gestionEmployes.findAdressesByNomRue(textBoxSearch.Text);
            }
            else if (comboBoxAttribut.Text == "Code postal")
            {
                dataGridAdresses.DataSource = gestionEmployes.findAdressesByCodePostal(textBoxSearch.Text);
            }
            else if (comboBoxAttribut.Text == "Ville")
            {
                int IdVille = Convert.ToInt32((comboBoxVille.SelectedItem as ComboboxItem).Value);
                dataGridAdresses.DataSource = gestionEmployes.findAdressesByVille(IdVille);
            }
        }