Beispiel #1
0
        public void Selete()
        {
            selects = new Selects();
            Console.WriteLine("# SeleteMenu #");
            Console.WriteLine("Select number to function:\n 1.Select one student 2.Select All student " +
                              "3.Select one class'students 4.Select one class 5.Select All class: " +
                              "\n" + "  OR Other Number to MainMenu");
            int num = int.Parse(Console.ReadLine());

            switch (num)
            {
            case 1:
                Console.WriteLine("Please enter the student's id:");
                int ssid = int.Parse(Console.ReadLine());
                selects.GetStudent(ssid);
                break;

            case 2:
                selects.GetALLStudent();
                break;

            case 3:
                Console.WriteLine("Please enter the class's id:");
                int cid1 = int.Parse(Console.ReadLine());
                selects.GetClassAllStudents(cid1);
                break;

            case 4:
                Console.WriteLine("Please enter the class's id:");
                int cid2 = int.Parse(Console.ReadLine());
                selects.GetClass(cid2);
                break;

            case 5:
                selects.GetAllClass();
                break;

            default:
                break;
            }
        }