-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dashboard.cs
123 lines (102 loc) · 2.85 KB
/
Dashboard.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
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 VPP
{
public partial class Dashboard : Form
{
public Dashboard()
{
InitializeComponent();
}
public Dashboard(string user)
{
InitializeComponent();
if (user == "Guest")
{
this.Show();
}
else if (user == "Admin")
{
this.Show();
}
}
private void Dashboard_Load(object sender, EventArgs e)
{
}
private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void btnClear_Click(object sender, EventArgs e)
{
uc_Add1.clearAll();
}
private void btnRefreshClear_Click(object sender, EventArgs e)
{
uc_Add1.clearAll();
uc_Add1.dbLoad();
}
private void btnRemove_Click(object sender, EventArgs e)
{
uc_Add1.Remove();
uc_Add1.clearAll();
}
private void btnAdd_Click(object sender, EventArgs e)
{
uc_Add1.Add();
}
private void btnSearch_Click(object sender, EventArgs e)
{
uc_Add1.Search();
}
private void btnUpdate_Click(object sender, EventArgs e)
{
uc_Add1.Updates();
}
public void Uc_AddShow()
{
uc_Add1.Visible = true;
uc_Add1.BringToFront();
}
private void btnGo_Click(object sender, EventArgs e)
{
Uc_AddShow();
}
ToolTip t1 = new ToolTip();
private void btnExit_MouseHover(object sender, EventArgs e)
{
t1.Show("Exit Application", btnExit);
}
private void btnAdd_MouseHover(object sender, EventArgs e)
{
t1.Show("Add to Database", btnAdd);
}
private void btnSearch_MouseHover(object sender, EventArgs e)
{
t1.Show("Find something on Database", btnSearch);
}
private void btnRefreshClear_MouseHover(object sender, EventArgs e)
{
t1.Show("Refresh Database Table", btnRefreshClear);
}
private void btnUpdate_MouseHover(object sender, EventArgs e)
{
t1.Show("Update to Database", btnUpdate);
}
private void btnRemove_MouseHover(object sender, EventArgs e)
{
t1.Show("Remove/Delete Data", btnRemove);
}
private void btnClear_MouseHover(object sender, EventArgs e)
{
t1.Show("Clear the input", btnClear);
}
}
}