private void BtnDelete_Click(object sender, EventArgs e) { c.ContactId = Convert.ToInt32(textBoxContactId.Text); bool success = c.Delet(c); if (success == true) { MessageBox.Show("Contact delet successfully !"); DataTable dt = c.Select(); dgvContactList.DataSource = dt; clear(); } else { MessageBox.Show("Faild to delet!"); } }