-
Notifications
You must be signed in to change notification settings - Fork 0
/
BankMain.cs
178 lines (136 loc) · 4.33 KB
/
BankMain.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
using Bank_Bussiness_Layer;
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 bank
{
public partial class BankMain : Form
{
private clsUser _user;
private string _name;
public BankMain(clsUser user)
{
InitializeComponent();
this._user = user;
}
public BankMain(string username)
{
InitializeComponent();
this._name = username;
}
private void BankMain_Load(object sender, EventArgs e)
{
}
private void guna2CustomGradientPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void pictureBox3_Click(object sender, EventArgs e)
{
}
private void guna2Button2_MouseClick(object sender, MouseEventArgs e)
{
MainPanel.Show();
// loadform(new frmdashboard());
// guna2Button2.BackColor = Color.BlueViolet; //SystemColors.Control;
}
private void guna2Button4_Click(object sender, EventArgs e)
{
loadform (new frmATM());
}
private void guna2Button1_Click(object sender, EventArgs e)
{
loadform(new frmClients());
// guna2Button4.ForeColor = Color.Chocolate;
}
private void guna2Button2_Click(object sender, EventArgs e)
{
MainPanel.Show();
}
private void guna2Button7_Click(object sender, EventArgs e)
{
this.Close();
}
private void guna2CustomGradientPanel3_Paint(object sender, PaintEventArgs e)
{
}
private void guna2Panel1_Paint(object sender, PaintEventArgs e)
{
}
private void guna2Button8_Click(object sender, EventArgs e)
{
this.Close();
}
public void loadform(object Form)
{
if(this.MainPanel.Controls.Count>0)
{
this.MainPanel.Controls.RemoveAt(0);
Form f = Form as Form;
f.TopLevel = false;
f.Dock = DockStyle.Fill;
this.MainPanel.Controls.Add(f);
this.MainPanel.Tag= f;
f.Show();
}
}
private void guna2Button3_Click(object sender, EventArgs e)
{
loadform(new frmUsers ());
}
private void guna2Button6_Click(object sender, EventArgs e)
{
loadform (new frmTransactions(_user));
}
private void guna2Button5_Click(object sender, EventArgs e)
{
loadform(new frmOperations() ) ;
}
private void btnClients_MouseClick(object sender, MouseEventArgs e)
{
loadform(new frmClients());
}
private void btnUsers_MouseClick(object sender, MouseEventArgs e)
{
loadform(new frmUsers());
}
private void btnTransactions_MouseClick(object sender, MouseEventArgs e)
{
loadform(new frmTransactions(_user));
}
private void btnoperation_MouseClick(object sender, MouseEventArgs e)
{
loadform(new frmOperations());
}
private void btnAtm_MouseClick(object sender, MouseEventArgs e)
{
loadform(new frmATM());
}
private void pictureBox6_Click(object sender, EventArgs e)
{
}
private void MainPanel_Paint(object sender, PaintEventArgs e)
{
}
private void lbluser_Click(object sender, EventArgs e)
{
}
private void guna2Panel1_Paint_1(object sender, PaintEventArgs e)
{
lbluser.Text = "Hi "+ _user.User_Name.ToString();
clsGlobal.CurrentUser= _user;
}
private void guna2Button1_MouseClick(object sender, MouseEventArgs e)
{
MainPanel.Show();
}
}
}