示例#1
0
        public static void AdminDoctorsList()
        {
            doctorManager = true;
            while (doctorManager)
            {
                Console.Clear();
                MenuManager.DisplayLogoAndMenu("adminDoctorsMenu");

                Console.WriteLine("  Lista lekarzy:");
                Mock._doctors.Sort((x, y) => x.Id.CompareTo(y.Id));

                if (Mock._doctors.Count > 0)
                {
                    int i = 1;
                    foreach (Doctor doctor in Mock._doctors)
                    {
                        Console.WriteLine("\n    " + i + ") " + doctor.Name + ", " + doctor.Specialisation + ", " + doctor.Price + " zł/wizyta");
                        Console.WriteLine("       " + doctor.Description);
                        Console.WriteLine("       WIZYTY: " + doctor.VisitsTaken + "/" + doctor.VisitsAvailable);
                        i++;
                    }
                }
                else
                {
                    Console.WriteLine("  Brak lekarzy do wyświetlenia!");
                }

                Console.Write("\n  Odpowiedź: ");
                wpis = Console.ReadLine();

                switch (wpis)
                {
                case "1":
                    Doctor.AddDoctor();
                    break;

                case "2":
                    Doctor.DoctorChoser("edit");
                    break;

                case "3":
                    Doctor.DoctorChoser("delete");
                    break;

                case "back":
                    MenuManager.InfoAlert("  INFO: Wybrano powrót do poprzedniego ekranu.\n");
                    doctorManager = false;
                    break;

                default:
                    CommandNotFound(wpis);
                    break;
                }
            }
        }