public void ExportDeathsPDF() { if (Deaths != null && Deaths.Count() != 0) { DocumentManager.ExportDataPDF(DeathInfo.ConvertToList(Deaths), "Export zvířata"); } else { MessageBox.Show("Žádná data pro export."); } }
public void OnGet() { Deaths = diagnosisService.Deaths(); Recovered = diagnosisService.Recovered(); Diagnoses = diagnosisService.GetDiagnosesWithCorona(); var newDiagnosis = Diagnoses .Where(x => (x.Death == true && x.Recovered == true) || (x.Death == true && x.Recovered == false) || (x.Death == false && x.Recovered == true)) .GroupBy(d => d.Recovered); foreach (var item in newDiagnosis) { RecoveryRate.Add(new StatisticsCore { Recovered = item.Key == true ? "Recovered " + String.Format("{0:0.00}", ((double)item.Count() / (Deaths.Count() + Recovered.Count())) * 100) + "%" : "Deaths " + String.Format("{0:0.00}", ((double)item.Count() / (Deaths.Count() + Recovered.Count())) * 100) + "%", TotalPatients = item.GroupBy(x => x.Patient.Name).Count() }); } }