string SQL="SELECT * FROM MobileBrand";
DataTable dt=new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter(SQL,ConStr);
adapter.Fill(dt);
this.cboBrand.DisplayMember="Brand";
this.cboBrand.ValueMember="BrandID";
this.cboBrand.DataSource = dt;
相关分类