private void lbcLoaiHang_SelectedIndexChanged(object sender, EventArgs e) { if (lbcLoaiHang.SelectedValue != null) { if (lbcLoaiHang.SelectedValue.ToString() == "0") { grcHanghoaSearch.DataSource = HangHoaService.LoadDataTable(); } else { int maLoaiHang = int.Parse(lbcLoaiHang.SelectedValue.ToString()); grcHanghoaSearch.DataSource = HangHoaService.GetByLoaiHang(maLoaiHang); } } else { } }