示例#1
0
 private void cFoodAddButton_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(cFoodNameTextBox.Text) && !String.IsNullOrEmpty(cFoodSupplierComboBox.Text))
     {
         Supplier supp = _suppliers.GetSupplier(cFoodSupplierComboBox.Text);
         Food     f    = _food.CreateFood(supp.SuppliersID, cFoodNameTextBox.Text, Convert.ToDouble(cFoodSupPriceNumUpDownBox.Value), Convert.ToDouble(cFoodRetailNumUpDownBox.Value));
         cFoodIdNumLabel.Text = f.FoodID.ToString();
         foodListBox.Items.Add(f.FoodName);
         cInventoryFoodComboBox.Items.Add(f.FoodName);
     }
     else
     {
         MessageBox.Show("Please make sure to fill out the food name section, in addition, select a supplier from the list.");
     }
 }
示例#2
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);
            }
        }