private void BindText() { Warehouse warehouse = new Warehouse(); warehouse.Warehouse_id = Convert.ToInt32(id); WarehouseProvider provider = new WarehouseProvider(); DataTable table = new DataTable(); table = provider.Select(warehouse); this.txt_number.Text = table.Rows[0]["warehouse_number"].ToString(); this.txt_time.Text = table.Rows[0]["warehouse_time"].ToString(); }
/// <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(); } }