Пример #1
0
        private void UpdatePatientList()
        {
            var response = ApiClient.GetRequest <ResponseModel>("/api/Patient/GetPatients/");

            var doctorsList = ResponseModelHelper.GetResultAsList <PatientViewModel>(response);
            var doctorsObservableCollection = new ObservableCollection <PatientViewModel>(doctorsList);

            ListViewPatients.ItemsSource = doctorsObservableCollection;
        }
Пример #2
0
        public void UpdateDoctorsList()
        {
            var response = ApiClient.GetRequest <ResponseModel>("/api/Doctor/GetDoctors/");

            var doctorsList = ResponseModelHelper.GetResultAsList <DoctorViewModel>(response)
                              .Where(doctor => doctor.IsActive).ToList();
            var doctorsObservableCollection = new ObservableCollection <DoctorViewModel>(doctorsList);

            ListViewDoctors.ItemsSource = doctorsObservableCollection;
        }
Пример #3
0
        public ControlPatientInfos(IHostWindow hostWindow, PatientViewModel model)
        {
            InitializeComponent();

            _hostWindow = hostWindow;
            _model      = model;

            UpdatePatientInfos();

            var response = ApiClient.GetRequest <ResponseModel>("/api/Patient/GetAllInvoices/" + _model.Id);
            var invoices = ResponseModelHelper.GetResultAsList <PatientInvoicesViewModel>(response);

            ListViewPatients.ItemsSource = new ObservableCollection <PatientInvoicesViewModel>(invoices);

            SetButtonBlockContent();
        }