Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            View_Orders vw = new View_Orders(1);

            vw.Show();
            Hide();
        }
Esempio n. 2
0
        private void Done_Click(object sender, EventArgs e)
        {
            try
            {
                string             connectionString = "Server=mssql.cs.ksu.edu;Database=santiagoscavone;UID=santiagoscavone;Pwd=Sqlpassword1!";
                SqlOrderRepository sqlo             = new SqlOrderRepository(connectionString);
                if (selectedWaiter != null)
                {
                    DatabaseData.Models.Order o = sqlo.AddOrder(selectedWaiter.FirstName, selectedWaiter.LastName, tableno);
                    foreach (Food f in orderFoods)
                    {
                        Food added = sqlo.AddFood(o.OrderID, f.Name, f.Quantity, f.IngredientsUsed);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            View_Orders vo = new View_Orders(tableno);

            this.Hide();
            vo.Show();
        }