-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
74 lines (73 loc) · 3.15 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Text;
using System.Collections.Generic;
namespace Assignment2
{
internal class Program
{
public static TaiKhoanDangNhap dSTaiKhoan = new TaiKhoanDangNhap();
public static TaiKhoanDangNhap taiKhoanDangNhap;
public static bool IsLogin;
static void Main(string[] args)
{
Console.InputEncoding = Encoding.UTF8;
Console.OutputEncoding = Encoding.UTF8;
dSTaiKhoan.danhSachTaiKhoan = Seeding.dSTaiKhoan;
while (true)
{
dangNhap: taiKhoanDangNhap = Logic.DangNhap(dSTaiKhoan);
if (IsLogin)
{
Console.Clear();
while (true)
{
Console.WriteLine("1. Hiển thị Thông tin Tài Khoản");
Console.WriteLine("2. Hiển Thị Thông Tin chủ tài khoản");
Console.WriteLine("3. Chuyển khoản đến số tài khoản khác");
Console.WriteLine("4. Hiển thị danh sách GiaoDich của tài khoản");
Console.WriteLine("5. Sao kê");
Console.WriteLine("6. Đăng xuất");
chonChucNang: Console.Write("Xin mời chọn chức năng: ");
int input = Convert.ToInt32(Console.ReadLine());
Console.Clear();
switch (input)
{
case 1:
Logic.HienThiThongTinTaiKhoan(taiKhoanDangNhap);
break;
case 2:
Logic.HienThiThongTinChuTaiKhoan(taiKhoanDangNhap);
break;
case 3:
Logic.ChuyenKhoan(dSTaiKhoan, taiKhoanDangNhap);
break;
case 4:
Logic.HienThiDanhSachGiaoDich(taiKhoanDangNhap);
break;
case 5:
Logic.SaoKe(taiKhoanDangNhap);
break;
case 6:
Console.WriteLine();
Console.WriteLine("Đăng xuất thành công.");
Console.WriteLine();
goto dangNhap;
default:
goto chonChucNang;
}
Console.WriteLine();
Console.WriteLine();
Console.Write("Nhấn phím bất kì để quay lại menu...");
Console.ReadKey();
Console.Clear();
}
}
else
{
Console.WriteLine("Thông tin tài khoản hoặc mật khẩu không chính xác, xin vui lòng nhập lại!");
goto dangNhap;
}
}
}
}
}