public TechnicianView() { InitializeComponent(); _employeeService = new EmployeeService(new MVCHContext()); _technicianListViewModel = new TechnicianListViewModel(_employeeService); _specialtyService = new SpecialtyService(new MVCHContext()); _employeeSpecialtyService = new EmployeeSpecialtyService(new MVCHContext()); _wardService = new WardService(new MVCHContext()); _workUnitService = new WorkUnitService(new MVCHContext()); _wardEmployeeService = new WardEmployeeService(new MVCHContext()); _unitEmployeeService = new UnitEmployeeService(new MVCHContext()); _jobClassService = new JobClassService(new MVCHContext()); DataContext = _technicianListViewModel; }
public AddTechnicianView(TechnicianListViewModel technicianListViewModel, EmployeeService employeeService, WardService wardService, WorkUnitService workUnitService, SpecialtyService specialtyService, EmployeeSpecialtyService employeeSpecialtyService, WardEmployeeService wardEmployeeService, UnitEmployeeService unitEmployeeService) { _toAddTechnician = new AddTechnicianViewModel(technicianListViewModel, employeeService, wardService, workUnitService, specialtyService, employeeSpecialtyService, wardEmployeeService, unitEmployeeService); DataContext = _toAddTechnician; InitializeComponent(); }