private void NavBarre_Navigation(object sender, ControlsLibrary.NavBarEventArgs e) { switch (e.NavAction) { case ControlsLibrary.NavBar.NavActionEnum.premier: IndiceCourant = 0; break; case ControlsLibrary.NavBar.NavActionEnum.precedent: IndiceCourant--; break; case ControlsLibrary.NavBar.NavActionEnum.suivant: IndiceCourant++; break; case ControlsLibrary.NavBar.NavActionEnum.dernier: IndiceCourant = MgtClient.GetInstance().ClientsListe.Count() - 1; break; default: break; } pCodeClient = MgtClient.GetInstance().ClientsListe.ElementAt(_courant); dataGrid_clients.DataSource = _animal.AfficherTout().FindAll(x => x.CodeClient == pCodeClient.CodeClient.Value); }
/// <summary> /// Évenement de navigation de la NavBarre /// </summary> private void NavBarre_Navigation(object sender, ControlsLibrary.NavBarEventArgs e) { switch (e.NavAction) { case ControlsLibrary.NavBar.NavActionEnum.suivant: IndiceCourant += 1; break; case ControlsLibrary.NavBar.NavActionEnum.precedent: IndiceCourant -= 1; break; case ControlsLibrary.NavBar.NavActionEnum.premier: IndiceCourant = 0; break; case ControlsLibrary.NavBar.NavActionEnum.dernier: IndiceCourant = MgtClient.GetClients().Count - 1; break; } }