void loadMatHang(int idNganhHang)
        {
            ArrayList dataList = MatHangBUS.getAllMatHangFromNganhHang(idNganhHang);

            cbMatHang.Items.Clear();
            matHangList.Clear();
            cbMatHang.Text = "";

            foreach (MatHang matHang in dataList)
            {
                matHangList.Add(matHang);
                cbMatHang.Items.Add(matHang.tenMatHang);
            }
        }
Exemple #2
0
        void loadMatHang(int idNganhHang)
        {
            ArrayList dataList = MatHangBUS.getAllMatHangFromNganhHang(idNganhHang);

            lvMatHang.Items.Clear();
            matHangList.Clear();

            foreach (MatHang matHang in dataList)
            {
                matHangList.Add(matHang);
                string[]     row      = { matHang.tenMatHang, matHang.soLuong.ToString(), matHang.donGia.ToString() };
                ListViewItem viewItem = new ListViewItem(row);
                lvMatHang.Items.Add(viewItem);
            }
            btThemHang.Enabled = false;
        }