コード例 #1
0
        public AjouterEntrevueEtudiantVue(Utilisateur user, int Id)
        {
            InitializeComponent();

            User = user;

            MonEntrevue              = new Entrevue();
            MonEntrevue.IdEtudiant   = Id;
            MonEntrevue.IdEntreprise = -1;

            listeTypeEntrevue = new List <string>();
            listeTypeResultat = new List <string>();
            IsModified        = false;

            foreach (IdDescription id in ListeDescription.listTypeEntrevue)
            {
                listeTypeEntrevue.Add(id.Description);
            }
            foreach (IdDescription id in ListeDescription.listTypeResultat)
            {
                listeTypeResultat.Add(id.Description);
            }

            choixEntrevueVue.ItemsSource = listeTypeEntrevue;
            resultatTypeVue.ItemsSource  = listeTypeResultat;

            lesEntreprise = ManagerEntreprise.recupererListeProfilesEntreprises();

            ajouterEntrepriseVue();
        }
コード例 #2
0
        // constructeur
        public AjouterStageVue(Utilisateur user)
        {
            InitializeComponent();
            InitializeComponent();
            Rect workArea = System.Windows.SystemParameters.WorkArea;

            this.Left = (workArea.Width - this.Width) / 2 + workArea.Left;
            this.Top  = (workArea.Height - this.Height) / 2 + workArea.Top;
            User      = user;

            style = this.FindResource("BtnStyleNoHover2") as Style;
            //PERMISSIONS
            //admin
            if (User.IdTypeUtilisateur == 1)
            {
                BtnComptes.Visibility        = System.Windows.Visibility.Visible;
                BtnConfigurations.Visibility = System.Windows.Visibility.Visible;
            }
            //ressources humaines
            else if (User.IdTypeUtilisateur == 2)
            {
                BtnComptes.Visibility        = System.Windows.Visibility.Hidden;
                BtnConfigurations.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                BtnComptes.Visibility        = System.Windows.Visibility.Hidden;
                BtnConfigurations.Visibility = System.Windows.Visibility.Hidden;
                StatistiquesMenu.Visibility  = System.Windows.Visibility.Hidden;
            }

            userName.Content    = User.Nom;
            lesEtudiants        = ManagerEtudiant.recupererListeProfilesEtudiantsRechercheStage();
            lesEntreprises      = ManagerEntreprise.recupererListeProfilesEntreprises();
            resultat.Visibility = System.Windows.Visibility.Hidden;

            listTypeStage = new List <string>();

            foreach (IdDescription id in ListeDescription.listTypeStage)
            {
                listTypeStage.Add(id.Description);
            }

            LeStage = new Stage();
            LeStage.IdEntreprise = -1;
            LeStage.IdEtudiant   = -1;



            ChoixType.ItemsSource = listTypeStage;

            ajouterEntrepriseVue();
            ajouterEtudiantVue();
        }
コード例 #3
0
        public ListerEntreprisesVue(Utilisateur leUser)
        {
            InitializeComponent();
            resultat.Visibility = System.Windows.Visibility.Hidden;
            Rect workArea = System.Windows.SystemParameters.WorkArea;

            this.Left = (workArea.Width - this.Width) / 2 + workArea.Left;
            this.Top  = (workArea.Height - this.Height) / 2 + workArea.Top;

            lL = new List <string>();
            lF = new List <string>();
            lI = new List <string>();
            lT = new List <string>();


            foreach (Langue id in ListeDescription.listLangue)
            {
                lL.Add(id.Description);
            }

            foreach (Formation id in ListeDescription.listFormations)
            {
                lF.Add(id.Description);
            }

            foreach (IdDescription id in ListeDescription.listTechnologie)
            {
                lI.Add(id.Description);
            }

            foreach (IdDescription id in ListeDescription.listInterets)
            {
                lT.Add(id.Description);
            }

            // pb recuperer bon fichier
            lesEntreprises = ManagerEntreprise.recupererListeProfilesEntreprises();

            Console.WriteLine(lesEntreprises.Count);

            ChoixLangue.ItemsSource      = lL;
            ChoixFormation.ItemsSource   = lF;
            ChoixInteret.ItemsSource     = lI;
            ChoixTechnologie.ItemsSource = lT;
            User = leUser;
            //PERMISSIONS
            //admin
            if (User.IdTypeUtilisateur == 1)
            {
                BtnComptes.Visibility        = System.Windows.Visibility.Visible;
                BtnConfigurations.Visibility = System.Windows.Visibility.Visible;
            }
            //ressources humaines
            else if (User.IdTypeUtilisateur == 2)
            {
                BtnComptes.Visibility        = System.Windows.Visibility.Hidden;
                BtnConfigurations.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                BtnComptes.Visibility           = System.Windows.Visibility.Hidden;
                BtnConfigurations.Visibility    = System.Windows.Visibility.Hidden;
                BtnAjouterEntreprise.Visibility = System.Windows.Visibility.Hidden;
                StatistiquesMenu.Visibility     = System.Windows.Visibility.Hidden;
            }
            userName.Content = User.Nom;
            ajouterEntrepriseVue();
        }
コード例 #4
0
        //evenement pout rechercher une entreprise
        private void BtnValiderRechercher_Click(object sender, RoutedEventArgs e)
        {
            resultat.Visibility = System.Windows.Visibility.Hidden;
            String ChoixFormationValeur   = (String)ChoixFormation.SelectedValue;
            String ChoixInteretValeur     = (String)ChoixInteret.SelectedValue;
            String ChoixTechnologieValeur = (String)ChoixTechnologie.SelectedValue;
            String ChoixLangueValeur      = (String)ChoixLangue.SelectedValue;

            int idFormation   = ListeDescription.recupererIdFormation(ChoixFormationValeur);
            int idLangue      = ListeDescription.recupererIdLangue(ChoixLangueValeur);
            int idInteret     = ListeDescription.recupererIdDescription(ChoixInteretValeur, ListeDescription.listInterets);
            int idTechnologie = ListeDescription.recupererIdDescription(ChoixInteretValeur, ListeDescription.listTechnologie);

            String idFormationString   = idFormation.ToString();
            String idInteretString     = idInteret.ToString();
            String idLangueString      = idLangue.ToString();
            String idTechnologieString = idTechnologie.ToString();

            //MessageBox.Show(idStatusString + "     " + idFormationString);
            String ChoixNomValeur      = ChoixNom.Text;
            String ChoixCourrielValeur = ChoixCourriel.Text;
            String ChoixVilleValeur    = ChoixVille.Text;



            Dictionary <String, String> dictionnay = new Dictionary <String, String>();

            //dictionnay.Add("statusValeur", ChoixStatusValeur);
            //dictionnay.Add("ChoixFormation", ChoixFormationValeur);


            if (idFormation != -1)
            {
                dictionnay.Add("idFormation", idFormationString);
            }

            if (idInteret != -1)
            {
                dictionnay.Add("idInteret", idInteretString);
            }

            if (idLangue != -1)
            {
                dictionnay.Add("idLangue", idLangueString);
            }

            if (idTechnologie != -1)
            {
                dictionnay.Add("idTechnologie", idTechnologieString);
            }

            dictionnay.Add("nom", ChoixNomValeur);
            dictionnay.Add("courriel", ChoixCourrielValeur);
            dictionnay.Add("ville", ChoixVilleValeur);



            lesEntreprises = ManagerEntreprise.recupererListeProfilesEntreprisesSelonRecherche(dictionnay);

            if (lesEntreprises != null)
            {
                ListeEntreprisesVue.Children.Clear();
                ajouterEntrepriseVue();
            }
            else
            {
                ListeEntreprisesVue.Children.Clear();
                resultat.Visibility = System.Windows.Visibility.Visible;
                lesEntreprises      = ManagerEntreprise.recupererListeProfilesEntreprises();
            }
        }
コード例 #5
0
 private void RadioBtnEntreprise_Click(object sender, RoutedEventArgs e)
 {
     ListeEtudiantsEntrepriseVue.Children.Clear();
     lesEntreprises = ManagerEntreprise.recupererListeProfilesEntreprises();
     ajouterEntrepriseVue();
 }