-
Notifications
You must be signed in to change notification settings - Fork 1
/
Program.cs
60 lines (51 loc) · 2.54 KB
/
Program.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
namespace BankSystemApp.Classes
{
class Program
{
static void Main()
{
var report = new Report();
int userPassword;
int loginOption = ValueManipulator.GetInputByMessageToNumbers("--------------- Easy Transfer App ---------------" +
"\n1.Create account" +
"\n2.Exit" +
"\nChoice: ");
Console.Clear();
switch (loginOption)
{
case 1:
ValueManipulator.ShowMessage("--------------- Create Account ---------------");
string userName = ValueManipulator.GetInputByMessageToDate("Name: ");
userPassword = ValueManipulator.GetInputByMessageToNumbers("Password: ");
var createAccount = new CreateAccount(userName, userPassword);
createAccount.CreateNewUserAccount();
ValueManipulator.ShowMessage("--------------- Login ---------------");
int selection = ValueManipulator.GetInputByMessageToNumbers("1.Login\n2.Exit\nChoice:");
if (selection == 1)
{
var login = new Login(createAccount);
string name = ValueManipulator.GetInputByMessageToDate("User name:");
int password = ValueManipulator.GetInputByMessageToNumbers("Password:");
login.UserLogin(name, password);
}
else
ValueManipulator.ShowMessage($"---------------Goodbye {createAccount.Name}!--------------- ");
report.ReportProgress();
var menu = new Menu();
menu.ChoiceOptionsOfMenu(createAccount);
break;
case 2:
report.Exit();
break;
default:
while (!(loginOption == 1 || loginOption == 2))
{
Report.DefaultCase();
loginOption = ValueManipulator.GetInputByMessageToNumbers("--------------- Easy Transfer App ---------------" +
"\n1.Create account\n2.Exit\nChoice: ");
}
break;
}
}
}
}