void deletebyId(string txtId) { BALEquipe balJoueur = new BALEquipe(); try { int returnValue = balJoueur.deleteEquipe(txtId); if (returnValue == 0) { Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect Joueur Id')</script>"); } else if (returnValue == -2) { Page.RegisterClientScriptBlock("message", "<script>alert('Joueur ID could not found.')</script>"); } else if (returnValue == 1) { Page.RegisterClientScriptBlock("message", "<script>alert('Joueur is deleted successfully.')</script>"); binding(null); //txtDeleteID.Text = string.Empty; } else { Page.RegisterClientScriptBlock("message", "<script>alert('Unspecified error.')</script>"); } } catch (Exception ex) { clsLogging logError = new clsLogging(); logError.WriteLog(ex); } }
protected void btnDelete_Click(object sender, EventArgs e) { BALEquipe dalequipe = new BALEquipe(); try { int returnValue = dalequipe.deleteEquipe(txtDeleteID.Text); if (returnValue == 0) { Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect Country Id')</script>"); } else if (returnValue == -2) { Page.RegisterClientScriptBlock("message", "<script>alert('Country ID could not found.')</script>"); } else if (returnValue == 1) { Page.RegisterClientScriptBlock("message", "<script>alert('Country is deleted successfully.')</script>"); binding(null); txtDeleteID.Text = string.Empty; } else { Page.RegisterClientScriptBlock("message", "<script>alert('Unspecified error.')</script>"); } } catch (Exception ex) { clsLogging logError = new clsLogging(); logError.WriteLog(ex); } }