コード例 #1
0
        private void CommunicationMenu_Click(object sender, RoutedEventArgs e)
        {
            ListerCommunicationsVue communication = new ListerCommunicationsVue(User);

            communication.Show();
            this.Close();
        }
コード例 #2
0
        //communication
        private void afficherCommunication(object sender, RoutedEventArgs e)
        {
            ListerCommunicationsVue communicationVue = new ListerCommunicationsVue(User, (Communication)((Button)sender).DataContext, false);

            communicationVue.Show();
            this.Close();
        }
コード例 #3
0
        private void CommunicationMenu_Click(object sender, RoutedEventArgs e)
        {
            this.Visibility = System.Windows.Visibility.Hidden;
            ListerCommunicationsVue communication = new ListerCommunicationsVue(User);

            communication.Show();
            this.Close();
        }
コード例 #4
0
        //communication

        private void afficherCommunication(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(((Communication)((Button)sender).DataContext).Id.ToString());
            ListerCommunicationsVue communicationVue = new ListerCommunicationsVue(User, (Communication)((Button)sender).DataContext, true);

            communicationVue.Show();
            this.Close();
        }
コード例 #5
0
        private void BtnValiderAjouter_Click(object sender, RoutedEventArgs e)
        {
            bool ajouter = true;


            //  MessageBox.Show("Test "+ ChoixType.SelectedValue, "Ajout Communication", MessageBoxButton.OK, MessageBoxImage.Information);

            string ChoixStatusValeur = null;

            if (ChoixStatus.SelectedValue != null && !ChoixStatus.SelectedValue.ToString().Equals(""))
            {
                ChoixStatusValeur       = (string)ChoixStatus.SelectedValue;
                com.StatusCommunication = ListeDescription.recupererIdDescription(ChoixStatusValeur, ListeDescription.listStatusCommunication);
            }
            else
            {
                ajouter = false;
            }

            string ChoixTypeValeur = null;

            if (ChoixType.SelectedValue != null && !ChoixType.SelectedValue.ToString().Equals(""))
            {
                ChoixTypeValeur       = (string)ChoixType.SelectedValue;
                com.TypeCommunication = ListeDescription.recupererIdDescription(ChoixTypeValeur, ListeDescription.listTypeCommunication);
            }
            else
            {
                ajouter = false;
            }

            string ChoixCommentaireValeur = null;

            if (!ChoixCommentaire.Text.Equals(""))
            {
                ChoixCommentaireValeur = (string)ChoixCommentaire.Text;
                com.Commentaire        = ChoixCommentaireValeur;
            }

            bool?radioCheck = RadioBtnEtudiant.IsChecked;

            // MessageBox.Show("Test " + com.IdTo, "Ajout Communication", MessageBoxButton.OK, MessageBoxImage.Information);

            if (com.IdTo == -1)
            {
                ajouter = false;
            }

            com.IdUtilisateur     = User.Id;
            com.DateCommunication = DateTime.Now;


            if (ajouter)
            {
                if (radioCheck == true)
                {
                    ManagerCommunication.ajouterCommunicationEtudiantUtilisateur(com);
                }
                else
                {
                    ManagerCommunication.ajouterCommunicationEntrepriseUtilisateur(com);
                }

                MessageBox.Show("Communication Ajoutée.", "Ajout d'une communication", MessageBoxButton.OK, MessageBoxImage.Information);
                //redirectioner pour la page lister communications
                this.Visibility = System.Windows.Visibility.Hidden;
                ListerCommunicationsVue communication = new ListerCommunicationsVue(User);
                communication.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Veuillez saisir tous les champs pour ajouter.", "Ajout d'une communication", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }