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; }
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; }