-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
40 lines (38 loc) · 1.22 KB
/
Program.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 EFCoreAttMgtSystems.Entities;
using EFCoreAttMgtSystems.Features;
namespace EFCoreAttMgtSystems
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
ApplicationConfiguration.Initialize();
TimeSheet AppTimeSheet = new TimeSheet();
AppTimeSheet.DbContext.Database.EnsureCreated();
var emp = AppTimeSheet.DbContext.Employees.FirstOrDefault();
if (emp == null)
{
var aEmp = new Employee()
{
FullName = "Admin",
Position = "Admin",
CardNo = "001",
UserAccount = new UserAccount()
{
UserName = "Admin",
Password = "1234"
}
};
AppTimeSheet.DbContext.Employees.Add(aEmp);
AppTimeSheet.DbContext.SaveChanges();
}
Application.Run(new LoginForm(AppTimeSheet));
/* Application.Run(new MainForm(AppTimeSheet));
*/
}
}
}