Esempio n. 1
0
        private void FrmAddLog_Load(object sender, EventArgs e)
        {
            bll      = BLLLoader.GetSaleLogBll();
            goodsbll = BLLLoader.GetGoodsBll();
            List <Goods> items = goodsbll.GetAllGoods();

            this.cmbGoods.DisplayMember = "Name";
            this.cmbGoods.ValueMember   = "Id";
            this.cmbGoods.DataSource    = items;
        }
Esempio n. 2
0
        private void loadData()
        {
            List <Goods> list = bll.GetAllGoods();

            foreach (Goods goods in list)
            {
                GoodsCategory cagtegory = catBll.GetCategory(goods.CategoryId);
                this.dgvList.Rows.Add(new String[] {
                    goods.Id.ToString(),
                    goods.Name,
                    cagtegory.Name,
                    goods.Sort.ToString()
                });
            }
        }