public EditEmployeeWindow(Employee emp, HospitalManagementView view) { InitializeComponent(); HospView = view; Employee = emp; editEmployee = true; }
public Ward(int id, string name, Employee manager, List<Employee> employees, List<ProcedureType> procedures) { this.Procedures = procedures; this.Id = id; this.Name = name; this.Manager = manager; this.Employees = employees; }
public Unit(string name, Employee manager, string email, string phone, string web) { Name = name; Manager = manager; Email = email; Phone = phone; Web = web; Employees = new List<Employee>(); }
private static void PopulateEmployees(ApplicationManager appMgr) { var emps = appMgr.ApplicationDb.Employees.Select(m => m); appMgr.ApplicationDb.Employees.RemoveRange(emps); Employee pista = new Employee("pista", "1234"); pista.Name = "Istápoló István"; pista.Phone = "+3630111"; pista.Salary = 250000; pista.Role = Role.Doctor; pista.DateOfBirth = "1980.05.21"; Employee margit = new Employee("margit", "1234"); margit.Name = "Minta Margit"; margit.Phone = "+3630112"; margit.Salary = 150000; margit.Role = Role.Nurse; margit.DateOfBirth = "1972.09.13"; Employee laci = new Employee("laci", "1234"); laci.Name = "Laboráns László"; laci.Phone = "+3630113"; laci.Salary = 200000; laci.Role = Role.Laboratorian; laci.DateOfBirth = "1986.01.06"; Employee eszti = new Employee("eszti", "1234"); eszti.Name = "Eszes Eszter"; eszti.Phone = "+3630114"; eszti.Salary = 180000; eszti.Role = Role.Administrator; eszti.DateOfBirth = "1981.11.26"; Employee andris = new Employee("andris", "1234"); andris.Name = "Adatrögzítő András"; andris.Phone = "+3630115"; andris.Salary = 120000; andris.Role = Role.DataRecorder; andris.DateOfBirth = "1972.10.08"; List<Employee> empList = new List<Employee>(); for (int i = 0; i < 80; i++) { empList.Add(new Employee("Teszt" + i, "1234", 100000 + i, Role.Doctor, "teszt" + i, "teszt" + i, "teszt" + i, "teszt" + i)); } appMgr.ApplicationDb.Employees.Add(pista); appMgr.ApplicationDb.Employees.Add(margit); appMgr.ApplicationDb.Employees.Add(laci); appMgr.ApplicationDb.Employees.Add(eszti); appMgr.ApplicationDb.Employees.Add(andris); appMgr.ApplicationDb.Employees.AddRange(empList); //ha itt megakad, bump-olni kell a verziószámot, vagy kikapcsolni a populate-et! appMgr.ApplicationDb.SaveChanges(); }
public Department(string name, Employee manager, string email, string phone, string web) : base(name, manager, email, phone, web) { Wards = new List<Ward>(); }
public void InitializeDataBase() { // Ez a db server beállítása, a file conn stringet benthagyom arra az esetre, ha később kellene... string connStr = @"Data Source=193.224.69.39,1433;Initial Catalog=HubaskyDataBase06;User ID=sa;Password=szoftech;Pooling=False"; ApplicationDb = new HubaskyDataBase(connStr); // Ha még nem létezik az adatbázis, akkor default inicializáció: if (ApplicationDb.Hospital.FirstOrDefault() == null) { // Default kórház Hospital hosp = new Hospital(); hosp.Name = "Hubasky Magánkórház"; hosp.Address = "1234 Budapest, Gyógyító tér 1."; hosp.Phone = "+36556667788"; hosp.Email = "*****@*****.**"; hosp.Web = "hubasky.hu"; ApplicationDb.Hospital.Add(hosp); // Default admin user Employee admin = new Employee("admin", ApplicationManager.CalculateSHA256("1234"), 100000.0, Role.Administrator, "Adminisztrátor", "-", "-", "-"); hosp.Employees.Add(admin); ApplicationDb.SaveChanges(); } }
public Ward(string name, Employee manager, string email, string phone, string web) : base(name, manager, email, phone, web) { Procedures = new List<ProcedureType>(); }
public object Clone() { Employee clone = new Employee(this.Username, this.Password); clone.Name = this.Name; clone.Phone = this.Phone; clone.Salary = this.Salary; clone.Role = this.Role; clone.Address = this.Address; clone.DateOfBirth = this.DateOfBirth; //clone.Ward = this.Ward; return clone; }
private void Window_Loaded(object sender, RoutedEventArgs e) { DataContext = this; if (!editEmployee) { Employee = new Employee(); } else { TextBox_Username.IsEnabled = false; Label_Username.IsEnabled = false; } List<Unit> list = HospView.HospManager.GetUnits(); Units = new ObservableCollection<Unit>(); foreach (Unit unit in list) { Units.Add(unit); } if (HospView.SelectedUnit != null) SelectedUnit = HospView.SelectedUnit.Reference; if (SelectedUnit != null && SelectedUnit.Manager != null && SelectedUnit.Manager.Username.Equals(Employee.Username)) IsManager = true; }