-
Notifications
You must be signed in to change notification settings - Fork 1
/
Hospital.cs
46 lines (39 loc) · 1.07 KB
/
Hospital.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
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalManagementSystem
{
[Serializable]
public class Hospital
{
private List<Employee> _employees;
public List<Employee> Employees
{
get { return _employees; }
set { _employees = value; }
}
public Hospital()
{
Employees = new List<Employee>()
{
new Administrator("Eric", "Muganga", "0234456750", "admin", "admin"),
new Doctor("Derek", "Gisa", "303094499", "derek", "derek", "12304", "Cardiologist")
};
}
public void Addemployee(Employee employee)
{
Employees.Add(employee);
}
public bool UserExists(string username)
{
foreach (Employee empl in Employees)
{
if (empl.Username == username) return true;
}
return false;
}
}
}