Пример #1
0
        private void autxtGoodsInStock_loadData(object sender, EventArgs e)
        {
            string term = autxtGoodsInStock.Term;

            List <auto_text.AutoData> data = new List <auto_text.AutoData>();

            if (term.Trim().Length > 0)
            {
                List <long>         addedGoods = GenAddedGoods();
                List <StockGoodsVO> list       = goodsManager.LoadInStockGoodsByKeyWords(term.Trim());

                foreach (StockGoodsVO vo in list)
                {
                    if (addedGoods.Contains(vo.InvID))
                    {
                        continue;
                    }
                    auto_text.AutoData adata = new auto_text.AutoData();
                    adata.Text = vo.GName + " [" + vo.Specs + "]";
                    adata.Val  = vo;
                    data.Add(adata);
                }
            }
            autxtGoodsInStock.Data = data;
        }
Пример #2
0
        private void autxtAcntNO_loadData(object sender, EventArgs e)
        {
            string term = autxtAcntNO.Term;

            List <auto_text.AutoData> data = new List <auto_text.AutoData>();

            if (term.Trim().Length > 0)
            {
                string          type     = StringUtil.Obj2Str(cboxPayMode.SelectedValue);
                string          platfrom = StringUtil.Obj2Str(cboxPlatform.SelectedValue);
                List <CustAcnt> list     = new List <CustAcnt>();
                if (grade == GRADE.SUPPLIER)
                {
                    list = supplierManager.LoadCustAcntByKeywords(custId, type, platfrom, term.Trim());
                }
                else if (grade == GRADE.RESELLER)
                {
                    list = resellerManager.LoadCustAcntByKeywords(custId, type, platfrom, term.Trim());
                }

                foreach (CustAcnt acnt in list)
                {
                    auto_text.AutoData adata = new auto_text.AutoData();
                    adata.Text = acnt.AcntNO;
                    adata.Val  = acnt;
                    data.Add(adata);
                }
            }
            autxtAcntNO.Data = data;
        }
Пример #3
0
        private void autxtSodGoods_loadData(object sender, EventArgs e)
        {
            string term = autxtSodGoods.Term;

            List <auto_text.AutoData> data = new List <auto_text.AutoData>();

            if (term.Trim().Length > 0)
            {
                if (cboxNReseller.SelectedIndex == -1)
                {
                    return;
                }
                List <string>       addedGoods = GenAddedGoods();
                Customer            reseller   = cboxNReseller.SelectedItem as Customer;
                List <StockGoodsVO> list       = goodsManager.LoadSoldGoodsByKeyWords(term.Trim(), reseller.CID__PK);
                foreach (StockGoodsVO vo in list)
                {
                    if (addedGoods.Contains(vo.GID + "" + vo.OrderNO))
                    {
                        continue;
                    }
                    auto_text.AutoData adata = new auto_text.AutoData();
                    adata.Text = vo.GName + " [" + vo.Specs + " " + vo.OrderNO.Replace(ORDERNO_PREF.STOCK_OUT, "") + "]";
                    adata.Val  = vo;
                    data.Add(adata);
                }
            }
            autxtSodGoods.Data = data;
        }
Пример #4
0
        private void autxtNSupplyGoods_loadData(object sender, EventArgs e)
        {
            string term = autxtNSupplyGoods.Term;

            List <auto_text.AutoData> data = new List <auto_text.AutoData>();

            if (term.Trim().Length > 0)
            {
                if (cboxNSupplier.SelectedIndex == -1)
                {
                    return;
                }
                Customer     supplier   = cboxNSupplier.SelectedItem as Customer;
                List <int>   addedGoods = GenAddedGoods();
                List <Goods> list       = goodsManager.LoadDataByKeyWords(term.Trim(), supplier.CID__PK);
                foreach (Goods goods in list)
                {
                    if (addedGoods.Contains((int)goods.GID__PK))
                    {
                        continue;
                    }
                    auto_text.AutoData adata = new auto_text.AutoData();
                    adata.Text = goods.GName + " [" + goods.Specs + "]";
                    adata.Val  = goods;
                    data.Add(adata);
                }
            }
            autxtNSupplyGoods.Data = data;
        }
Пример #5
0
        private void autxtGoods_loadData(object sender, EventArgs e)
        {
            string term = autxtGoods.Term;
            List <auto_text.AutoData> data = new List <auto_text.AutoData> ();

            if (term.Trim().Length > 0)
            {
                List <Goods> list = goodsManager.LoadDataByKeyWords(term.Trim(), null);
                foreach (Goods goods in list)
                {
                    auto_text.AutoData adata = new auto_text.AutoData();
                    adata.Text = goods.GName + " [" + goods.Specs + "]";
                    adata.Val  = goods.GID__PK;
                    data.Add(adata);
                }
            }
            autxtGoods.Data = data;
        }