Beispiel #1
0
        public List <GradeReport> GetListGradeReportBySection(int sectionID)
        {
            List <GradeReport> listGradeReports = new List <GradeReport>();
            OleDbCommand       cmd = dbconn.SqlCommand("SELECT * FROM grade_report WHERE section_id=?", sectionID);
            OleDbDataReader    rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                listGradeReports.Add(GradeReportReader.Read(ref rd));
            }
            return(listGradeReports);
        }
Beispiel #2
0
        public List <GradeReport> GetListAllGradeReports()
        {
            List <GradeReport> listGradeReports = new List <GradeReport>();
            OleDbCommand       cmd = dbconn.SqlCommand(
                "SELECT * FROM grade_report");

            OleDbDataReader rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                listGradeReports.Add(GradeReportReader.Read(ref rd));
            }
            return(listGradeReports);
        }
Beispiel #3
0
        public GradeReport GetGradeReport(int sectionID, string studentID)
        {
            OleDbCommand cmd = dbconn.SqlCommand(
                "SELECT * FROM grade_report WHERE section_id=? AND student_id=?",
                sectionID, studentID
                );
            OleDbDataReader rd          = cmd.ExecuteReader();
            GradeReport     gradeReport = null;

            while (rd.Read())
            {
                gradeReport = GradeReportReader.Read(ref rd);
            }

            return(gradeReport);
        }