public PhysicianView()
 {
     InitializeComponent();
     _physicianService          = new PhysicianService(new MVCHContext());
     _physicianListViewModel    = new PhysicianListViewModel(_physicianService);
     _specialtyService          = new SpecialtyService(new MVCHContext());
     _facilityService           = new FacilityService(new MVCHContext());
     _physicianSpecialtyService = new PhysicianSpecialtyService(new MVCHContext());
     _facilityPhysicianService  = new FacilityPhysicianService(new MVCHContext());
     DataContext = _physicianListViewModel;
 }
 public AddPhysicianView(PhysicianListViewModel physicianListViewModel,
                         PhysicianService physicianService,
                         PhysicianSpecialtyService physicianSpecialtyService,
                         SpecialtyService specialtyService,
                         FacilityService facilityService,
                         FacilityPhysicianService facilityPhysicianService)
 {
     InitializeComponent();
     _toAddPhysician = new AddPhysicianViewModel(physicianListViewModel,
                                                 physicianService,
                                                 facilityService,
                                                 specialtyService,
                                                 physicianSpecialtyService,
                                                 facilityPhysicianService);
     DataContext = _toAddPhysician;
 }
        public AddPhysicianViewModel(PhysicianListViewModel physicianListViewModel,
                                     PhysicianService physicianService,
                                     FacilityService facilityService,
                                     SpecialtyService specialtyService,
                                     PhysicianSpecialtyService physicianSpecialtyService,
                                     FacilityPhysicianService facilityPhysicianService)
        {
            _physicianListViewModel    = physicianListViewModel;
            _physicianService          = physicianService;
            _facilityService           = facilityService;
            _specialtyService          = specialtyService;
            _physicianSpecialtyService = physicianSpecialtyService;
            _facilityPhysicianService  = facilityPhysicianService;

            Specialties         = new ObservableCollection <Specialty>(_specialtyService.GetSpecialties());
            Facilities          = new ObservableCollection <Facility>(_facilityService.GetFacilities());
            SelectedSpecialties = new ObservableCollection <Specialty>();
            SelectedFacilities  = new ObservableCollection <Facility>();
        }
        public void AddPhysicianSpecialtyTest()
        {
            var serv = new PhysicianSpecialtyService(new MVCHContext());

            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000020",
                SpecialtyId  = "SPY-000001",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000019",
                SpecialtyId  = "SPY-000002",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000018",
                SpecialtyId  = "SPY-000003",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000017",
                SpecialtyId  = "SPY-000004",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000016",
                SpecialtyId  = "SPY-000005",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000015",
                SpecialtyId  = "SPY-000001",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000014",
                SpecialtyId  = "SPY-000002",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000013",
                SpecialtyId  = "SPY-000003",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000012",
                SpecialtyId  = "SPY-000004",
                DateAcquired = DateTime.Now
            });
            serv.AddPhysicianSpecialty(new PhysicianSpecialty
            {
                PhysicianId  = "PER-000011",
                SpecialtyId  = "SPY-000005",
                DateAcquired = DateTime.Now
            });
        }