Esempio n. 1
0
 public void Top3SPMuaNhieuTrongThang(string condition)
 {
     dataGridView1.DataSource = bus.Top3MuaMonth("SELECT TOP(3) lk.TenLK As'Tên Sản Phẩm', SUM(ct.SoLuong) AS 'Số Lượng'" +
                                                 " FROM CT_HoaDonNhapHang ct, HoaDonNhapHang hd, LinhKien lk " +
                                                 "where ct.MaHDNH = hd.MaHDNH and lk.MaLK = ct.MaLK  and Month(hd.NgayLapHDNH) =" + condition + " " +
                                                 "GROUP BY lk.TenLK ORDER BY SUM(ct.SoLuong) DESC");
 }