Esempio n. 1
0
        private void removeItem_Click(object sender, EventArgs e)   //removes item from item list, adjusts total
        {
            MenuItemTbl selectedItem = ((MenuItemTbl)orderedItems.SelectedItem);


            Total = Total - Convert.ToDecimal(selectedItem.Price);
            menu.Remove(selectedItem);
        }
Esempio n. 2
0
        void orderItem(object sender, EventArgs e)              // orders item and sends to Item list, adjusts total
        {
            Button I = (Button)sender;

            MenuItemTbl t = ((MenuItemTbl)I.Tag);

            orderedItems.SelectedIndex = orderedItems.Items.Count - 1;

            Total = Total + Convert.ToDecimal(t.Price);
            menu.Add(t);
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            MenuItemTbl Item = new MenuItemTbl();                           //New instance of a Menu Item

            Item.Description = descriptionTxt.Text;                         //Sets Items description to info in text box

            Item.Price = Convert.ToDecimal(priceTxt.Text);                  //Sets Item price to text converted to decimal in text box

            Item.ItemCategory = Convert.ToInt32(categoryBox.SelectedValue); //Sets item category to seleced value

            RDE.MenuItemTbls.Add(Item);                                     //Adds item to Database Instance
        }