private void btnDelete_Click(object sender, EventArgs e) { //get the contact ID from the application c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success == true) { //Successfully Deleted MessageBox.Show("Contact Successfully Deleted."); //refresh data griedview //load data on data griedview DataTable dt = c.Select(); dgvContactList.DataSource = dt; //call clear method here Clear(); } else { //failed to delete MessageBox.Show("Failed to delete Contact. Try Again"); } }
private void btn_delete_Click(object sender, EventArgs e) { c.ContactID = int.Parse(txtContactID.Text); bool success = c.Delete(c); if (success == true) { MessageBox.Show("Contact successfully deleted."); DataTable dt = c.Select(); dgvContactList.DataSource = dt; Clear(); } else { MessageBox.Show("Failed to delete contact."); } }
private void btnDelete_Click(object sender, EventArgs e) { //Get Data from the textboxes c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success) { MessageBox.Show("ContactDeleted"); DataTable dt = c.Select(); dgvContactList.DataSource = dt; Clear(); } else { MessageBox.Show("Not Deleted"); } }
private void btnDelete_Click(object sender, EventArgs e) { // Get data from the textbox c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success == true) { MessageBox.Show("Contact successfully deleted"); // Load Data on Data Grid View DataTable dt = c.Select(); dgvContactList.DataSource = dt; Clear(); } else { MessageBox.Show("Failed to delete the contact"); } }
private void btnDelete_Click(object sender, EventArgs e) { c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success) { //Successfully Deleted contact MessageBox.Show("Contact Successfully Deleted."); //Refresh Data Grid View DataTable dt = c.Select(); dgvContactList.DataSource = dt; //Call Clear Method Clear(); } else { MessageBox.Show("Failed to Delete Contact. Try Again"); } }
private void btnDelete_Click(object sender, EventArgs e) { //Get the Contact ID from the Application c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success == true) { //Successfully Deleted MessageBox.Show("Contact successfully deleted."); //Refresh Data GridView DataTable dt = c.Select(); dataGridView1.DataSource = dt; //Call the clear method here Clear(); } else { //Failed to Delete MessageBox.Show("Failed to Delete Contact. Try Again."); } }
private void btnDelete_Click(object sender, EventArgs e) { //get data from the textbox c.ContactID = Convert.ToInt32(txtBoxContactID.Text); bool success = c.Delete(c); if (success == true) { MessageBox.Show("Contact has been Deleted successfully !"); //refresh the data grid view //load data to data grid view DataTable dt = c.Select(); dgvContactList.DataSource = dt; Clear(); } else { MessageBox.Show("Failed to Delete contact .Try again"); } }
private void btnDelete_Click(object sender, EventArgs e) { //Get the Contact ID fromt eh Application c.ContactID = Convert.ToInt32(txtboxContactID.Text); bool success = c.Delete(c); if (success == true) { //Successfully Deleted MessageBox.Show("Contact successfully deleted."); //Refresh Data GridView //Load Data on Data GRidview DataTable dt = c.Select(); dgvContactList.DataSource = dt; //CAll the Clear Method Here Clear(); } else { //FAiled to dElte MessageBox.Show("Failed to Delete Dontact. Try Again."); } }
private void btnDelete_Click(object sender, EventArgs e) { //Obter dados das caixas de texto c.ContactID = Convert.ToInt32(txtBoxContactID.Text); bool success = c.Delete(c); if (success == true) { //Excluído com sucesso MessageBox.Show("Contato excluído com sucesso"); //Refresh Data GridView //Carregar dados em DataGridView DataTable dt = c.Select(); dgvContactList.DataSource = dt; //Chame o método Clear Clear(); } else { //Falha ao excluir MessageBox.Show("Falha ao excluir o contato. Tente novamente!"); } }