SAS/GradeDAO.h

136 lines
3.2 KiB
C
Raw Permalink Normal View History

/*
* <EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
*/
2022-07-03 18:22:02 +08:00
#ifndef GRADE_DAO_H
#define GRADE_DAO_H
#import "c:\\Program Files\\Common Files\\System\\ado\\msado15.dll" no_namespace rename("EOF", "EndOfFile")
#include<iostream>
#include<vector>
#include"Grade.h"
#include"BaseDAO.h"
2022-07-03 18:22:02 +08:00
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param grade <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵijɼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
2022-07-03 18:22:02 +08:00
void addGrade(_ConnectionPtr connection, Grade grade);
/*
* ɾ<EFBFBD><EFBFBD>ij<EFBFBD>˵<EFBFBD>ij<EFBFBD>Ƴɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @param courseId <EFBFBD>γ̺<EFBFBD>
*/
2022-07-03 18:22:02 +08:00
void deleteOnesGrade(_ConnectionPtr connection, string stuId,string courseId);
/*
* ɾ<EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
*/
2022-07-03 18:22:02 +08:00
void deleteGradeByStuId(_ConnectionPtr connection, string stuId);
/*
* ɾ<EFBFBD><EFBFBD>ij<EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param courseId <EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>γ̵Ŀγ̺<EFBFBD>
*/
2022-07-03 18:22:02 +08:00
void deleteGradeByCourseId(_ConnectionPtr connection, string courseId);
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>˵<EFBFBD>ij<EFBFBD>Ƴɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @param courseId <EFBFBD>γ̺<EFBFBD>
* @param grade <EFBFBD>ɼ<EFBFBD>
*/
2022-07-03 18:22:02 +08:00
void updateOnesGrade(_ConnectionPtr connection, string stuId, string courseId, string grade);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD><EFBFBD>ij<EFBFBD>Ƴɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @param courseId <EFBFBD>γ̺<EFBFBD>
* @return Grade* grade<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2022-07-04 00:31:52 +08:00
Grade* getOnesGrade(_ConnectionPtr connection, string stuId, string courseId);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @return vector<Grade>* <EFBFBD><EFBFBD>Grade<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪԪ<EFBFBD>ص<EFBFBD>vector<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByStuId(_ConnectionPtr connection, string stuId);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>γ̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD><EFBFBD><EFBFBD>¼
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param coursesId <EFBFBD>γ̺<EFBFBD>
* @return vector<Grade>* <EFBFBD><EFBFBD>Grade<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪԪ<EFBFBD>ص<EFBFBD>vector<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByCourseId(_ConnectionPtr connection, string courseId);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD><EFBFBD><EFBFBD>¼
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuClass <EFBFBD>
* @return vector<Grade>* <EFBFBD><EFBFBD>Grade<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪԪ<EFBFBD>ص<EFBFBD>vector<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByStuClass(_ConnectionPtr connection, string stuClass);
/*
* <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>гɼ<EFBFBD><EFBFBD><EFBFBD>¼
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return vector<Grade>* <EFBFBD><EFBFBD>Grade<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪԪ<EFBFBD>ص<EFBFBD>vector<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getAllGrade(_ConnectionPtr connection);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>˵<EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @return double ƽ<EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
*/
2022-07-04 00:31:52 +08:00
double getOnesAvgGrade(_ConnectionPtr connection, string stuId);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>˵<EFBFBD><EFBFBD>ܳɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuId ѧ<EFBFBD><EFBFBD>
* @return double <EFBFBD>ܳɼ<EFBFBD>
*/
2022-07-04 00:31:52 +08:00
double getOnesAllGrade(_ConnectionPtr connection, string stuId);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>ij<EFBFBD>Ƶ<EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuClass <EFBFBD>
* @param courseName <EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD>
* @return double <EFBFBD>ij<EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
*/
2022-07-04 00:31:52 +08:00
double getClassAvgGrade(_ConnectionPtr connection, string stuClass, string courseName);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>ij<EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳ɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuClass <EFBFBD>
* @param courseName <EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD>
* @return double <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳ɼ<EFBFBD>
*/
2022-07-04 00:31:52 +08:00
double getClassMaxGrade(_ConnectionPtr connection, string stuClass, string courseName);
/*
* <EFBFBD><EFBFBD>ȡij<EFBFBD>ij<EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳɼ<EFBFBD>
* @param connection <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param stuClass <EFBFBD>
* @param courseName <EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD>
* @return double <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳɼ<EFBFBD>
*/
2022-07-04 00:31:52 +08:00
double getClassMinGrade(_ConnectionPtr connection, string stuClass, string courseName);
2022-07-03 18:22:02 +08:00
#endif // !GRADE_DAO_H