void dien_dl() { int m_kt; m_kt = dngaykt.DateTime.Month; QLThuebaoDomainContext db = new QLThuebaoDomainContext(); EntityQuery<khachhangDN> Query = db.GetKhachhangDNQuery(); if (checkEdit1.IsChecked == true) { LoadOperation<khachhangDN> Load = db.Load(Query.Where(p =>p.ngay_tl.Value.Month == m_kt).OrderBy(p => p.ngay_tl), lo => { gridControl1.ItemsSource = lo.Entities; this.Title = "Khách hàng là doanh nghiệp : " + lo.Entities.Count().ToString(); }, true); } else { LoadOperation<khachhangDN> Load = db.Load(Query.Where(p => p.ngay_tl.Value >= dngaybd.DateTime && p.ngay_tl.Value <= dngaykt.DateTime).OrderBy(p => p.ngay_tl), lo => { gridControl1.ItemsSource = lo.Entities; this.Title = "Khách hàng là doanh nghiệp : " + lo.Entities.Count().ToString(); }, true); } }