public static void Deroulement(MySqlConnection maConnexion) { string enter = ""; while (enter != "q") { Console.WriteLine("Tapez 1 pour afficher la liste des produits."); Console.WriteLine("Tapez 2 pour afficher la liste des clients."); Console.WriteLine("Tapez 3 pour afficher la liste des commandes."); Console.WriteLine("Tapez 4 pour afficher la liste des détails."); Console.WriteLine("Tapez q pour quitter."); enter = Console.ReadLine(); Console.Clear(); switch (enter) { case "1": { List <Produit> maListeProduits = ProduitServices.GetProduits(maConnexion); AfficheList(maListeProduits); Wait(); break; } case "2": { List <Clients> maListeClients = ClientServices.GetClients(maConnexion); AfficheList(maListeClients); Wait(); break; } case "3": { List <Commande> maListeCommandes = CommandeServices.GetCommandes(maConnexion); AfficheList(maListeCommandes); Wait(); break; } case "4": { List <Detail> maListeDetails = DetailServices.GetDetails(maConnexion); AfficheList(maListeDetails); Wait(); break; } } } }
public void Init() { CS = new CommandeServices(); }