Esempio n. 1
0
 public static EmployeeStatusDB GetInstance()
 {
     if (instance == null)
     {
         instance = new EmployeeStatusDB();
     }
     return(instance);
 }
Esempio n. 2
0
 public static EmployeeStatusDB GetInstance()
 {
     if (instance == null)
     {
         instance = new EmployeeStatusDB();
     }
     return instance;
 }
Esempio n. 3
0
 private EmployeeDB()
 {
     employees = new List <Employee>();
     employees.Add(new Employee()
     {
         Id        = ID++,
         Name      = "Ole Olsen",
         Birthdate = DateTime.Now.AddYears(-35),
         Salary    = 35000d,
         HireDate  = DateTime.Now.AddYears(-2).AddMonths(-4).AddDays(-20),
         Type      = EmployeeTypeDB.GetInstance().FindEmployeeType(1),
         Status    = EmployeeStatusDB.GetInstance().FindEmployeeStatus(2)
     });
     employees.Add(new Employee()
     {
         Id        = ID++,
         Name      = "Peter Povlsen",
         Birthdate = DateTime.Now.AddYears(-28),
         Salary    = 45000d,
         HireDate  = DateTime.Now.AddYears(-4).AddMonths(-7),
         Type      = EmployeeTypeDB.GetInstance().FindEmployeeType(2),
         Status    = EmployeeStatusDB.GetInstance().FindEmployeeStatus(1),
     });
 }