示例#1
0
        public Library()
        {
            Members = new MemberCollection();
            Movies  = new MovieCollection();
            Staff   = new Staff("staff", "today123");

            MainMenu   = new MainMenu(Members, Staff);
            StaffMenu  = new StaffMenu(Members, Movies);
            MemberMenu = new MemberMenu(Movies);

            // Connect all pages
            MainMenu.StaffMenu  = StaffMenu;
            MainMenu.MemberMenu = MemberMenu;
            StaffMenu.MainMenu  = MainMenu;
            MemberMenu.MainMenu = MainMenu;
        }
示例#2
0
        /// <summary>
        /// Reads input from console to perform staff credential authentication,
        /// only loading the staff menu screen if matching records are found.
        /// </summary>
        /// <returns></returns>
        public bool TryStaffLogin()
        {
            bool isInputValid = false;

            Console.Write("Enter staff username: "******"Enter staff password: "******"\nSuccessful login! Transferring you to Staff Menu");
                StaffMenu.Load();
            }
            else
            {
                Console.WriteLine("Staff username and password does not match.");
            }
            return(isInputValid);
        }