示例#1
0
        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);
            }
        }
示例#2
0
    private void BindData()
    {
        string project  = "";
        string zjdh     = "";
        string teamCode = "";

        if (ASPxComboBoxProject.SelectedIndex >= 0)
        {
            project = ASPxComboBoxProject.SelectedItem.Value as string;
        }
        if (ASPxComboBoxZJDH.SelectedIndex >= 0)
        {
            zjdh = ASPxComboBoxZJDH.SelectedItem.Value as string;
        }
        if (ASPxComboBoxTeam.SelectedIndex >= 0)
        {
            teamCode = ASPxComboBoxTeam.SelectedItem.Value as string;
        }
        if (string.IsNullOrWhiteSpace(project) && string.IsNullOrWhiteSpace(teamCode))
        {
            return;
        }
        if (string.IsNullOrWhiteSpace(project))
        {
            List <PlanBomEntity> allBOMs = PlanBOMFactory.GetByTeamID(teamCode);
            if (allBOMs.Count > 0)
            {
                //doWork(allBOMs);
            }
        }
        else if (!string.IsNullOrWhiteSpace(project))
        {
            List <PlanEntity> plans = PlanFactory.GetByProjectCode(project);
            if (plans == null || plans.Count < 1)
            {
                return;
            }
            if (!string.IsNullOrWhiteSpace(zjdh))
            {
                plans = (from s in plans where s.PRODUCT_MODEL == zjdh select s).ToList <PlanEntity>();
            }
            string[]             planCodes = (from s in plans select s.PLAN_CODE).ToArray <string>();
            List <PlanBomEntity> allBOMs   = PlanBOMFactory.GetByPlanCodes(planCodes);
            if (!string.IsNullOrWhiteSpace(teamCode))
            {
                allBOMs = (from s in allBOMs where s.TEAM_CODE == teamCode select s).ToList <PlanBomEntity>();
            }
            if (allBOMs.Count > 0)
            {
                //doWork(allBOMs);
            }
        }
    }
示例#3
0
        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();
        }