//je veux charger le service void charger_servce() { if (!IsPostBack) { con = new connexion(); //selection du service DropDownListlisteservices.Items.Clear(); rd = null; rd = con.selectData("select id_service,nom_service from service"); DropDownListlisteservices.Items.Add(""); while (rd.Read()) { DropDownListlisteservices.Items.Add(rd.GetInt32(0) + " " + rd.GetString(1)); } } }
void charger_poste() { if (!IsPostBack) { con = new connexion(); //selection du poste DropDownListlisteposte.Items.Clear(); rd = null; rd = con.selectData("select id_poste,nom_poste from poste"); DropDownListlisteposte.Items.Add(""); while (rd.Read()) { DropDownListlisteposte.Items.Add(rd.GetInt32(0) + " " + rd.GetString(1)); } rd.Close(); } }
//charger la choix des regions void charger_region() { if (!IsPostBack) { con = new connexion(); //selection des regions DropDownListereg.Items.Clear(); DropDownListereg.Items.Add(""); rd = null; rd = con.selectData("select id_region,nom_region from region"); while (rd.Read()) { DropDownListereg.Items.Add(rd.GetInt32(0) + " " + rd.GetString(1)); } } }