-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrmTransactionComplete.cs
More file actions
72 lines (66 loc) · 2.38 KB
/
Copy pathfrmTransactionComplete.cs
File metadata and controls
72 lines (66 loc) · 2.38 KB
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
/* Gavin Rodgers
* 3309 ATM Project
* this is the code behind the form that handles form 4 and displays user balances and closes atm
* Last edited: 10/15/18
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ATM
{
public partial class frmTransactionComplete : Form
{
//initializes the form
public frmTransactionComplete()
{
InitializeComponent();
}
//copies record, closes files, and closes ATM program for no button
private void button4_Click(object sender, EventArgs e)
{
GlobalDataClass.ATMBank.CopyRemainingRecords();
GlobalDataClass.ATMBank.closeFiles();
this.Close();
}
//displays the user balances, and offers another transaction
private void btnYesBalances_Click(object sender, EventArgs e)
{
btnYesBalances.Enabled = false;
lblBalances.Visible = true;
lblChecking.Visible = true;
lblSavings.Visible = true;
txtChecking.Visible = true;
txtSavings.Visible = true;
btnNoBalances.Enabled = false;
btnNo.Visible = true;
btnYes.Visible = true;
txtChecking.Text = GlobalDataClass.customer.checkingBalanceString();
txtSavings.Text = GlobalDataClass.customer.savingBalanceString();
lblAnotherTransaction.Visible = true;
}
//doesnt display user balances, and offers another transaction
private void btnNoBalances_Click(object sender, EventArgs e)
{
btnNoBalances.Enabled = false;
btnYesBalances.Enabled = false;
btnYes.Visible = true;
btnNo.Visible = true;
lblAnotherTransaction.Visible = true;
}
//loads another transaction. closes form complete, opens transaction entry form
private void btnYes_Click(object sender, EventArgs e)
{
this.Hide();
Form frmTransactionEntry = new frmTransactionEntry();
frmTransactionEntry.ShowDialog();
this.Visible = false;
this.Close();
}
}
}