Ejemplo n.º 1
0
 public static void PrintPacient()
 {
     foreach (Pacient item in ServicePacient.GetPacient())
     {
         Console.WriteLine("{0} ({1}), IIN - {2}", item.FIO, item.Sex, item.IIN);
     }
 }
Ejemplo n.º 2
0
        public static void AddPacient()
        {
            Pacient newPacient = new Pacient();

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