private void btnDeletar_Click(object sender, EventArgs e) { try { DeleteBusiness dbs = new DeleteBusiness(); DTOFornecedor fornecedores = lstFornecedores.SelectedItem as DTOFornecedor; DialogResult = MessageBox.Show("TEM CERTEZA QUE IRÁ REALIZAR TAL AÇÃO?", "TOPMOVIE", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); if (DialogResult == DialogResult.OK) { dbs.DeleteForn(fornecedores.IdForncedor); frmRemoverFornecedores x = new frmRemoverFornecedores(); x.Show(); this.Close(); } } catch (Exception) { MessageBox.Show("OCORREU UM ERRO!", "TOPMOVIE - ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void fORNECEDORESToolStripMenuItem1_Click(object sender, EventArgs e) { frmRemoverFornecedores x = new frmRemoverFornecedores(); x.Show(); }