Ejemplo n.º 1
0
        private void changeIng_Click(object sender, EventArgs e)
        {
            AddIngredientOfDish order = new AddIngredientOfDish(IdEmpl);

            Hide();
            order.ShowDialog();
            Close();
        }
Ejemplo n.º 2
0
        private void add_button_Click(object sender, EventArgs e)
        {
            OleDbCommand command = new OleDbCommand("INSERT INTO Menu (Name, CostPrice, Price, Description) VALUES (?, ?, ?, ?)", cn);

            command.Parameters.AddWithValue("@Name", NameDish.Text);
            command.Parameters.AddWithValue("@CostPR", CostPrice.Text);
            command.Parameters.AddWithValue("@PR", Price.Text);
            command.Parameters.AddWithValue("@Desc", Description.Text);
            command.ExecuteNonQuery();
            MessageBox.Show("New dish added", "Add", MessageBoxButtons.OK);

            AddIngredientOfDish ingr = new AddIngredientOfDish(IdEmpl);

            Hide();
            ingr.ShowDialog();
            Close();
        }