-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEmployeeForm.cs
40 lines (34 loc) · 1.24 KB
/
EmployeeForm.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
using System.Data;
namespace EmployeeManagementSystem
{
public partial class EmployeeForm : Form
{
User currentEmployee = Auth.currentUser;
public EmployeeForm()
{
InitializeComponent();
tasks.DataSource = Program.tasksList.GetAllTasks().Where(t => t.AssignedTo == currentEmployee.Name).ToList();
label1.Text = $"{Program.mainView.Greet()}, {currentEmployee.Name} You have {currentEmployee.CompletedTasks}/{currentEmployee.UncompletedTasks}";
}
private void update_Click(object sender, EventArgs e)
{
tasks.DataSource = Program.tasksList.GetAllTasks().Where(t => t.AssignedTo == currentEmployee.Name).ToList();
}
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Login login = new();
login.Show();
}
private void vIewProfileToolStripMenuItem_Click(object sender, EventArgs e)
{
ViewEmpProfile view = new();
view.Show();
}
private void updateProfileToolStripMenuItem_Click(object sender, EventArgs e)
{
EditEmpProfile edit = new();
edit.Show();
}
}
}