-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclsTransferLogScreen.h
73 lines (49 loc) · 2.43 KB
/
clsTransferLogScreen.h
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
#pragma once
#include <iostream>
#include "clsScreen.h"
#include <iomanip>
#include <fstream>
#include "clsBankClient.h"
class clsTransferLogScreen :protected clsScreen
{
private:
static void PrintTransferLogRecordLine(clsBankClient::stTrnsferLogRecord TransferLogRecord)
{
cout << setw(8) << left << "" << "| " << setw(23) << left << TransferLogRecord.DateTime;
cout << "| " << setw(8) << left << TransferLogRecord.SourceAccountNumber;
cout << "| " << setw(8) << left << TransferLogRecord.DestinationAccountNumber;
cout << "| " << setw(8) << left << TransferLogRecord.Amount;
cout << "| " << setw(10) << left << TransferLogRecord.srcBalanceAfter;
cout << "| " << setw(10) << left << TransferLogRecord.destBalanceAfter;
cout << "| " << setw(8) << left << TransferLogRecord.UserName;
}
public:
static void ShowTransferLogScreen()
{
vector <clsBankClient::stTrnsferLogRecord> vTransferLogRecord = clsBankClient::GetTransfersLogList();
string Title = "\tTransfer Log List Screen";
string SubTitle = "\t (" + to_string(vTransferLogRecord.size()) + ") Record(s).";
_DrawScreenHeader(Title, SubTitle);
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_________________________________________\n" << endl;
cout << setw(8) << left << "" << "| " << left << setw(23) << "Date/Time";
cout << "| " << left << setw(8) << "s.Acct";
cout << "| " << left << setw(8) << "d.Acct";
cout << "| " << left << setw(8) << "Amount";
cout << "| " << left << setw(10) << "s.Balance";
cout << "| " << left << setw(10) << "d.Balance";
cout << "| " << left << setw(8) << "User";
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_________________________________________\n" << endl;
if (vTransferLogRecord.size() == 0)
cout << "\t\t\t\tNo Transfers Available In the System!";
else
for (clsBankClient::stTrnsferLogRecord Record : vTransferLogRecord)
{
PrintTransferLogRecordLine(Record);
cout << endl;
}
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_________________________________________\n" << endl;
}
};