-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml.cs
105 lines (81 loc) · 2.65 KB
/
MainWindow.xaml.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TravelApp.DOMAIN;
using TravelApp.SERVICE;
using TravelApp.BUSINESS;
namespace TravelApp
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
AccountMgr am = new AccountMgr();
Account a = am.GenerateAccount();
MessageBox.Show(a.Print());
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
AccountMgr am = new AccountMgr();
IList<Transaction> tt = am.GenerateTList();
IList<string> ss = new List<string>();
int i = 0;
string str = "Transactions: @ ";
foreach (Transaction t in tt)
{
str = str + t.ToString() + " @ ";
str = str.Replace("@", System.Environment.NewLine);
ss.Add(str);
i++;
if (i == 10)
{
ss.Add(str);
MessageBox.Show(str);
i = 0;
str = null;
}
}
MessageBox.Show(str);
}
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
{
}
private void TextBox_TextChanged_1(object sender, TextChangedEventArgs e)
{
}
private void TextBox_TextChanged_2(object sender, TextChangedEventArgs e)
{
}
private void Button_Click_2(object sender, RoutedEventArgs e)
{
string amt_s = AmountBox.Text;
double amt = Convert.ToDouble(amt_s);
string currency = CurrencyBox.Text;
string date = DateBox.Text;
Deposit d = new DOMAIN.Deposit(amt, currency, date);
AccountMgr am = new AccountMgr();
Account a = am.GenerateAccount();
IList<Transaction> tt = am.GenerateTList();
DepositMgr dm = new DepositMgr();
dm.ProcessDeposit(d, a, tt);
}
}
}