Esempio n. 1
0
        public void PresentFullInfoMenu()//7
        {
            Console.WriteLine("To present full info of vehicle:");
            Console.WriteLine("Enter license plate:");
            string License_plate = GarageManage.CheckVehicleInGarage(GetFromUserLicensePlate());

            if (License_plate != null)
            {
                //get all info functions
                var vehicle = GarageManage.TargetVehicleInfo(License_plate);
                InformationSorter(vehicle);
            }
            else
            {
                Console.WriteLine("There is no such car.");
                BackToMain();
            }
        }
Esempio n. 2
0
        ///Functions that present menu of each option in menu.

        public void NewVehicleMenu()  //1
        {
            Console.WriteLine("To enter new car to garage:");
            Console.WriteLine("Enter license plate to check:");
            string License_plate = GetFromUserLicensePlate();

            if (GarageManage.CheckVehicleInGarage(License_plate) == null)
            {
                Console.WriteLine("You can enter the car to the garage!");
                Console.WriteLine("Enter Details:");
                GarageManage.AddVehicleToGarage(GetVehicleDetails(License_plate));
                Console.WriteLine("Success, Vehicle added to Garage!");
            }

            else
            {
                Console.WriteLine("there is already vehicle with that license number");
            }
        }
Esempio n. 3
0
        public void StateOfCarMenu()  //3
        {
            Console.WriteLine("To change state of car:");
            Console.WriteLine("Enter License plate:");
            string License_plate = GarageManage.CheckVehicleInGarage(GetFromUserLicensePlate());
            int    status_selected;

            if (License_plate != null)
            {
                Console.WriteLine("Vehicle Found!");
                Console.WriteLine("To what status you want to change it ?");
                Console.WriteLine("Under Maintance[1]");
                Console.WriteLine("Repaired[2]");
                Console.WriteLine("Paid[3]");
                status_selected = int.Parse(Console.ReadLine());
                GarageManage.ChangeVehicleStatus(License_plate, status_selected);
                Console.WriteLine("Success, Status changed!");
            }
            else
            {
                Console.WriteLine("There is no such plate number in list.");
            }
        }
Esempio n. 4
0
        public void InflateTiresMenu() //4
        {
            Console.WriteLine("To inflate tires:");
            Console.WriteLine("Enter License plate:");
            string License_plate = GarageManage.CheckVehicleInGarage(GetFromUserLicensePlate());

            if (License_plate != null)
            {
                Console.WriteLine("Success, Vehicle Found!");
                if (GarageManage.InflateTires(License_plate))
                {
                    Console.WriteLine("Success, Tires Inflated!");
                }
                else
                {
                    Console.WriteLine("Tires are Full already!");
                }
            }
            else
            {
                Console.WriteLine("There is no such car , please search again.");
                BackToMain();
            }
        }