private void btnExcluir_Click(object sender, EventArgs e) { USRIOTableAdapter uta = new USRIOTableAdapter(); { if (MessageBox.Show("Deseja realmente Apagar? ", "Apagado", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { uta.DeletarUsuario(int.Parse(dgvUsrio.CurrentRow.Cells["IDDataGridViewTextBoxColumn"].Value.ToString())); } } dgvUsrio.DataSource = uta.GetData(); }
public FrmCdstrUsuario() { InitializeComponent(); dgvUsrio.DataSource = uta.GetData(); }