private void _ButtonBesoinsMettreAGauche(object sender, RoutedEventArgs e)
 {
     if (this._dataGridBesoinDroite.SelectedItem != null)
     {
         if (this._dataGridBesoinDroite.SelectedItems.Count == 1)
         {
             Reservation_SalleBesoin_Reservation_Salle tmp = new Reservation_SalleBesoin_Reservation_Salle();
             tmp = (Reservation_SalleBesoin_Reservation_Salle)this._dataGridBesoinDroite.SelectedItem;
             ((Reservation_Salle)this.DataContext).Reservation_SalleBesoin_Reservation_Salle.Remove(tmp);
         }
     }
 }
        /// <summary>
        /// duplique la commande passée en paramètre
        /// </summary>
        /// <param name="commande1">commande à dupliquer</param>
        private Reservation_Salle duplicateReservationSalle(Reservation_Salle itemToCopy)
        {
            Reservation_Salle tmp = new Reservation_Salle();

            tmp.Date_Reservation = itemToCopy.Date_Reservation;
            tmp.Date_Reservation_Fin = itemToCopy.Date_Reservation_Fin;
            tmp.Heure_Debut = itemToCopy.Heure_Debut;
            tmp.Heure_Fin = itemToCopy.Heure_Fin;
            tmp.Nb_Participants = itemToCopy.Nb_Participants;
            tmp.ObjetReunion = itemToCopy.ObjetReunion;
            tmp.Commentaire = itemToCopy.Commentaire;
            tmp.Entreprise_Mere1 = itemToCopy.Entreprise_Mere1;
            tmp.Salle1 = itemToCopy.Salle1;
            foreach (Reservation_SalleBesoin_Reservation_Salle item in itemToCopy.Reservation_SalleBesoin_Reservation_Salle)
            {
                Reservation_SalleBesoin_Reservation_Salle toAdd = new Reservation_SalleBesoin_Reservation_Salle();
                toAdd.Quantite = item.Quantite;
                toAdd.Besoin_Reservation_Salle1 = item.Besoin_Reservation_Salle1;
                tmp.Reservation_SalleBesoin_Reservation_Salle.Add(toAdd);

            }
            foreach (Reservation_SalleContact_Client_Invite item in itemToCopy.Reservation_SalleContact_Client_Invite)
            {
                Reservation_SalleContact_Client_Invite toAdd = new Reservation_SalleContact_Client_Invite();
                toAdd.Contact1 = item.Contact1;
                tmp.Reservation_SalleContact_Client_Invite.Add(toAdd);
            }
            foreach (Reservation_SalleContact_Fournisseur_Invite item in itemToCopy.Reservation_SalleContact_Fournisseur_Invite)
            {
                Reservation_SalleContact_Fournisseur_Invite toAdd = new Reservation_SalleContact_Fournisseur_Invite();
                toAdd.Contact1 = item.Contact1;
                tmp.Reservation_SalleContact_Fournisseur_Invite.Add(toAdd);
            }
            foreach (Reservation_SalleSalarie_Invite item in itemToCopy.Reservation_SalleSalarie_Invite)
            {
                Reservation_SalleSalarie_Invite toAdd = new Reservation_SalleSalarie_Invite();
                toAdd.Salarie1 = item.Salarie1;
                tmp.Reservation_SalleSalarie_Invite.Add(toAdd);
            }
            tmp.Salarie1 = ((App)App.Current)._connectedUser.Salarie_Interne1.Salarie;
            return tmp;
        }
        private void _ButtonBesoinsMettreADroite(object sender, RoutedEventArgs e)
        {
            bool verif = true;
            if (this._dataGridBesoinGauche.SelectedItem != null)
            {
                foreach (Besoin_Reservation_Salle item1 in this._dataGridBesoinGauche.SelectedItems)
                {
                    Reservation_SalleBesoin_Reservation_Salle tmp = new Reservation_SalleBesoin_Reservation_Salle();
                    tmp.Besoin_Reservation_Salle1 = (Besoin_Reservation_Salle)item1;

                    foreach (Reservation_SalleBesoin_Reservation_Salle item in ((Reservation_Salle)this.DataContext).Reservation_SalleBesoin_Reservation_Salle)
                    {
                        if (item.Besoin_Reservation_Salle1.Identifiant == tmp.Besoin_Reservation_Salle1.Identifiant)
                        {
                            verif = false;
                        }
                    }
                    if (verif == true)
                    {
                        tmp.Reservation_Salle1 = (Reservation_Salle)this.DataContext;
                        tmp.Quantite = 1;
                    }
                }
            }
        }