2022-07-04 22:17:38 +08:00
|
|
|
|
/*
|
|
|
|
|
* <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>
|
2022-07-06 15:40:27 +08:00
|
|
|
|
#include"Grade.h"
|
2022-07-06 16:42:53 +08:00
|
|
|
|
#include"BaseDAO.h"
|
2022-07-03 18:22:02 +08:00
|
|
|
|
|
2022-07-04 22:17:38 +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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ɾ<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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ɾ<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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ɾ<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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
|
|
|
|
|
2022-07-04 22:17:38 +08:00
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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);
|
2022-07-04 22:17:38 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* <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
|