-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsCurrenciesListScreen.h
59 lines (42 loc) · 1.88 KB
/
clsCurrenciesListScreen.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
#pragma once
#include <iostream>
#include "clsScreen.h"
#include "clsCurrency.h"
#include <iomanip>
class clsCurrenciesListScreen :protected clsScreen
{
private:
static void PrintCurrencyRecordLine(clsCurrency Currency)
{
cout << setw(8) << left << "" << "| " << setw(30) << left << Currency.Country();
cout << "| " << setw(8) << left << Currency.CurrencyCode();
cout << "| " << setw(45) << left << Currency.CurrencyName();
cout << "| " << setw(10) << left << Currency.Rate();
}
public:
static void ShowCurrenciesListScreen()
{
vector <clsCurrency> vCurrencys = clsCurrency::GetCurrenciesList();
string Title = "\t Currencies List Screen";
string SubTitle = "\t (" + to_string(vCurrencys.size()) + ") Currency.";
_DrawMainScreenHeader(Title, SubTitle);
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_______________________________________________\n" << endl;
cout << setw(8) << left << "" << "| " << left << setw(30) << "Country";
cout << "| " << left << setw(8) << "Code";
cout << "| " << left << setw(45) << "Name";
cout << "| " << left << setw(10) << "Rate/(1$)";
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_______________________________________________\n" << endl;
if (vCurrencys.size() == 0)
cout << "\t\t\t\tNo Currencies Available In the System!";
else
for (clsCurrency Currency : vCurrencys)
{
PrintCurrencyRecordLine(Currency);
cout << endl;
}
cout << setw(8) << left << "" << "\n\t_______________________________________________________";
cout << "_______________________________________________\n" << endl;
}
};