Exemple #1
0
        public static void loginMenu()
        {
            do
            { //Display all options for admin relating to Login management
                Console.WriteLine(Environment.NewLine + "---------------------" + Environment.NewLine + "LOGIN MANAGEMENT MENU" + Environment.NewLine);
                Console.WriteLine("Type A to | Add a Login" + Environment.NewLine + "Type D to | Delete a Login" + Environment.NewLine + "Type B to | Go Back" + Environment.NewLine + "Type X to | Exit the Software");
                Console.WriteLine(Environment.NewLine);
                Console.Write("What would you like to do? ");
                string userChoice = Console.ReadLine().ToUpper(); //saved Admin choice
                int    i          = menuChoice(userChoice);

                switch (i) //checks which menu choice the admin has chosen
                {
                case 1:
                    addLogin();     //Add a new login to the system
                    break;

                case 2:
                    removeLogin();     //Remove a login from the system
                    break;

                case 3:
                    AdminControl.adminMenu();     //Return to the main Admin Menu
                    break;

                case 4:
                    Environment.Exit(1);     //Close the software
                    break;
                }
            } while (constantMenu == false);
        }
Exemple #2
0
        public static void customerMenu()
        {
            do
            { //Displays all options for the Admin relating to customers
                Console.WriteLine(Environment.NewLine + "------------------------" + Environment.NewLine + "CUSTOMER MANAGEMENT MENU" + Environment.NewLine);
                Console.WriteLine("Type V to | View All Customers" + Environment.NewLine + "Type A to | Register a Customer" + Environment.NewLine + "Type D to | Delete a Customer" + Environment.NewLine + "Type B to | Go Back" + Environment.NewLine + "Type X to | Exit the Software");
                Console.WriteLine(Environment.NewLine);
                Console.Write("What would you like to do? ");
                string userChoice = Console.ReadLine().ToUpper(); //Saves Admin choice in the menu
                int    j          = menuChoice(userChoice);

                switch (j) //Checks Which Menu option was selected
                {
                case 1:
                    viewCustomers();     //Output List of all customers and their details
                    break;

                case 2:
                    addCustomer();     //Add a new customer to the system
                    break;

                case 3:
                    removeCustomer();     //Remove a new customer to the system
                    break;

                case 4:
                    AdminControl.adminMenu();     //Return to the main Admin Menu
                    break;

                case 5:
                    Environment.Exit(1);     //Close the Software
                    break;
                }
            } while (constantMenu == false);
        }
Exemple #3
0
        public static void loanMenu()
        {
            do
            { //Presents user with all the optons available for managing books
                Console.WriteLine(Environment.NewLine + "--------------------" + Environment.NewLine + "LOAN MANAGEMENT MENU" + Environment.NewLine);
                Console.WriteLine("Type V to | View All Active Loans" + Environment.NewLine + "Type A to | Loan out a Book" + Environment.NewLine + "Type D to | Delete a Loan" + Environment.NewLine + "Type B to | Go Back" + Environment.NewLine + "Type X to | Exit the Software");
                Console.WriteLine(Environment.NewLine);
                Console.Write("What would you like to do? ");
                string userChoice = Console.ReadLine().ToUpper();//Saves user choice
                int    i          = menuChoice(userChoice);

                switch (i) //checks user choice against available options
                {
                case 1:
                    viewLoans();     //Output details of all loans
                    break;

                case 2:
                    addLoan();     //Loan out a book to a customer
                    break;

                case 3:
                    removeLoan();     //Manually delete a loan
                    break;

                case 4:
                    AdminControl.adminMenu();     //Return to main Admin Menu
                    break;

                case 5:
                    Environment.Exit(1);     //Exit the Software
                    break;
                }
            } while (constantMenu == false);
        }
Exemple #4
0
        public static void bookMenu()
        {
            do
            { //Displays all options available to the Admin relating to managing books
                Console.WriteLine(Environment.NewLine + "--------------------" + Environment.NewLine + "BOOK MANAGEMENT MENU" + Environment.NewLine);
                Console.WriteLine("Type V to | View All Books" + Environment.NewLine + "Type A to | Add a Book" + Environment.NewLine + "Type D to | Delete a Book" + Environment.NewLine + "Type B to | Go Back" + Environment.NewLine + "Type X to | Exit the Software");
                Console.WriteLine(Environment.NewLine);
                Console.Write("What would you like to do? ");
                string userChoice = Console.ReadLine().ToUpper(); //Stores user's choice
                int    i          = menuChoice(userChoice);

                switch (i) //Checks which option was chosen by the user
                {
                case 1:
                    viewBooks();     //Method to Display a list of all books in the system
                    break;

                case 2:
                    addBook();     //Method to add a new book to the system
                    break;

                case 3:
                    removeBook();     //Method to remove a book from the system
                    break;

                case 4:
                    AdminControl.adminMenu();     //Return to the Admin Menu
                    break;

                case 5:
                    Environment.Exit(1);     //Close the Software
                    break;
                }
            } while (constantMenu == false);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            bool loginState = false;           //Welcomes the user to the system

            Console.WriteLine(Environment.NewLine + "Welcome to the Library Internal System  |  Please Log in" + Environment.NewLine);
            do
            {
                loginInput.Clear();
                Console.Write("Username: "******"Password: "******"");
                loginInput.Add(usernameInput, passwordInput);         //passes inputs to method to check them against those stored in the system
                loginState = LoginDetails.loginCheck(loginInput);     //passes inputs to method to check them against those stored in the system
            } while (loginState == false);                            //Loops until recognised Login is entered
            Console.WriteLine("Welcome Admin" + Environment.NewLine); //Personalised Welcome Message
            AdminControl.adminMenu();                                 //Loads user into Admin Menu
            Console.ReadLine();
        }