예제 #1
0
        public void initFoods(FoodRepo fr)
        {
            Tuple <int, string, double, double>[] foods =
            {
                new Tuple <int, string, double, double>(1, "Quarter Pound Angus Burger Patties", (double)(.5), (double)(.75)), //1
                new Tuple <int, string, double, double>(1, "Dark Roast Coffee - 20 lb",          (double)(10), (double)(30)),  //2
                new Tuple <int, string, double, double>(1, "24oz. Polish Dill Pickles",          (double)(2), (double)(4.30)), //3
                new Tuple <int, string, double, double>(1, "Sixth Pound Angus Burger Patties",   (.4), (.7)),                  //4
                new Tuple <int, string, double, double>(1, "8oz. Ribeye Steak",                  (4), (6)),                    //5
                new Tuple <int, string, double, double>(1, "12oz. New York Strip",               (5), (7)),                    //6
                new Tuple <int, string, double, double>(1, "6oz. Filet Mignon",                  (7), (10)),                   //7
                new Tuple <int, string, double, double>(2, "Seasoned Chicken Strips",            (.1), (.14)),                 //8
                new Tuple <int, string, double, double>(2, "Grilled Chicken Breast",             (.7), (.9)),                  //9
                new Tuple <int, string, double, double>(2, "Crispy Chicken Patty",               (.4), (.7)),                  //10
                new Tuple <int, string, double, double>(3, "1oz. Romaine Lettuce",               (.05), (.06)),                //11
                new Tuple <int, string, double, double>(3, "Tomato",                             (.25), (.35)),                //12
                new Tuple <int, string, double, double>(3, "Yellow Onion",                       (.3), (.4)),                  //13
                new Tuple <int, string, double, double>(4, "8oz. Lobster",                       (12), (16)),                  //14
                new Tuple <int, string, double, double>(4, "Fresh Caught Salmon Fillet",         (7), (9)),                    //15
                new Tuple <int, string, double, double>(4, "Alaskan King crab",                  (10), (13)),                  //16
                new Tuple <int, string, double, double>(5, "6 Onion Rings",                      (.5), (.7)),                  //17
                new Tuple <int, string, double, double>(5, "Beer Battered Manchester Cod",       (1), (1.25)),                 //18
                new Tuple <int, string, double, double>(5, "6 Mozzarrella Sticks",               (1), (1.25)),                 //19
                new Tuple <int, string, double, double>(5, "Serving of French Fries",            (.3), (.4)),                  //20
                new Tuple <int, string, double, double>(6, "Pizza Dough",                        (20), (60)),                  //21
                new Tuple <int, string, double, double>(6, "Marinara Sauce",                     (3), (7)),                    //22
                new Tuple <int, string, double, double>(6, "Cheese",                             (2.50), (4.50)),              //23
                new Tuple <int, string, double, double>(6, "20 Taco Shells",                     (2.00), (3.00)),              //24
                new Tuple <int, string, double, double>(7, "Lo Mein Noodles",                    (1.5), (2.0)),                //25
                new Tuple <int, string, double, double>(7, "1 lb. Rice",                         (1.5), (2.0)),                //26
                new Tuple <int, string, double, double>(7, "Soy Sauce",                          (1.7), (2.2)),                //27
                new Tuple <int, string, double, double>(3, "Broccoli",                           (1.8), (2.4)),                //28
            };

            foreach (Tuple <int, string, double, double> food in foods)
            {
                fr.CreateFood(food.Item1, food.Item2, food.Item3, food.Item4);
            }
        }
예제 #2
0
        public cDataBaseForm()
        {
            _org       = new OrganizationRepo();
            _rest      = new RestaurantRepository();
            _food      = new FoodRepo();
            _jobs      = new JobsRepo();
            _stock     = new StockItemsRepo();
            _emp       = new EmployeeRepo();
            _suppliers = new SuppliersRepo();
            Init_Tables init = new Init_Tables();

            InitializeComponent();

            cRestOrgComboBox.Items.Clear();

            init.initOrgs(_org);
            init.initRests(_rest);
            init.initJobs(_jobs);
            init.initSupps(_suppliers);
            init.initFoods(_food);
            init.initStockItems(_stock);

            IReadOnlyList <Organization> orgs  = _org.RetrieveOrganizations();
            IReadOnlyList <Restaurant>   rests = _rest.RetrieveRestaurants();
            IReadOnlyList <Jobs>         jobs  = _jobs.RetrieveJobs();

            init.initEmp(_emp, rests, jobs);
            IReadOnlyList <Employee>  emps       = _emp.RetrieveEmployee();
            IReadOnlyList <Supplier>  supps      = _suppliers.RetrieveSuppliers();
            IReadOnlyList <Food>      foods      = _food.RetrieveFood();
            IReadOnlyList <StockItem> stockItems = _stock.RetrieveStockItems();

            foreach (var org in orgs)
            {
                cRestOrgComboBox.Items.Add(org.OrganizationName);
                orgListBox.Items.Add(org.OrganizationName);
                cSelectOrgExpendComboBox.Items.Add(org.OrganizationName);
            }
            foreach (var rest in rests)
            {
                cEmployRestComboBox.Items.Add(rest.RestaurantName);
                restListBox.Items.Add(rest.RestaurantName);
                cInventoryRestComboBox.Items.Add(rest.RestaurantName);
                cSelectRestExpendComboBox.Items.Add(rest.RestaurantName);
                cSelectRestEmpInfoComboBox.Items.Add(rest.RestaurantName);
            }
            foreach (var emp in emps)
            {
                empListBox.Items.Add(emp.EmployeeName);
            }
            foreach (var job in jobs)
            {
                jobsListBox.Items.Add(job.JobName);
                cEmployJobTitleComboBox.Items.Add(job.JobName);
            }
            foreach (var supp in supps)
            {
                suppListBox.Items.Add(supp.SuppliersName);
                cFoodSupplierComboBox.Items.Add(supp.SuppliersName);
                cSelectSupplierSalesComboBox.Items.Add(supp.SuppliersName);
            }
            foreach (var food in foods)
            {
                foodListBox.Items.Add(food.FoodName);
                cInventoryFoodComboBox.Items.Add(food.FoodName);
            }
            foreach (var si in stockItems)
            {
                invListBox.Items.Add(_rest.GetRestaurantByID(si.RestaurantID).RestaurantName + ": " + _food.GetFoodByID(si.FoodID).FoodName);
            }
        }