Esempio n. 1
0
        public void order(Food food, Stall stall, int count)
        {
            string[] arr = new string[3];
            arr[0] = food.id.ToString();
            arr[1] = food.name;
            arr[2] = count.ToString();
            ListViewItem l1 = new ListViewItem(arr);

            vbCheckOrder.Items.Add(l1);
            myOrder.orderFood(food.id, stall.getID(), count, stallDatabase);
        }
 public Stall searchStall(int id)
 {
     for (int i = 0; i < stalls.Count(); i++)
     {
         Stall checkingStall = stalls.ElementAt <Stall>(i);
         if (checkingStall.getID() == id)
         {
             return(checkingStall);
         }
     }
     return(null);
 }
 public bool removeStall(int id)
 {
     for (int i = 0; i < stalls.Count(); i++)
     {
         Stall checkingStall = stalls.ElementAt <Stall>(i);
         if (checkingStall.getID() == id)
         {
             stalls.Remove(checkingStall);
             count--;
             return(true);
         }
     }
     return(false);
 }
Esempio n. 4
0
 public void addFood(int id, String name, int cost)
 {
     stallDatabase.addFood(myStall.getID(), id, name, cost);
 }