Exemplo n.º 1
0
        private void control(int action)
        {
            ;
            switch (ondeEstou.GetType().Name)
            {
            case "ProdutoForm":
                ProdutoForm produtoForm = new ProdutoForm(action);
                produtoForm.Execute(Convert.ToInt32(indice));
                produtoForm.Show();
                break;

            case "IngredienteForm":
                IngredienteForm ingredienteForm = new IngredienteForm(action);
                ingredienteForm.Execute(Convert.ToInt32(indice));
                ingredienteForm.Show();
                break;

            case "ItemForm":
                ItemForm itemForm = new ItemForm(action);
                itemForm.Execute(Convert.ToInt32(indice));
                itemForm.Show();
                break;
            }
        }