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; }
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; }
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(); }