private void afficherDetailsCommunicationEntrepriseSelect(Communication communicationSelect)
        {
            BtnModifierCommunication.IsEnabled = true;
            communication = communicationSelect;

            ChoixStatus.SelectedItem = ListeDescription.recupererDescription(communication.StatusCommunication, ListeDescription.listStatusCommunication);
            ChoixDate.SelectedDate   = communication.DateCommunication;
            ChoixType.SelectedItem   = ListeDescription.recupererDescription(communication.TypeCommunication, ListeDescription.listTypeCommunication);
            choixCommentaire.Text    = communication.Commentaire;
            entreprise = ManagerEntreprise.recupererProfilesEntreprises(communication.IdTo);
            LblNomDeEtudiant.Content = entreprise.Nom;
            LblFormation.Text        = entreprise.Secteur;
            ImageEllipse.Source      = new BitmapImage(new Uri(@"" + entreprise.ImageLogo, UriKind.RelativeOrAbsolute));
        }
Example #2
0
        private void afficherDetailsStageSelect(Stage LeStageAModifier)
        {
            BtnValiderRechercher.IsEnabled  = true;
            ChoixRetenu.IsChecked           = LeStageAModifier.Retenu;
            ChoixDatePlacement.SelectedDate = LeStageAModifier.DatePlacement;
            ChoixDateDebut.SelectedDate     = LeStageAModifier.DateDebut;
            ChoixDateFin.SelectedDate       = LeStageAModifier.DateFin;
            ChoixSalaire.Text     = LeStageAModifier.Salaire.ToString();
            ChoixCommentaire.Text = LeStageAModifier.Commentaire;
            Entreprise entreprise = ManagerEntreprise.recupererProfilesEntreprises(LeStageAModifier.IdEntreprise);

            NomEntreprise.Content  = entreprise.Nom;
            PhotoEntreprise.Source = new BitmapImage(new Uri(@"" + entreprise.ImageLogo, UriKind.RelativeOrAbsolute));
            Etudiant etudiant = ManagerEtudiant.recupererProfilesEtudiant(LeStageAModifier.IdEtudiant);

            NomEtudiant.Content  = etudiant.Nom;
            PhotoEtudiant.Source = new BitmapImage(new Uri(@"" + etudiant.PhotoURL, UriKind.RelativeOrAbsolute));
        }
        public ProfileEntrevueEtudiantVue(Utilisateur user, int idEntrevue)
        {
            InitializeComponent();
            User = user;

            MonEntrevue   = ManagerEntrevue.recupererEntrevueParId(idEntrevue);
            MonEntreprise = ManagerEntreprise.recupererProfilesEntreprises(MonEntrevue.IdEntreprise);

            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;

            choixEntrevueVue.SelectedValue = ListeDescription.recupererDescription(MonEntrevue.TypeEntrevue, ListeDescription.listTypeEntrevue);

            Object   dateE    = MonEntrevue.DateEntrevue;
            DateTime dateEtmp = (DateTime)dateE;

            choixDateVue.SelectedDate = dateEtmp;

            resultatTypeVue.SelectedItem = ListeDescription.recupererDescription(MonEntrevue.Resultat, ListeDescription.listTypeResultat);

            commentaireVues.Text = MonEntrevue.Commentaire;

            ImgEtudiant.Source     = new BitmapImage(new Uri(MonEntreprise.ImageLogo, UriKind.RelativeOrAbsolute));
            NomEtudiantVue.Content = MonEntreprise.Nom;
        }
        public void ajouterCommunicationEntrepriseVue()
        {
            int i = 1;

            foreach (Communication com in communicationsEntreprises)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données
                // créer le bouton
                //recuperer info necessaire (requete)
                Entreprise  entreprise = ManagerEntreprise.recupererProfilesEntreprises(com.IdTo);
                Utilisateur user       = ManagerUtilisateur.recupererUtilisateurParId(com.IdUtilisateur);

                Button btn = new Button();
                if (i % 2 == 0)
                {
                    btn.Style = style;
                }
                else
                {
                    btn.Style = style2;
                }
                btn.DataContext = com;
                btn.Click      += afficherDetailsCommunicationEntreprise;

                //layout du bouton
                StackPanel hPanel = new StackPanel();
                hPanel.Orientation = Orientation.Horizontal;
                //hPanel.Width = 148;
                hPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                hPanel.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                //nom prenom etudiant
                ajouterLabel(hPanel, entreprise.Nom, 13, 110);

                //nom admin
                ajouterLabel(hPanel, user.Nom, 13, 95);

                //date Communication
                ajouterLabel(hPanel, com.DateCommunication.ToShortDateString(), 13, 95);

                //Type de stage
                ajouterLabel(hPanel, ListeDescription.recupererDescription(com.TypeCommunication, ListeDescription.listTypeCommunication), 13, 95);

                //Type de status
                ajouterLabel(hPanel, ListeDescription.recupererDescription(com.StatusCommunication, ListeDescription.listStatusCommunication), 13, 95);

                //ajouter l image pour supprimer
                if (User.IdTypeUtilisateur == 1 || User.IdTypeUtilisateur == 2)
                {
                    Image imgSuppr = new Image();
                    imgSuppr.DataContext = com.Id;
                    imgSuppr.Width       = 25;
                    imgSuppr.Height      = 25;
                    imgSuppr.Stretch     = Stretch.Fill;
                    imgSuppr.Source      = new BitmapImage(new Uri(@"images\iconX.png", UriKind.RelativeOrAbsolute));
                    imgSuppr.MouseDown  += supprimerCommunicationEntreprise;
                    hPanel.Children.Add(imgSuppr);
                }
                //ajouter le bouton au stackPanel principal
                btn.Content = hPanel;
                ListeCommunicationEntreprise.Children.Add(btn);

                i++;
            }
        }
Example #5
0
        //ajouter entrevue
        public void ajouterEntrevueVue()
        {
            int i = 1;

            foreach (Entrevue entre in MonEtudiant.Entrevues)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données
                // créer le bouton
                Entreprise entreprise = ManagerEntreprise.recupererProfilesEntreprises(entre.IdEntreprise);

                Button btn = new Button();
                if (i % 2 == 0)
                {
                    btn.Style = style;
                }
                else
                {
                    btn.Style = style2;
                }
                btn.DataContext = entre.Id;
                btn.Click      += afficherEntrevue;

                //layout du bouton
                StackPanel hPanel = new StackPanel();
                hPanel.Orientation         = Orientation.Horizontal;
                hPanel.Width               = 300;
                hPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                hPanel.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                //nom
                ajouterLabel(hPanel, entreprise.Nom, 12, 50);
                //date
                ajouterLabel(hPanel, entre.DateEntrevue.ToShortDateString(), 10, 70);
                //Type
                ajouterTextBlock(hPanel, ListeDescription.recupererDescription(entre.TypeEntrevue, ListeDescription.listTypeEntrevue), 10, 60);

                //resultat
                ajouterLabel(hPanel, ListeDescription.recupererDescription(entre.Resultat, ListeDescription.listTypeResultat), 12, 60);


                //ajouter l image pour supprimer
                Image imgSuppr = new Image();
                imgSuppr.Width       = 25;
                imgSuppr.Height      = 25;
                imgSuppr.Stretch     = Stretch.Fill;
                imgSuppr.Source      = new BitmapImage(new Uri(@"images\iconX.png", UriKind.RelativeOrAbsolute));
                imgSuppr.MouseDown  += supprimerEntrevue;
                imgSuppr.DataContext = entre.Id;


                hPanel.Children.Add(imgSuppr);

                //ajouter le bouton au stackPanel principal

                btn.Content = hPanel;
                ListeEntrevueVue.Children.Add(btn);


                i++;
            }
        }
Example #6
0
        //ajouter le les stages
        public void ajouterStageVue()
        {
            int i = 1;

            foreach (Stage stage in MonEtudiant.Stages)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données

                Entreprise stageEntreprise = ManagerEntreprise.recupererProfilesEntreprises(stage.IdEntreprise);

                // créer le bouton
                Button btn = new Button();
                if (i % 2 == 0)
                {
                    btn.Style = style;
                }
                else
                {
                    btn.Style = style2;
                }
                btn.DataContext = stage.Id;
                btn.Click      += afficherStage;

                //layout du bouton
                StackPanel hPanel = new StackPanel();
                hPanel.Orientation         = Orientation.Horizontal;
                hPanel.Width               = 531;
                hPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                hPanel.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                //etudiant
                ajouterLabel(hPanel, stageEntreprise.Nom, 15, 120);

                ////date debut
                Object   dateD     = stage.DateDebut;
                DateTime dateDTmps = (DateTime)dateD;
                ajouterLabel(hPanel, dateDTmps.ToShortDateString(), 15, 120);



                ////date Fin
                Object   dateF     = stage.DateFin;
                DateTime dateFTmps = (DateTime)dateF;
                ajouterLabel(hPanel, dateFTmps.ToShortDateString(), 15, 120);

                //retenu
                CheckBox retenu = new CheckBox();
                retenu.Width     = 120;
                retenu.IsEnabled = false;
                if (stage.Retenu == true)
                {
                    retenu.IsChecked = true;
                }
                hPanel.Children.Add(retenu);

                ////ajouter l image pour supprimer
                //Image imgSuppr = new Image();
                //imgSuppr.Width = 25;
                //imgSuppr.Height = 25;
                //imgSuppr.Stretch = Stretch.Fill;
                //imgSuppr.Source = new BitmapImage(new Uri(@"images\iconX.png", UriKind.RelativeOrAbsolute));
                //imgSuppr.MouseDown += supprimerStage;
                //imgSuppr.DataContext = stage.Id;
                //hPanel.Children.Add(imgSuppr);

                //ajouter le bouton au stackPanel principal

                btn.Content = hPanel;
                ListeStagetVue.Children.Add(btn);
                i++;
            }
        }
Example #7
0
        public void ajouterStageVue()
        {
            int i = 0;

            foreach (Stage stage in lesStages)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données
                Etudiant   etudiant   = ManagerEtudiant.recupererProfilesEtudiant(stage.IdEtudiant);
                Entreprise entreprise = ManagerEntreprise.recupererProfilesEntreprises(stage.IdEntreprise);

                // créer le bouton
                Button btn = new Button();
                if (i % 2 == 0)
                {
                    btn.Style = style;
                }
                else
                {
                    btn.Style = style2;
                }
                btn.DataContext = stage;
                btn.Click      += afficherDetailsStage;

                //layout du bouton
                StackPanel hPanel = new StackPanel();
                hPanel.Orientation = Orientation.Horizontal;
                //hPanel.Width = 148;
                hPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                hPanel.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                //nom prenom etudiant
                ajouterTextBlock(hPanel, etudiant.Prenom + " " + etudiant.Nom, 13, 130);

                //nom entreprise
                ajouterLabel(hPanel, entreprise.Nom, 13, 90);

                //Date debut

                if (stage.DateDebut != null)
                {
                    Object   DateTemp  = stage.DateDebut;
                    DateTime DateDebut = (DateTime)DateTemp;

                    ajouterLabel(hPanel, DateDebut.ToShortDateString(), 13, 100);
                }
                else
                {
                    ajouterLabel(hPanel, "", 13, 100);
                }
                //Type de stage
                ajouterTextBlock(hPanel, ListeDescription.recupererDescription(stage.TypeStage, ListeDescription.listTypeStage), 13, 130);

                // retenu ou pas
                CheckBox retenu = new CheckBox();
                retenu.Width     = 90;
                retenu.IsEnabled = false;
                if (stage.Retenu == true)
                {
                    retenu.IsChecked = true;
                }
                hPanel.Children.Add(retenu);

                if (User.IdTypeUtilisateur == 1 || User.IdTypeUtilisateur == 2)
                {
                    //ajouter l image pour supprimer
                    Image imgSuppr = new Image();
                    imgSuppr.DataContext = stage.Id;
                    imgSuppr.Width       = 25;
                    imgSuppr.Height      = 25;
                    imgSuppr.Stretch     = Stretch.Fill;
                    imgSuppr.Source      = new BitmapImage(new Uri(@"images\iconX.png", UriKind.RelativeOrAbsolute));
                    imgSuppr.MouseDown  += supprimerStage;
                    hPanel.Children.Add(imgSuppr);
                }

                //ajouter le bouton au stackPanel principal
                btn.Content = hPanel;

                ListeStagesVue.Children.Add(btn);


                i++;
            }
        }