public void UpdateMedicalRecord() { if (MedicalRecord.ValidValues() && MedicalCost.ValidValues()) { IsWorking = true; MedicalRecord.UpdateMedicalRecord(); MedicalCost.UpdateCost(); Filter(); MessageBox.Show("Upraveno."); } else { MessageBox.Show("Vyplňte prosím název,datum a částku."); } }
private async Task Selection() { if (SelectedMedicalRecord != null) { IsWorking = true; await Task.Delay(150); await Task.Run(() => { MedicalRecord.GetMedicalRecord(SelectedMedicalRecord.ID); MedicalCost.GetCost(MedicalRecord.CostID); }); IsWorking = false; } NotifyOfPropertyChange(() => RecordName); NotifyOfPropertyChange(() => Description); NotifyOfPropertyChange(() => Vet); NotifyOfPropertyChange(() => Date); NotifyOfPropertyChange(() => Price); NotifyOfPropertyChange(() => IsSelected); }