Exemplo n.º 1
0
        private void getDataInNeed(ThematicOrder to)
        {
            ProductDataMap     pdm           = new ProductDataMap();
            List <string>      commonInNeed  = pdm.GetCommonInNeed(to);
            List <string>      assistInNeed  = pdm.GetAssistInNeed(to);
            List <CommonOrder> commonListTmp = new List <CommonOrder>();
            List <AssistData>  assistListTmp = new List <AssistData>();

            this.commonOrderList = new List <CommonOrder>();
            foreach (string name in commonInNeed)
            {
                CommonOrder co = new CommonOrder();
                co.ProductName = name;
                co.CoverScope  = to.CoverScope;
                co.StartDate   = to.StartDate;
                co.EndDate     = to.EndDate;
Exemplo n.º 2
0
        private void getDataInNeed(ThematicOrder to)
        {
            ProductDataMap     pdm           = new ProductDataMap();
            List <string>      commonInNeed  = pdm.GetCommonInNeed(to);
            List <string>      assistInNeed  = pdm.GetAssistInNeed(to);
            List <CommonOrder> commonListTmp = new List <CommonOrder>();
            List <AssistData>  assistListTmp = new List <AssistData>();

            this.commonOrderList = new List <CommonOrder>();
            foreach (string name in commonInNeed)
            {
                CommonOrder co = new CommonOrder();
                co.ProductName = name;
                co.CoverScope  = to.CoverScope;
                co.StartDate   = to.StartDate;
                co.EndDate     = to.EndDate;


                co.EnglishName = dataNameMap.GetCommonEnglishName(co.ProductName);;
                co.ProductType = dataNameMap.GetCommonCategory(co.ProductName);;
                //TODO:查找数据库,找出该数据是否在库
                co.IsInDataBase = false;
                commonListTmp.Add(co);
                if (co.IsInDataBase == false)
                {
                    co.Status = OrderStatus.等待生产队列.ToString();
                    commonOrderList.Add(co);
                }
            }
            this.commonInNeedList = commonListTmp;
            dgv_commonProductInNeed.DataSource = commonInNeedList;

            foreach (string name in assistInNeed)
            {
                AssistData ad = new AssistData();
                ad.ProductName = name;
                ad.CoverScope  = to.CoverScope;
                ad.StartDate   = to.StartDate;
                ad.EndDate     = to.EndDate;
                //TODO:查找数据库,找出该数据是否在库
                ad.IsInDataBase = false;
                ad.ProductType  = "";
                ad.EnglishName  = "";
                assistListTmp.Add(ad);
            }
            dgv_assistDataInNeed.DataSource = assistInNeedList;
        }