//ham xoa DiemHP public bool XoaDiemHP(DiemHP dhp) { string sql = "delete DiemHP where maDK = @maDK"; SqlParameter[] sqlParameters = { new SqlParameter("@maDK", dhp.maDK) }; return(dal.myExecute(sql, sqlParameters)); }
//ham sua DiemHP public bool SuaDiemHP(DiemHP dhp) { string sql = "Update DiemHP set diemCC = @diemCC, diemTX = @diemTX, diemThi = @diemThi, diemHP = @diemHP, ghiChu = @ghiChu where maDK = @maDK"; SqlParameter[] sqlParameters = { new SqlParameter("@maDK", dhp.maDK), new SqlParameter("@diemCC", dhp.diemCC), new SqlParameter("@diemTX", dhp.diemTX), new SqlParameter("@diemThi", dhp.diemThi), new SqlParameter("@diemHP", dhp.diemHP), new SqlParameter("@ghiChu", dhp.ghiChu) }; return(dal.myExecute(sql, sqlParameters)); }
//ham them Diem HP public bool ThemDiemHP(DiemHP dhp) { string sql = "insert into DiemHP(maDK, diemCC, diemTX, diemThi, diemHP, ghiChu)" + "values (@maDK, @diemCC, @diemTX, @diemThi, @diemHP, @ghiChu)"; SqlParameter[] sqlParameters = { new SqlParameter("@maDK", dhp.maDK), new SqlParameter("@diemCC", dhp.diemCC), new SqlParameter("@diemTX", dhp.diemTX), new SqlParameter("@diemThi", dhp.diemThi), new SqlParameter("@diemHP", dhp.diemHP), new SqlParameter("@ghiChu", dhp.ghiChu) }; return(dal.myExecute(sql, sqlParameters)); }