using System; using System.Collections.Generic; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using ParticipantService; public partial class Participant : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { ParticipantService.ParticipantService myService = new ParticipantService.ParticipantService(); GridView1.AutoGenerateColumns = true; GridView1.DataSource = myService.Lister(); GridView1.DataBind(); } protected void Button2_Click(object sender, EventArgs e) { ParticipantService.ParticipantService myService = new ParticipantService.ParticipantService(); GridView1.AutoGenerateColumns = true; GridView1.DataSource = myService.Tabler(); GridView1.DataBind(); } protected void Button3_Click(object sender, EventArgs e) { ParticipantService.ParticipantService myService = new ParticipantService.ParticipantService(); GridView1.AutoGenerateColumns = true; GridView1.DataSource = myService.GetParticipants(); GridView1.DataBind(); } protected void Button4_Click(object sender, EventArgs e) { ParticipantService.ParticipantService myService = new ParticipantService.ParticipantService(); ParticipantBusiness p = new ParticipantBusiness(); p.Nom = "Lafontaine"; p.Prenom = "Valerie"; myService.AjouterParticipant(p); } }