/// <summary> /// 绑定Units信息的数据源 /// </summary> private void BindSource(int start) { if (Request.QueryString["id"] != null) { id = Request.QueryString["id"].ToString(); Warehouse warehouse = new Warehouse(); warehouse.Good_id = Convert.ToInt32(id); WarehouseProvider provider = new WarehouseProvider(); DataTable table = provider.Select(warehouse, start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } else { WarehouseProvider provider = new WarehouseProvider(); DataTable table = provider.GetAll(start, this.ListPager1.PageSize); this.GridView1.DataSource = table.DefaultView; this.GridView1.DataBind(); } }