Exemplo n.º 1
0
        public void ajouterEntrevueVue()
        {
            int i = 1;

            foreach (Entrevue entre in MonEntreprise.Entrevues)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données
                // créer le bouton
                Etudiant etudiant = ManagerEtudiant.recupererProfilesEtudiant(entre.IdEtudiant);

                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, etudiant.Nom, 12, 50);
                //date
                ajouterLabel(hPanel, entre.DateEntrevue.ToShortDateString(), 10, 70);
                //Type
                ajouterLabel(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++;
            }
        }
 private void afficherDetailsCommunicationEtudiantSelect(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;
     etudiant = ManagerEtudiant.recupererProfilesEtudiant(communication.IdTo);
     LblNomDeEtudiant.Content = etudiant.Nom;
     LblFormation.Text        = ListeDescription.recupererLaFormation(etudiant.IdFormation);
     ImageEllipse.Source      = new BitmapImage(new Uri(@"" + etudiant.PhotoURL, UriKind.RelativeOrAbsolute));
 }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
0
        public ProfileEntrevueEntrepriseVue(Utilisateur user, int idEntrevue)
        {
            InitializeComponent();
            User = user;

            MonEntrevue = ManagerEntrevue.recupererEntrevueParId(idEntrevue);
            MonEtudiant = ManagerEtudiant.recupererProfilesEtudiant(MonEntrevue.IdEtudiant);


            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.SelectedValue = ListeDescription.recupererDescription(MonEntrevue.Resultat, ListeDescription.listTypeResultat);

            commentaireVues.Text = MonEntrevue.Commentaire;

            ImgEtudiant.Source     = new BitmapImage(new Uri(MonEtudiant.PhotoURL, UriKind.RelativeOrAbsolute));
            NomEtudiantVue.Content = MonEtudiant.Nom + " " + MonEtudiant.Prenom;
        }
        // methode pour ajouter les listes dynamiques
        public void ajouterCommunicationEtudiantVue()
        {
            int i = 0;


            foreach (Communication com in communicationsEtudiants)
            {
                // !!!!!!!!!!!!!!!!!!!!!!!!!   a verifer les margins quand on aura les données
                // créer le bouton

                //recuperer info necessaire (requete)
                Etudiant    etudiant = ManagerEtudiant.recupererProfilesEtudiant(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      += afficherDetailsCommunicationEtudiant;

                //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, 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  += supprimerCommunicationEtudiant;
                    hPanel.Children.Add(imgSuppr);
                }
                //ajouter le bouton au stackPanel principal
                btn.Content = hPanel;
                ListeCommunicationEtudiantVue.Children.Add(btn);
                i++;
            }
        }
Exemplo n.º 6
0
        public void ajouterStageVue()
        {
            int i = 1;

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

                Etudiant stageEtudiant = ManagerEtudiant.recupererProfilesEtudiant(stage.IdEtudiant);

                // 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, stageEtudiant.Nom + " " + stageEtudiant.Prenom, 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.IsEnabled         = false;
                retenu.VerticalAlignment = System.Windows.VerticalAlignment.Center;
                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;
                //hPanel.Children.Add(imgSuppr);
                //imgSuppr.DataContext = stage.Id;

                //ajouter le bouton au stackPanel principal

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


                i++;
            }
        }
Exemplo n.º 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++;
            }
        }