protected void btnCreate_Click(object sender, EventArgs e) { BALEquipe balJoueur = new BALEquipe(); try { int returnValue = balJoueur.CreateEquipe(txtEquipeName.Text); if (returnValue > 0) { gvJoueurList.DataBind(); Page.RegisterClientScriptBlock("message", "<script>alert('Joueur is created successfully')</script>"); txtEquipeName.Text = string.Empty; binding(null); } else { Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect User Inputs.')</script>"); } } catch (Exception ex) { clsLogging logError = new clsLogging(); logError.WriteLog(ex); } }
protected void btnCreate_Click(object sender, EventArgs e) { BALEquipe dalequipe = new BALEquipe(); try { int returnValue = dalequipe.CreateEquipe(""); if (returnValue > 0) { Page.RegisterClientScriptBlock("message", "<script>alert('Country is created successfully')</script>"); //txtCountryName.Text = string.Empty; } else { Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect User Inputs.')</script>"); } } catch (Exception ex) { clsLogging logError = new clsLogging(); logError.WriteLog(ex); } }
public string CreateEquipe(string contryName) { BALEquipe equipe = new BALEquipe(); try { int returnValue = equipe.CreateEquipe(contryName); if (returnValue > 0) { return("Country is created successfully "); } else { return("Incorrect User Inputs."); } } catch (Exception ex) { clsLogging logError = new clsLogging(); logError.WriteLog(ex); } return("hello"); }