Пример #1
0
        public DoctorOfficeInformation(string Id)
        {
            InitializeComponent();
            this.DataContext = this;


            if (Login.role != 3)
            {
                NewDoctor.Visibility             = Visibility.Hidden;
                ButtonSave.Visibility            = Visibility.Hidden;
                DoctorsComboBox.Visibility       = Visibility.Hidden;
                FromTXT.IsEnabled                = false;
                ToTXT.IsEnabled                  = false;
                NameOfCurrentDoctor.IsEnabled    = false;
                SurnameOfCurrentDoctor.IsEnabled = false;



                NumberOfFloorTxt.IsEnabled = false;
                NameOfClinicTxt.IsEnabled  = false;
            }

            Room r1 = _informationControler.GetRoomById(Id);

            if (r1 != null)
            {
                Room room = _informationControler.GetRoomById(Id);

                DoctorsRoom = DoctorRoomConverter.ConvertRoomToDoctorRoomView(_informationControler.GetRoomById(Id));
                doctor      = _informationControler.GetDoctorById(room.DoctordId);

                DoctorsRoom.NameOfDoctor    = doctor.Name;
                DoctorsRoom.SurnameOfDoctor = doctor.Surname;
                DoctorsRoom.JmbgOfDoctor    = doctor.Jmbg;
            }


            _idRoom = Id;



            AllNameAndSurnameAndJmbgFromDoctors = new ObservableCollection <string>();


            AllDoctors = new ObservableCollection <DoctorView>(DoctorConverter.ConvertDoctorToDoctorViewList(
                                                                   Backend.App.Instance().DoctorService.GetAllEntities().ToList()));



            foreach (DoctorView curentDoctor in AllDoctors)
            {
                if (!curentDoctor.IdOfDoctor.Equals(doctor.Id.ToString()))
                {
                    AllNameAndSurnameAndJmbgFromDoctors.Add(curentDoctor.NameOfDoctor + " " + curentDoctor.SurnameOfDoctor + " Doctor ID:" + curentDoctor.IdOfDoctor);
                }
            }
        }
Пример #2
0
        public Doctors(DateTime DatumS, DateTime DatumE, SpecializationView Spec)
        {
            InitializeComponent();
            this.DataContext = this;

            AllDoctors = new ObservableCollection <DoctorView>(DoctorConverter.ConvertDoctorToDoctorViewList(
                                                                   Backend.App.Instance().DoctorService.GetAllDoctorsBySpecialization(Spec.Id).ToList()));
            Doktori.SelectedIndex = 0;
            Dstart          = DatumS;
            Dend            = DatumE;
            Specijalizacija = Spec;
        }