コード例 #1
0
 private void HienThi()
 {
     dgvDTNam.DataSource = Bus.DT("SELECT YEAR(NgayXuat) AS NAM ,SUM(ThanhTien) AS DOANHTHU FROM dbo.HoaDonXuat INNER JOIN dbo.ChiTietHoaDonXuat ON ChiTietHoaDonXuat.MaHDX = HoaDonXuat.MaHoaDon WHERE TrangThai=N'Đã thanh toán' GROUP BY YEAR(NgayXuat)");
     dgvDTNam.AutoResizeColumns();
 }