SAS/GradeDAO.h

135 lines
3.5 KiB
C
Raw Normal View History

/*
*
*/
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"
2022-07-03 18:22:02 +08:00
/*
*
* @param connection
* @param grade
*/
2022-07-03 18:22:02 +08:00
void addGrade(_ConnectionPtr connection, Grade grade);
/*
*
* @param connection
* @param stuId
* @param courseId
*/
2022-07-03 18:22:02 +08:00
void deleteOnesGrade(_ConnectionPtr connection, string stuId,string courseId);
/*
*
* @param connection
* @param stuId
*/
2022-07-03 18:22:02 +08:00
void deleteGradeByStuId(_ConnectionPtr connection, string stuId);
/*
*
* @param connection
* @param courseId
*/
2022-07-03 18:22:02 +08:00
void deleteGradeByCourseId(_ConnectionPtr connection, string courseId);
/*
*
* @param connection
* @param stuId
* @param courseId
* @param grade
*/
2022-07-03 18:22:02 +08:00
void updateOnesGrade(_ConnectionPtr connection, string stuId, string courseId, string grade);
/*
*
* @param connection
* @param stuId
* @param courseId
* @return Grade* grade对象指针
*/
2022-07-04 00:31:52 +08:00
Grade* getOnesGrade(_ConnectionPtr connection, string stuId, string courseId);
/*
*
* @param connection
* @param stuId
* @return vector<Grade>* Grade对象为元素的vector数组指针
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByStuId(_ConnectionPtr connection, string stuId);
/*
*
* @param connection
* @param coursesId
* @return vector<Grade>* Grade对象为元素的vector数组指针
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByCourseId(_ConnectionPtr connection, string courseId);
/*
*
* @param connection
* @param stuClass
* @return vector<Grade>* Grade对象为元素的vector数组指针
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getGradeByStuClass(_ConnectionPtr connection, string stuClass);
/*
*
* @param connection
* @return vector<Grade>* Grade对象为元素的vector数组指针
*/
2022-07-04 00:31:52 +08:00
std::vector<Grade>* getAllGrade(_ConnectionPtr connection);
/*
*
* @param connection
* @param stuId
* @return double
*/
2022-07-04 00:31:52 +08:00
double getOnesAvgGrade(_ConnectionPtr connection, string stuId);
/*
*
* @param connection
* @param stuId
* @return double
*/
2022-07-04 00:31:52 +08:00
double getOnesAllGrade(_ConnectionPtr connection, string stuId);
/*
*
* @param connection
* @param stuClass
* @param courseName
* @return double
*/
2022-07-04 00:31:52 +08:00
double getClassAvgGrade(_ConnectionPtr connection, string stuClass, string courseName);
/*
*
* @param connection
* @param stuClass
* @param courseName
* @return double
*/
2022-07-04 00:31:52 +08:00
double getClassMaxGrade(_ConnectionPtr connection, string stuClass, string courseName);
/*
*
* @param connection
* @param stuClass
* @param courseName
* @return double
*/
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