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> /// 绑定Units信息的数据源 /// </summary> private void BindSource(int start, string name) { if (name != null) { Units unit = new Units(); unit.Unit_name = name; UnitProvider provider = new UnitProvider(); DataTable table = provider.Select(unit, start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } else { UnitProvider provider = new UnitProvider(); DataTable table = provider.GetAll(start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } }