Exemplo n.º 1
0
        public StudentModel GetInfor()
        {
            StudentModel student = new StudentModel();

            _view.NotifyInput(1);
            student.Name = Console.ReadLine();

            _view.NotifyInput(2);
            student.ID = Console.ReadLine();

            _view.NotifyInput(3);
            student.Age = int.Parse(Console.ReadLine());

            _view.NotifyInput(4);
            student.Class = Console.ReadLine();

            return(student);
        }
Exemplo n.º 2
0
        public void UpdateStudent(string paramIdStudent)
        {
            foreach (var student in Students)
            {
                if (student.ID == paramIdStudent)
                {
                    _view.NotifyInput(1);
                    student.Name = Console.ReadLine();

                    _view.NotifyInput(2);
                    student.ID = Console.ReadLine();

                    _view.NotifyInput(3);
                    student.Age = int.Parse(Console.ReadLine());

                    _view.NotifyInput(4);
                    student.Class = Console.ReadLine();
                }
            }
        }