/// <summary>
        /// Returns the localization of the covid status
        /// </summary>
        /// <param name="stateWithCovid">The Covid Status</param>
        /// <returns>a localized string</returns>
        private string SetCovidStatusName(CovidState stateWithCovid)
        {
            string prefix = locService.GetString("Covid_Status");

            string locStateWithCovid = locService.GetString($"{prefix}" + stateWithCovid);

            return(locStateWithCovid);
        }
        /// <summary>
        /// Shows all the patients of a certain covid state
        /// </summary>
        /// <param name="covidState">The patients with the Covid State you whish to see</param>
        public void ShowPeopleWithCovidState(CovidState covidState)
        {
            List <Patient> persons = personWithCovidRepository.GetPeopleWithCovidState(covidState);

            if (persons.Count == 0)
            {
                screenService.NoPatientsToShow();

                return;
            }

            screenService.ShowPatients(persons);
        }
示例#3
0
 /// <summary>
 /// Returns a list of people with covid depending on the state of the patient
 /// </summary>
 /// <param name="state">The state (CovidState) you want to search</param>
 /// <returns>a list of persons in that state</returns>
 public List <Patient> GetPeopleWithCovidState(CovidState state)
 {
     return(persons
            .Where(x => x.StateWithCovid == state)
            .ToList());
 }