public List<DemandeReservationBO> SelectOldByClient(String token, ClientBO pClient)
 {
     if (!Autorization.Validate(token, Autorization.Role.CLIENT)) {
         return null;
     }
     try {
         return DemandeReservationBL.SelectOldByClient(pClient);
     } catch (Exception ex) {
         throw;
     }
 }
        public static List<DemandeReservationBO> SelectOldByClient(ClientBO pClient)
        {
            List<DemandeReservationBO> lstDemandeReservation;

            try {
                using (var demandeReservationDal = new DemandeReservationDAL(Util.GetConnection())) {
                    lstDemandeReservation = demandeReservationDal.DemandeReservationDAL_SelectOldByClientId(pClient.ClientId).ToList();
                    foreach (var objDemandeReservation in lstDemandeReservation) {
                        objDemandeReservation.RefLivre = RefLivreBL.SelectById(objDemandeReservation.RefLivreId);
                        objDemandeReservation.Personne = PersonneBL.SelectById(objDemandeReservation.ClientId);
                    }
                }
            } catch (Exception ex) {
                throw;
            }

            return lstDemandeReservation;
        }
        private void GetPersonne(ClientBO pClient)
        {
            var personneIFac = new PersonneIFACClient();

            AsyncGuiSelectPersonneById asyncExecute = personneIFac.SelectById;
            try {
                asyncExecute.BeginInvoke(CGlobalCache.SessionManager.Token, pClient.ClientId, xx => {
                    var samplePersDelegate = (AsyncGuiSelectPersonneById)((AsyncResult)xx).AsyncDelegate;
                    var objPersonne = samplePersDelegate.EndInvoke(xx);
                    if (objPersonne != null) {
                        txtClientName.Text = objPersonne.ToString();
                        cbAdministrateur.Checked = (objPersonne.Administrateur != null);
                    }
                    personneIFac.Close();
                }, null);
            } catch(Exception) {
                personneIFac.Close();
                MessageBox.Show(Resources.ReservationManagement_GetPersonne_Erreur_lors_de_la_recuperation_des_informations_sur_le_livre_demande_);
            }
        }