Exemple #1
0
        private void circularButton3_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                MessageBox.Show("Não trola Francisco, seleciona algo pra excluir");
                return;
            }

            string nome = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();

            dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index);
            YoutuberRepository youtuberRepository = new YoutuberRepository();

            youtuberRepository.ApagarYoutuber(nome);
            MessageBox.Show(nome + " apagado com sucesso");
            LimparCampos();
        }