Exemplo n.º 1
0
        private void dtgvDsDDH_MouseClick(object sender, MouseEventArgs e)
        {
            lvwChiTietDDH.Items.Clear();
            int maDDH = Convert.ToInt32(dtgvDsDDH.SelectedCells[0].OwningRow.Cells["colMaDDH"].Value.ToString());
            ChiTietDonDatHangBUS        ctBUS     = new ChiTietDonDatHangBUS();
            List <ChiTietDonDatHangDTO> listCtDDH = ctBUS.LoadDsChiTietDDHtheoMaDDH(maDDH);

            foreach (ChiTietDonDatHangDTO item in listCtDDH)
            {
                ListViewItem lvi = new ListViewItem(item.Tenhh);
                lvi.SubItems.Add(item.Sl.ToString());
                lvi.SubItems.Add(item.Mahh.ToString());
                lvwChiTietDDH.Items.Add(lvi);
            }
        }