-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReceptionUser.cs
112 lines (109 loc) · 3.35 KB
/
ReceptionUser.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using System;
namespace SelfTrainingProject.TechCompanion
{
public class ReceptionUser
{
public static string errorMessage = "Invalid input";
private static string firstName;
public static string FirstName
{
get { return firstName; }
set { firstName = value; }
}
private static string lastName;
public static string LastName
{
get { return lastName; }
set { lastName = value; }
}
private static string dateOfBirth;
public static string DateOfBirth
{
get { return dateOfBirth; }
set { dateOfBirth = value; }
}
private static string address;
public static string Address
{
get { return address; }
set { address = value; }
}
private static string phoneNumber;
public static string PhoneNumber
{
get { return phoneNumber; }
set { phoneNumber = value; }
}
private static string userName;
public static string UserName
{
get { return userName; }
set { userName = value; }
}
private static string password;
public static string Password
{
get { return password; }
set { password = value; }
}
private static string initialBalance;
public static string InitialBalance
{
get { return initialBalance; }
set { initialBalance = value; }
}
private static string eMailAddress;
public static string EMailAddress
{
get { return eMailAddress; }
set { eMailAddress = value; }
}
public ReceptionUser()
{
}
public static void RunReceptionUser()
{
int l = 0;
while (l < 1)
{
Console.Clear();
TitleScreen titleScreen = new TitleScreen();
Console.WriteLine("Enter 1 to add new vehicle, 2 to login to view Inpection, 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)
{
NewVehicle.addNewVehicle();
break;
}
else if (InProgramEntry == 2)
{
CarProfile.GetVehicleInspectionDetails();
}
else if (InProgramEntry == 3)
{
break;
}
else
{
Console.WriteLine(errorMessage);
}
}
catch (Exception)
{
Console.WriteLine(errorMessage + " Exception handled!");
}
}
}
}
}