Exemple #1
0
        private void Button2_Click_1(object sender, EventArgs e)
        {
            View_Orders vw = new View_Orders(2);

            vw.Show();
            Hide();
        }
Exemple #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();
        }