Пример #1
0
 public VehicleInspection()
 {
     CarProfile.GetVehicleDetails();
     Console.WriteLine("Please enter mileage                  : ");
     CarProfile.Mileage = Console.ReadLine().Trim();
     Console.WriteLine("Please enter exterior bodywork report : ");
     CarProfile.ExteriorBodyworkRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter vehicle interior report  : ");
     CarProfile.VehicleInteriorRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter engine bay report        : ");
     CarProfile.EngineBayRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter front brake report       : ");
     CarProfile.FrontBrakesRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter front suspension report  : ");
     CarProfile.FrontSuspensionRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter steering system report   : ");
     CarProfile.SteeringRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter rear brake report        : ");
     CarProfile.RearBrakesRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter rear suspension report   : ");
     CarProfile.RearSuspensionRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter under body report        : ");
     CarProfile.UnderBodyRpt = Console.ReadLine().Trim();
     Console.WriteLine("");
     Console.WriteLine("Enter report on \"work required\"         : ");
     CarProfile.WorkRequiredRpt = Console.ReadLine().Trim();
     Console.WriteLine("Please enter any additional notes     : ");
     CarProfile.AdditionalNotes = Console.ReadLine().Trim();
     Console.WriteLine("");
     Console.WriteLine("Press any key to continue : ");
     Console.ReadLine();
 }
Пример #2
0
        public static void RunUserProfile()
        {
            int l = 0;

            while (l < 1)
            {
                Console.Clear();
                TitleScreen titleScreen = new TitleScreen();
                Console.WriteLine("Enter 1 to carry out an inspection, 2 to login to a vehicle profile, 3 to logout or type \"quit\" to exit");
                string inProgramEntry = Console.ReadLine();
                if (string.Equals(inProgramEntry.ToLower(), "quit"))
                {
                    System.Environment.Exit(1);
                }
                else if (string.Equals(inProgramEntry, ""))
                {
                    Console.WriteLine(errorMessage);
                }
                try
                {
                    int InProgramEntry = int.Parse(inProgramEntry);
                    if (InProgramEntry == 1)
                    {
                        Console.WriteLine("Enter Job number : ");
                        string entry = Console.ReadLine();
                        try
                        {
                            int Entry = int.Parse(entry);
                            if (NewVehicle.JobNumber == Entry)
                            {
                                VehicleInspection vehicleInspection = new VehicleInspection();
                            }
                        }
                        catch (Exception)
                        {
                            Console.WriteLine(errorMessage + " Exception handled!");
                        }
                    }
                    else if (InProgramEntry == 2)
                    {
                        CarProfile.GetVehicleInspectionDetails();
                    }
                    else if (InProgramEntry == 3)
                    {
                        break;
                    }
                    else
                    {
                        Console.WriteLine(errorMessage);
                    }
                }
                catch (Exception)
                {
                    Console.WriteLine(errorMessage + " Exception handled!");
                }
            }
        }