Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 private void printAllInformationItem(List <Transport> workList)
 {
     if (workList.Count == 0)
     {
         Console.WriteLine("List is empty");
     }
     else
     {
         PrintWork.printAll(workList);
     }
 }
Beispiel #3
0
        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);
        }