private void ButtonViewFood_Click(object sender, EventArgs e)
        {
            var Categories = CategoryController.GetAllCategories();
            var Foods      = FoodController.GetallFood();

            this.Hide();
            OrderFood o = new OrderFood(Categories, Foods);

            o.Show();
        }
Пример #2
0
        private void ButtonLogin_Click(object sender, EventArgs e)
        {
            var result = CustomerController.AuthenticateUser(textBoxUname.Text, textBoxPass.Text);

            if (result == true)
            {
                MessageBox.Show("Success", "Alert");
                this.Hide();
                var Categories = CategoryController.GetAllCategories();
                var Foods      = FoodController.GetallFood();

                OrderFood o = new OrderFood(Categories, Foods);
                o.Show();
            }
            else
            {
                MessageBox.Show("Failed", "Alert");
            }
        }