コード例 #1
0
 public static void PrintPatients()
 {
     foreach (Pation item in ServisePatient.GetPatients())
     {
         Console.WriteLine("{0} ({1}) \t {2}", item.FullName, item.Sex, item.IIN);
     }
 }
コード例 #2
0
        public static void AddPatient()
        {
            Pation newPatient = new Pation();

            Console.Write("введите ФИО: ");
            newPatient.FullName = Console.ReadLine();
            Console.Write("введите пол: ");
            newPatient.Sex = (Gender)Int32.Parse(Console.ReadLine());
            Console.Write("введите дату рождения: ");
            newPatient.DoB = DateTime.Parse(Console.ReadLine());
            Console.Write("введите ИИН: ");
            newPatient.IIN = Console.ReadLine();
            if (ServisePatient.AddPatient(newPatient))
            {
                SetConsoleColor(string.Format("пациент {0} добавлен", newPatient.FullName), ConsoleColor.Green);
            }
            else
            {
                SetConsoleColor("при добавлении возникла ошибка", ConsoleColor.Red);
            }
        }