Пример #1
0
        public void setDailyStaff()
        {
            bool   containsTitle = false;
            string day           = GetInput.chooseDayOfWeek();

            day = Console.ReadLine();
            string employeeToWork = GetInput.employeeToWorkByTitle();

            employeeToWork = Console.ReadLine();
            while (dailyStaff.Count < 6)
            {
                foreach (Employee emp in dailyStaff)
                {
                    if (emp.Title == employeeToWork)
                    {
                        containsTitle = true;
                        Console.WriteLine("already filled");
                        setDailyStaff();
                    }
                    else if (containsTitle == false)
                    {
                        if (employeeToWork == emp.Title && emp.DaysAvailable == day)
                        {
                            dailyStaff.Add(emp);
                        }
                    }
                }
            }
        }
Пример #2
0
        public void takeReservation()
        {
            string time = GetInput.getPartyTime();
            string size = GetInput.getPartySize();
            string name = GetInput.getPartyName();

            reservationList.Add(time);
            reservationList.Add(size);
            reservationList.Add(name);
        }
Пример #3
0
        //pass user input in for getinput class and use that number
        public void hireNewEmployees()
        {
            int numberToHire = GetInput.numberToHire();

            for (int i = 0; i < numberToHire; i++)
            {
                Employee employeeToAdd;
                employeeToAdd = new Employee(GetInput.getEmployeeFirstName(), GetInput.getEmployeeLastName(), GetInput.getEmployeeTitle(), GetInput.getDaysAvailable());
                Manager.staffList.Add(employeeToAdd);
            }
        }
Пример #4
0
        public void setDailyMenu()
        {
            string foodItem   = GetInput.createFoodItem();
            string foodPrice  = GetInput.giveFoodItemPrice();
            string drinkItem  = GetInput.createDrinkItem();
            string drinkPrice = GetInput.giveDrinkItemPrice();

            dailyMenu.Add(foodItem);
            dailyMenu.Add(foodPrice);
            dailyMenu.Add(drinkItem);
            dailyMenu.Add(drinkPrice);
        }
Пример #5
0
        public void terminateEmployees()
        {
            string name = GetInput.getEmployeeFirstName();

            name = Console.ReadLine();
            foreach (Employee emp in staffList)
            {
                if (emp.FirstName == name)
                {
                    staffList.Remove(emp);
                }
            }
        }
Пример #6
0
        public void isTrained()
        {
            string trained = GetInput.checkTrained();
            bool   isTrained;

            if (trained == "yes")
            {
                isTrained = true;
            }
            else if (trained == "no")
            {
                isTrained = false;
            }
        }
Пример #7
0
        public void checkEmployeeZone()
        {
            string check = GetInput.checkSection();
            bool   isClean;

            if (check == "yes")
            {
                isClean = true;
            }
            else if (check == "no")
            {
                isClean = false;
            }
        }
Пример #8
0
        public void setDailySpecials()
        {
            string day = GetInput.chooseDayOfWeek();

            day = Console.ReadLine();
            string special = Display.displayMondaySpecial();

            if (day == "monday")
            {
                dailyMenu.Add(special);
            }
            else
            {
                Console.WriteLine("special on Monday only.");
            }
        }
Пример #9
0
 public void logIn()
 {
     Console.WriteLine(Display.logInPrompt());
     UserName = GetInput.getUserName();
     PassWord = GetInput.getPassword();
     foreach (string line in Read.readFromFile2("managerData.txt"))
     {
         if (line.Contains(UserName))
         {
             if (line.Contains(PassWord))
             {
                 Console.Clear();
                 Console.WriteLine("Welcome: " + UserName);
                 break;
             }
         }
         else
         {
             Console.WriteLine("invalid entry");
             logIn();
         }
     }
 }