Esempio n. 1
0
        /// <summary>
        /// Affichage des 3 combobox : poste, contrat, region
        /// </summary>
        private void AfficheCombo()
        {
            try
            {
                AccesPoste   accesPoste = new AccesPoste();
                List <Poste> ListePoste = accesPoste.listePoste();
                comboBoxPoste.DataSource    = ListePoste;
                comboBoxPoste.DisplayMember = "TYPEPOSTE";
                comboBoxPoste.ValueMember   = "IDPOSTE";
                comboBoxPoste.SelectedIndex = -1;

                AccesContrat   accesContrat = new AccesContrat();
                List <Contrat> listeContrat = accesContrat.ListeContrat();
                comboBoxContrat.DataSource    = listeContrat;
                comboBoxContrat.DisplayMember = "TYPECONTRAT";
                comboBoxContrat.ValueMember   = "IDCONTRAT";
                comboBoxContrat.SelectedIndex = -1;

                AccesRegion accesRegion = new AccesRegion();
                List <ClassMetier.Region> listeRegion = accesRegion.listeRegion();
                comboBoxRegion.DataSource    = listeRegion;
                comboBoxRegion.DisplayMember = "NOMREGION";
                comboBoxRegion.ValueMember   = "IDREGION";
                comboBoxRegion.SelectedIndex = -1;
            }
            catch (SqlException)
            {
                MessageBox.Show("Problème de connection essayez plus tard");
                this.Close();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Affichage des 3 combobox : poste, contrat, region
        /// </summary>
        private void AfficheCombo()
        {
            UseWaitCursor = true;
            try
            {
                AccesPoste   accesPoste = new AccesPoste();
                List <Poste> ListePoste = accesPoste.listePoste();
                comboBoxPoste.DataSource  = ListePoste;
                comboBoxPoste.ValueMember = "IDPOSTE";

                AccesContrat   accesContrat = new AccesContrat();
                List <Contrat> listeContrat = accesContrat.ListeContrat();
                comboBoxContrat.DataSource  = listeContrat;
                comboBoxContrat.ValueMember = "IDCONTRAT";

                AccesRegion accesRegion = new AccesRegion();
                List <ClassMetier.Region> listeRegion = accesRegion.listeRegion();
                comboBoxRegion.DataSource  = listeRegion;
                comboBoxRegion.ValueMember = "IDREGION";
            }
            catch (SqlException)
            {
                MessageBox.Show("Problème de connection essayez plus tard");
            }
            UseWaitCursor = false;
        }
Esempio n. 3
0
        /// <summary>
        /// Affichage des 3 combobox : poste, contrat, region
        /// </summary>
        private void AfficheCombo()
        {
            UseWaitCursor = true;
            try
            {
                AccesOffre accesOffre  = new AccesOffre();
                Offre      offreSelect = new Offre();

                offreSelect = accesOffre.GetOffreByidoffre(_idOffreSeelect);
                AccesPoste   accesPoste = new AccesPoste();
                List <Poste> ListePoste = accesPoste.listePoste();
                comboBoxPoste.DataSource    = ListePoste;
                comboBoxPoste.DisplayMember = "TYPEPOSTE";
                comboBoxPoste.ValueMember   = "IDPOSTE";
                comboBoxPoste.SelectedValue = offreSelect.IdPoste;

                AccesContrat   accesContrat = new AccesContrat();
                List <Contrat> listeContrat = accesContrat.ListeContrat();
                comboBoxContrat.DataSource    = listeContrat;
                comboBoxContrat.DisplayMember = "TYPECONTRAT";
                comboBoxContrat.ValueMember   = "IDCONTRAT";
                comboBoxContrat.SelectedValue = offreSelect.IdContrat;

                AccesRegion accesRegion = new AccesRegion();
                List <ClassMetier.Region> listeRegion = accesRegion.listeRegion();
                comboBoxRegion.DataSource    = listeRegion;
                comboBoxRegion.DisplayMember = "NOMREGION";
                comboBoxRegion.ValueMember   = "IDREGION";
                comboBoxRegion.SelectedValue = offreSelect.IdRegion;
            }
            catch (SqlException)
            {
                MessageBox.Show("Problème de connection essayez plus tard");
            }
            UseWaitCursor = false;
        }