private void LoadDataToGridView()
        {
            var dbAllRented                 = dbRented.GetListRenteds();
            List <ReportCustomer> lst       = new List <ReportCustomer>();
            List <Customer>       customers = dbCustomer.GetCustomers();

            switch (cbx_ThongKeKH.SelectedIndex)
            {
            case 1:
                customers = customers.Where(x => dbAllRented.Find(rt => rt.IdCustomer == x.IdCustomer && rt.ExpectedReturnDate < DateTime.Today && rt.ActualReturnDate == null) != null).ToList();
                break;

            case 2:
                customers = customers.Where(x => dbAllRented.Find(rt => rt.IdCustomer == x.IdCustomer && rt != null && rt.StatusOnBill != null && rt.StatusOnBill.Equals(STATUS_UNPAID)) != null).ToList();
                break;
            }
            foreach (var item in customers)
            {
                int sodiathue = dbAllRented.Where(x => x.IdCustomer == item.IdCustomer && x.StatusOnBill == null).Count();
                lst.Add(new ReportCustomer {
                    Address = item.Address, CustomerName = item.CustomerName, idCustomer = item.IdCustomer, PhoneNumber = item.PhoneNumber, TotalDiskRent = sodiathue
                });
            }
            bindingCustomer.DataSource = lst;
        }
 /// <summary>
 /// Trả về cái list có return db join từ 3 bảng và thông tin của khách hahgnf đó
 /// </summary>
 /// <returns></returns>
 public static List<DiskInfoReturn> DBDiskReturn()
 {
     List<DiskInfoReturn> lst = new List<DiskInfoReturn>();
     CustomerBUL dbCustomer = new CustomerBUL();
     TitleBUL dbTitle = new TitleBUL();
     DiskBUL dbDisk = new DiskBUL();
     ListRentedBUL dbRented = new ListRentedBUL();
     var db = dbRented.GetListRenteds().Where(x => x.StatusOnBill == null)
         .Join(dbDisk.GetDisks(), rt => rt.IdDisk, d => d.IdDisk, (rt, d) => new { rt, d })
         .Join(dbTitle.GetTitles(), rtd => rtd.d.IdTitle, t => t.IdTitle, (rtd, t) => new { rtd, t })
         .Join(dbCustomer.GetCustomers(), rtdt => rtdt.rtd.rt.IdCustomer, c => c.IdCustomer, (rtdt, c) => new { rtdt, c });
     foreach (var item in db)
     {
         lst.Add(new DiskInfoReturn { Address = item.c.Address, CustomerName = item.c.CustomerName, ExpectedDate = (DateTime)item.rtdt.rtd.rt.ExpectedReturnDate, IdCustomer = (int)item.rtdt.rtd.rt.IdCustomer, IdDisk = (int)item.rtdt.rtd.rt.IdDisk, PhoneNumber = item.c.PhoneNumber, RentedDate = (DateTime)item.rtdt.rtd.rt.RentalDate, Title = item.rtdt.t.NameTitle,IdListRented=item.rtdt.rtd.rt.IdListRented });
     }
     return lst;
 }