private void Load_DSHS() { DataTable dta = new DataTable(); dta = ketnoi.loadDuLieu("SELECT p.MaHS AS 'Mã HS', p.TenHS AS 'Tên HS', p.Mon1 AS 'Môn 1', p.Mon2 AS 'Môn 2', p.Mon3 AS 'Môn 3', u.DiemUuTien AS 'Điểm Ưu Tiên', p.Mon1 + p.Mon2 + p.Mon3 + u.DiemUuTien AS 'Tổng Điểm', d.MaNganh AS 'Mã Ngành', d.TenNganh AS 'Tên Ngành', d.Diem AS 'Điểm chuẩn', n.ThuTuNV as 'Thứ tự NV' FROM dbo.PhieuBaoDiem AS p, dbo.DiemChuan AS d, dbo.NguyenVong AS n, dbo.DoUuTien AS u WHERE p.MaHS = n.MaHS AND p.MaHS = u.MaHS AND d.MaNganh = n.MaNganh AND p.Mon1 + p.Mon2 + p.Mon3 + u.DiemUuTien >= d.Diem"); Grid_DSHS.DataSource = dta; }
public void Load_DuLieu_DiemChuan() { DataTable dta = new DataTable(); dta = ketnoi.loadDuLieu("Select * From DiemChuan"); DataGridView_DiemChuan.DataSource = dta; Hienthi_Dulieu(); }
public void Load_NguyenVong() { DataTable dta = new DataTable(); dta = KetNoi.loadDuLieu("Select * From NguyenVong"); Grid_NguyenVong.DataSource = dta; Hienthi_Dulieu(); }
private void FrmDS_Load(object sender, EventArgs e) { DataTable dta = new DataTable(); dta = ketnoi.loadDuLieu("SELECT * FROM DSHS"); DSHS baocao = new DSHS(); baocao.SetDataSource(dta); CRV.ReportSource = baocao; }
private void btntimkiem_Click(object sender, EventArgs e) { DataTable data = new DataTable(); Grid_KQ.DataSource = null; if (radMaHS.Checked == true) { string sqlTK = "Select * From HocSinh where MaHS like '%" + txtMaHS.Text + "%'"; data = ketnoi.loadDuLieu(sqlTK); Grid_KQ.DataSource = data; } if (radCMTND.Checked == true) { string sqlTK = "Select * From HocSinh where CMND like '%" + txtCMTND.Text + "%'"; data = ketnoi.loadDuLieu(sqlTK); Grid_KQ.DataSource = data; } }