コード例 #1
0
ファイル: Controller.cs プロジェクト: Odense/DB-Labs
        private void GetByIdOperation()
        {
            long id = -1;

            while (id < 0)
            {
                id = view.EnterId();
            }
            switch (view.entity)
            {
            case Entity.Pupil:
                List <Pupil> pupils = new List <Pupil>()
                {
                    pupilDAO.Get(id)
                };
                view.PrintPupils(pupils);
                break;

            case Entity.Teacher:
                List <Teacher> teachers = new List <Teacher>()
                {
                    teacherDAO.Get(id)
                };
                view.PrintTeachers(teachers);
                break;
            }
        }