Пример #1
0
        public static void HandleStudentCourseMenu()
        {
            int KeypressedValue = 0;

            string[] StringList = { "1 : Se Studerende - F*g Liste (SQL)",
                                    "2 : Sæt Studerende på nyt F*g",
                                    "3 : Ret Karakter for Studerende på F*g",
                                    "4 : Tilbage !!!" };
            do
            {
                KeypressedValue = ToolsMenu.MakeMenu(StringList);

                ToolsScreen.MakeEmptyLines(2);

                switch (KeypressedValue)
                {
                case 1:
                    WatchStudentCourseList();
                    break;

                case 2:
                    AddCourseForStudent();
                    break;

                case 3:
                    ModifyGradeForStudentOnCourse();
                    break;
                }
            } while (KeypressedValue < StringList.Length);
        }
Пример #2
0
        public static void HandleStudentMenu()
        {
            int KeypressedValue = 0;

            string[] StringList = { "1 : Se Studerende Liste (SQL)",
                                    "2 : Se Studerende Liste (View)",
                                    "3 : Se Studerende Liste (Stored Procedure)",
                                    "4 : Se udvalgt Studerende (Stored Procedure)",
                                    "5 : Tilbage !!!" };
            do
            {
                KeypressedValue = ToolsMenu.MakeMenu(StringList);

                ToolsScreen.MakeEmptyLines(2);

                switch (KeypressedValue)
                {
                case 1:
                    WatchStudentList();
                    break;

                case 2:
                    WatchStudentListView();
                    break;

                case 3:
                    WatchStudentListStoredProcedure();
                    break;

                case 4:
                    WatchStudentStoredProcedure();
                    break;
                }
            } while (KeypressedValue < StringList.Length);
        }
Пример #3
0
        public static int MakeMenu(string[] StringListHere)
        {
            int  KeypressedValue     = 0;
            char KeypressedValueChar = '0';

            char[] ValidCharArray = new char[StringListHere.Length];

            for (int Counter = 0; Counter < StringListHere.Length; Counter++)
            {
                char[] _chars = (Counter + 1).ToString().ToCharArray();
                ValidCharArray[Counter] = _chars[0];
            }

            ToolsScreen.ClearScreen();
            foreach (string Item in StringListHere)
            {
                ToolsOutput.PrintStringOnSeperateLine(Item);
            }
            KeypressedValueChar = ToolsInput.GetKeyPress("Indtast dit valg (1 - " + StringListHere.Length + ") : ", ValidCharArray, false);
            KeypressedValue     = KeypressedValueChar.ParseInt32();

            return(KeypressedValue);
        }