Ejemplo 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);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public void addFood(int id, String name, int cost)
 {
     stallDatabase.addFood(myStall.getID(), id, name, cost);
 }