Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                db.s = "select numFournisseur from fournisseur";
                SqlDataAdapter cmd = new SqlDataAdapter(db.s, db.cnx);
                DataTable      dt  = new DataTable();
                cmd.Fill(dt);
                DropDownlist1.DataSource = dt;
                DropDownlist1.DataBind();
                DropDownlist1.DataTextField = "numFournisseur";
                DropDownlist1.DataBind();

                db.s = "select numMarche from marche";
                SqlDataAdapter c = new SqlDataAdapter(db.s, db.cnx);
                DataTable      d = new DataTable();
                c.Fill(d);
                DropDownlist2.DataSource = d;
                DropDownlist2.DataBind();
                DropDownlist2.DataTextField = "numMarche";
                DropDownlist2.DataBind();

                db.s = "select nom from fournisseur";
                SqlDataAdapter ss = new SqlDataAdapter(db.s, db.cnx);
                DataTable      ee = new DataTable();
                ss.Fill(ee);
                DropDownlist3.DataSource = ee;
                DropDownlist3.DataBind();
                DropDownlist3.DataTextField = "nom";
                DropDownlist3.DataBind();
            } catch { }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                db.s = "select numDeplacement from Deplacement";
                SqlDataAdapter cmd = new SqlDataAdapter(db.s, db.cnx);
                DataTable      dt  = new DataTable();
                cmd.Fill(dt);
                DropDownlist1.DataSource = dt;
                DropDownlist1.DataBind();
                DropDownlist1.DataTextField = "numDeplacement";
                DropDownlist1.DataBind();

                db.s = "select numMarche from marche";
                SqlDataAdapter c = new SqlDataAdapter(db.s, db.cnx);
                DataTable      d = new DataTable();
                c.Fill(d);
                DropDownlist2.DataSource = d;
                DropDownlist2.DataBind();
                DropDownlist2.DataTextField = "numMarche";
                DropDownlist2.DataBind();
            } catch { }
        }