Exemplo n.º 1
0
 public static void PrintPatients()
 {
     foreach (Pacient item in ServisePacient.GetPacients())
     {
         Console.WriteLine("{0} ({1})\t {3}", item.FIO, item.gen, item.IIN);
     }
 }
Exemplo n.º 2
0
        public static void AddPacient()
        {
            Pacient newPacient = new Pacient();

            Console.WriteLine("Enter FIO: ");
            newPacient.FIO = Console.ReadLine();
            Console.WriteLine("Enter DAte of Birth: ");
            newPacient.DateOfBirth = DateTime.Parse(Console.ReadLine());
            Console.WriteLine("Enter gender: ");
            newPacient.gen = (Gender)(Int32.Parse(Console.ReadLine()));
            Console.WriteLine("Enter IIN: ");
            newPacient.IIN = Console.ReadLine();

            if (ServisePacient.AddPacient(newPacient))
            {
                SetConsoleColor(string.Format("pacient {0} added.", newPacient.FIO), ConsoleColor.Green);
            }
            else
            {
                SetConsoleColor(string.Format("pacient {0} not added.", newPacient.FIO), ConsoleColor.Red);
            }
        }