//function to display all the store private void DisplayStores() { //if store list is empty, function will not preceed further if (!FranchiseHolderManager.Stores.Any()) { Console.WriteLine("No stores present.\n"); return; } Console.WriteLine("Stores\n"); //using the shared function from customutilities class to display the store list CustomUtilities.DisplayStores(FranchiseHolderManager.Stores); Console.Write("Enter the store to use: "); }
//function to display all stores private void DisplayStores() { //if store from inventory cannot be fetched/ empty, the operation will not be continued in order to prevent crash if (!FranchiseHolderManager.Stores.Any()) { Console.WriteLine("No stores present.\n"); return; } Console.WriteLine("Stores\n"); //using the shared function from customutilities class to display the store list CustomUtilities.DisplayStores(FranchiseHolderManager.Stores); Console.Write("Enter the store to use: "); }