/// <summary> /// Initializes a new instance of the AverageSpecialtyReport class. /// </summary> /// <param name="factory"></param> public AverageSpecialtyReport(DaoFactory factory) { examDao = factory.GetExamDao(); resultDao = factory.GetResultDao(); groupDao = factory.GetGroupDao(); specialtyDao = factory.GetSpecialtyDao(); }
/// <summary> /// Initializes a new instance of the SessionResult class. /// </summary> /// <param name="factory"></param> public SessionResult(DaoFactory factory) { groupDao = factory.GetGroupDao(); subjectDao = factory.GetSubjectDao(); studentDao = factory.GetStudentDao(); examDao = factory.GetExamDao(); resultDao = factory.GetResultDao(); }
/// <summary> /// Gets the DAO result. /// </summary> /// <returns></returns> public override ResultDao GetResultDao() { if (resultDao == null) { resultDao = new ResultDao(connString); } return(resultDao); }
public void TestDelete() { ResultDao resultDao = factory.GetResultDao(); var results = resultDao.ReadAll(); int exCount = results.Count(); resultDao.DeleteById(3); int count = resultDao.ReadAll().Count(); Assert.AreEqual(exCount - 1, count); }
private static void InitializeResults() { ResultDao resultDao = factory.GetResultDao(); int studentId = 1; int groupsCount = groupNames.Length * countOfCourses * countOfSubgroups; for (int groupId = 1; groupId <= groupsCount; groupId++) { for (int student = 0; student < countOfStudents; student++) { for (int examId = groupId * countOfExams - (countOfExams - 1); examId <= countOfExams * groupsCount * countOfSessions; examId += countOfExams * groupsCount) { for (int exNum = 0; exNum < countOfExams; exNum++) { int mark = rand.Next(1, 11); Result result = new Result(studentId, examId + exNum, mark); resultDao.Create(result); } } studentId++; } } }
/// <summary> /// Initializes a new instance of the AverageExaminatorReport class. /// </summary> /// <param name="factory"></param> public AverageExaminatorReport(DaoFactory factory) { examDao = factory.GetExamDao(); resultDao = factory.GetResultDao(); examinatorDao = factory.GetExaminatorDao(); }
public ImageTask() { dao = new ResultDao(); }
/// <summary> /// Initializes a new instance of the AverageSubjectReport class. /// </summary> /// <param name="factory"></param> public AverageSubjectReport(DaoFactory factory) { examDao = factory.GetExamDao(); resultDao = factory.GetResultDao(); subjectDao = factory.GetSubjectDao(); }