Example #1
0
        private void BtnExcluir_Click(object sender, EventArgs e)
        {
            DialogResult Resposta = MessageBox.Show(this, "Tem certeza que deseja excluir este produto ?", null, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (Resposta == DialogResult.Yes)
            {
                Cadastro.ExcluirProduto(IdProdutoEditar);
                MessageBox.Show(this, "Produto excluido com sucesso!", null, MessageBoxButtons.OK, MessageBoxIcon.Information);
                TextNomeEditar.Text                = "";
                TextCorEditar.Text                 = "";
                TextPrecoCustoEditar.Text          = "";
                TextPrecoVendaEditar.Text          = "";
                ComboCategoriaEditar.SelectedValue = "1";
                ComboTamanhoEditar.SelectedValue   = "1";
                TextCodigoEditar.Text              = "";
                TextMarkupEditar.Text              = "";
                IdProdutoEditar = "";
            }
        }