private void btnExcluir_Click(object sender, EventArgs e) { var register = new ClientRegister(); if (dtvClient.CurrentRow == null) { lblMessage.Text = Messages.Empty; return; } var client = (Client)dtvClient.CurrentRow.DataBoundItem; lblMessage.Text = register.Delete(client); dtvClient.DataSource = RefreshGrid(); CleanFields(); }