public ClientCard(Vehicle i_Vehicle, string i_OwnerName, string i_OwnerPhoneNumber)
 {
     m_VehicleInGarage  = i_Vehicle;
     m_OwnerName        = i_OwnerName;
     m_OwnerPhoneNumber = i_OwnerPhoneNumber;
     m_VehicleStatus    = Garage.eVehicleStat.InRepair;
 }
Пример #2
0
        public static void ShowGarageDataBase(Garage i_Garage)
        {
            string choosedOption = null;
            int    optionNum;
            bool   optionIsValid = false;

            while (optionIsValid == false)
            {
                Console.WriteLine("Choose one of the options below:");
                Console.WriteLine("1.Show all vehicles");
                Console.WriteLine("2.Show all vehicles that in repair");
                Console.WriteLine("3.Show all vehicles that repaired");
                Console.WriteLine("4.Show all vehicles that just paid for the service");
                choosedOption = Console.ReadLine();
                optionIsValid = IsOptionValid(choosedOption, 4);
                if (optionIsValid == false)
                {
                    Console.WriteLine("Incorrect input");
                }
            }

            optionNum = int.Parse(choosedOption);
            if (optionNum == 1)
            {
                PrintAllClientsLicenseNum(i_Garage);
            }
            else
            {
                Garage.eVehicleStat filter = Garage.GetStatusFromInt(optionNum - 2);
                PrintListOfStrings(i_Garage.GetClientsByStatus(filter));
            }
        }