private void BindDDL() { BrandProvider brand = new BrandProvider(); this.ddl_BrandName.DataSource = brand.GetAll(); this.ddl_BrandName.DataBind(); this.ddl_BrandName.Items.Add("所有"); this.ddl_BrandName.SelectedIndex = this.ddl_BrandName.Items.Count - 1; }
private void BindDDL() { UnitProvider unit = new UnitProvider(); this.ddl_Unit.DataSource = unit.GetAll(); this.ddl_Unit.DataBind(); BrandProvider brand = new BrandProvider(); this.ddl_BrandName.DataSource = brand.GetAll(); this.ddl_BrandName.DataBind(); }
private void BindSource() { UnitProvider unit = new UnitProvider(); this.ddl_Unit.DataSource = unit.GetAll(); this.ddl_Unit.DataBind(); ProductProvider product = new ProductProvider(); this.ddl_Product.DataSource = product.GetAll(); this.ddl_Product.DataBind(); BrandProvider brand = new BrandProvider(); this.ddl_BrandName.DataSource = brand.GetAll(); this.ddl_BrandName.DataBind(); }
/// <summary> /// 绑定Brand信息的数据源 /// </summary> private void BindSource(int start, string name) { if (name != null) { Brand brand = new Brand(); brand.Brand_name = name; BrandProvider provider = new BrandProvider(); DataTable table = provider.Select(brand, start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } else { BrandProvider provider = new BrandProvider(); DataTable table = provider.GetAll(start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } }