private void setCondition() { if (PlanCode.SelectedIndex < 0) { return; } List <string> stores = new System.Collections.Generic.List <string>(); string planCode = PlanCode.SelectedItem.Value.ToString(); List <PlanBomEntity> allEntities = PlanBOMFactory.GetByOrderCode(planCode); List <LineSideStockEntity> dataSource = new List <LineSideStockEntity>(); foreach (var a in allEntities) { LineSideStockEntity ls = LineSideStockFactory.GetStoreItem(a.LINESIDE_STOCK_CODE, a.ITEM_CODE); if (ls != null) { dataSource.Add(ls); if (!stores.Contains(a.RESOURCE_STORE)) { stores.Add(a.RESOURCE_STORE);//添加采购虚拟区 } } } ASPxGridView1.DataSource = dataSource; ASPxGridView1.DataBind(); DestinationStore.Items.Clear(); DestinationStore.Items.Add("CGXN", "CGXN"); foreach (var s in stores) { DestinationStore.Items.Add(s, s); } }
private void setCondition() { if (PlanCode.SelectedIndex < 0) { return; } string planCode = PlanCode.SelectedItem.Value.ToString(); List <PlanBomEntity> allEntities = PlanBOMFactory.GetByOrderCode(planCode); List <LineSideStockEntity> dataSource = new List <LineSideStockEntity>(); foreach (var a in allEntities) { LineSideStockEntity ls = LineSideStockFactory.GetStoreItem(a.LINESIDE_STOCK_CODE, a.ITEM_CODE); if (ls != null) { dataSource.Add(ls); } } ASPxGridView1.DataSource = dataSource; ASPxGridView1.DataBind(); }