Exemplo n.º 1
0
        public static WorkingDay CreateNewDay()

        {
            Console.Clear();

            WorkingDay Day = new WorkingDay();

            Console.WriteLine("Enter name of doctor");

            Day.Name = Console.ReadLine();

            Console.WriteLine("Enter speciality");

            Day.Speciality = Console.ReadLine();

            Console.WriteLine("Enter date of day like 01.02.2000");

            Day.Date = Console.ReadLine();

            Console.WriteLine("Enter patients count");

            Day.PatientsCount = Console.ReadLine();

            Console.WriteLine("Enter time of starting work");

            Day.StartHour = Console.ReadLine();

            return(Day);
        }
Exemplo n.º 2
0
        public static void ChangeData(List <WorkingDay> Days)

        {
            Console.WriteLine("Enter date of day that`s you want to change");

            var s = Console.ReadLine();

            WorkingDay day = Days.Find(x => x.Date == s);

            if (day != null)

            {
                Console.WriteLine("Enter value of day that`s you want to change \n1)Name\n2)Speciality\n3)Date like 01.02.2000\n4)Patients count\n5)Start Hour");

                char a = Console.ReadKey().KeyChar;

                Console.WriteLine("Enter new value");

                switch (a)

                {
                case '1':

                    day.Name = Console.ReadLine();

                    break;

                case '2':

                    day.Speciality = Console.ReadLine();

                    break;

                case '3':

                    day.Date = Console.ReadLine();

                    break;

                case '4':

                    day.PatientsCount = Console.ReadLine();

                    break;

                case '5':

                    day.StartHour = Console.ReadLine();

                    break;
                }
            }
        }