private void printAllInformationItem(List <Transport> worklist) { if (worklist.Count == 0) { Console.WriteLine("List is empty. Maybe you haven't load database. You can do it with Menu"); } else { PrintWork.printAll(worklist); } }
private void printAllInformationItem(List <Transport> workList) { if (workList.Count == 0) { Console.WriteLine("List is empty"); } else { PrintWork.printAll(workList); } }
public void use() { SalesWork sw = new SalesWork(); FileWork fw = new FileWork(); List <Transport> worklist = new List <Transport>(); bool flag = true; bool readFromFileFlag = false; string choise; Console.WriteLine("Welcome to our system!!!"); do { printMenu(); choise = Console.ReadLine(); switch (choise) { case "1": { readFromFileItem(ref readFromFileFlag, worklist, fw); break; } case "2": { printAllInformationItem(worklist); break; } case "3.1": { SortWork.sortByModel(worklist); PrintWork.printAll(worklist); break; } case "6": { worklist.Add(addNewItem()); break; } } } while (flag); }