Example #1
0
        public void printMain()
        {
            Console.WriteLine("Which objects you want to print?");
            Console.WriteLine("1. Lecturer  2. Room     3. Student\n");

            PrintInfo newChoice = new PrintInfo();

            newChoice.Choice = int.Parse(Console.ReadLine());

            switch (newChoice.Choice)
            {
            case 1:
                printLecturer();
                break;

            case 2:
                printTermTimtable();
                break;

            //case 2:
            default:
                printLecturer();
                break;
            }
        }
Example #2
0
        public void printLecturer()
        {
            Console.WriteLine("You want to print them all or just print an specific lecturer?");
            Console.WriteLine("1. All of them   2.  A Specific lecturer\n");

            PrintInfo newChoice = new PrintInfo();

            newChoice.Choice = int.Parse(Console.ReadLine());

            switch (newChoice.Choice)
            {
            case 1:
                printAllLecturers();
                break;

            case 2:
                printSpecificPerson();
                break;

            default:
                printSpecificPerson();
                break;
            }
        }
        public void choiceList()
        {
            Console.WriteLine("\n**********************UserChoice class**********************");
            Console.WriteLine("Which function you want to use?");
            Console.WriteLine("1. Lecturer \n2. Room \n3. Module \n4. Analyzation \n5. Print");
            Console.Write("I want to use number: ");
            choice = int.Parse(Console.ReadLine());
            Console.WriteLine();

            // create a SavingAndReading object to save data whatever users entered.
            SavingAndReading data = new SavingAndReading();

            switch (choice)
            {
            case 1:
                Lecturer newLecture = new Lecturer();
                newLecture = newLecture.enterLectureInfo();
                SystemList.LecturerList.Add(newLecture);

                data.WriteSystemList();

                break;

            case 2:
                Room newRoom = new Room();
                newRoom.roomMain();
                //SystemList.RoomsList.Add(newRoom);

                //data.WriteSystemList();

                break;

            case 3:
                Module newModule = new Module();
                newModule.moduleChoices();

                break;

            case 4:
                WebpageAnalyzation newWeb = new WebpageAnalyzation();
                newWeb.WebpageAnalyzationMain();

                break;

            case 5:
                PrintInfo newPrint = new PrintInfo();
                newPrint.printMain();
                break;

            case 6:
                ProduceTT ptt = new ProduceTT();
                ptt.produceRoomTimetable();
                break;

            case 7:
                Student newStudent = new Student();
                newStudent.studentMain();
                break;

            default:
                choiceList();
                break;
            }

            //choiceList();
            //return choice;
        }