public void GetAllToGridView() { List <EL.HangHoa> listHangHoa = hangHoaBUS.ViewAll(); dataTable.Rows.Clear(); foreach (EL.HangHoa hanghoa in listHangHoa) { dataTable.Rows.Add(hanghoa.MaHang, hanghoa.TenHang, hanghoa.NoiChua, hanghoa.SoLuongHang, hanghoa.GiaHang); } dataGridView1.DataSource = dataTable; }