public int FSoBenhNhan(int idPhongKham, DateTime dt) { int kq = 0; foreach (CTDKPhongKham b in tc.getDSCTDKPhongKham().Where(x => x.PhieuDKKham.NgayLap.Value.Date == dt.Date)) { if (b.PhongKhamID == idPhongKham) { kq++; } } return(kq); }