Exemple #1
0
 public void Add(RegisteredCourse type)
 {
     lock (type)
     {
         if (Count == RegisteredCourseId.Length)
         {
             var newLength           = RegisteredCourseId.Length + 1000;
             var _RegisteredCourseId = new string[newLength];
             RegisteredCourseId.CopyTo(_RegisteredCourseId);
             RegisteredCourseId = _RegisteredCourseId;
             var _RegistrationDate = new System.DateTime[newLength];
             RegistrationDate.CopyTo(_RegistrationDate);
             RegistrationDate = _RegistrationDate;
             var _StudentId = new string[newLength];
             StudentId.CopyTo(_StudentId);
             StudentId = _StudentId;
             var _Semester = new string[newLength];
             Semester.CopyTo(_Semester);
             Semester = _Semester;
             var _MountedCourseId = new string[newLength];
             MountedCourseId.CopyTo(_MountedCourseId);
             MountedCourseId = _MountedCourseId;
             var _AcademicYear = new string[newLength];
             AcademicYear.CopyTo(_AcademicYear);
             AcademicYear = _AcademicYear;
             var _Approved = new bool[newLength];
             Approved.CopyTo(_Approved);
             Approved = _Approved;
         }
         RegisteredCourseId.Span[Count] = type.RegisteredCourseId;
         RegistrationDate.Span[Count]   = type.RegistrationDate;
         StudentId.Span[Count]          = type.StudentId;
         Semester.Span[Count]           = type.Semester;
         MountedCourseId.Span[Count]    = type.MountedCourseId;
         AcademicYear.Span[Count]       = type.AcademicYear;
         Approved.Span[Count]           = type.Approved;
     }
 }
Exemple #2
0
 public void Add(StudentResult type)
 {
     lock (type)
     {
         if (Count == Date.Length)
         {
             var newLength = Date.Length + 1000;
             var _Date     = new System.DateTime[newLength];
             Date.CopyTo(_Date);
             Date = _Date;
             var _ExamResultId = new string[newLength];
             ExamResultId.CopyTo(_ExamResultId);
             ExamResultId = _ExamResultId;
             var _StudentId = new string[newLength];
             StudentId.CopyTo(_StudentId);
             StudentId = _StudentId;
             var _AcademicYear = new string[newLength];
             AcademicYear.CopyTo(_AcademicYear);
             AcademicYear = _AcademicYear;
             var _Semester = new string[newLength];
             Semester.CopyTo(_Semester);
             Semester = _Semester;
             var _Credit = new int[newLength];
             Credit.CopyTo(_Credit);
             Credit = _Credit;
             var _ProgramId = new string[newLength];
             ProgramId.CopyTo(_ProgramId);
             ProgramId = _ProgramId;
             var _Level = new string[newLength];
             Level.CopyTo(_Level);
             Level = _Level;
             var _RegisteredCourseId = new string[newLength];
             RegisteredCourseId.CopyTo(_RegisteredCourseId);
             RegisteredCourseId = _RegisteredCourseId;
             var _Grade = new string[newLength];
             Grade.CopyTo(_Grade);
             Grade = _Grade;
             var _GradePoint = new decimal[newLength];
             GradePoint.CopyTo(_GradePoint);
             GradePoint = _GradePoint;
             var _ClassMark = new decimal[newLength];
             ClassMark.CopyTo(_ClassMark);
             ClassMark = _ClassMark;
             var _ExamMark = new decimal[newLength];
             ExamMark.CopyTo(_ExamMark);
             ExamMark = _ExamMark;
             var _TotalMark = new decimal[newLength];
             TotalMark.CopyTo(_TotalMark);
             TotalMark = _TotalMark;
             var _Scoring = new bool[newLength];
             Scoring.CopyTo(_Scoring);
             Scoring = _Scoring;
             var _LecturerId = new string[newLength];
             LecturerId.CopyTo(_LecturerId);
             LecturerId = _LecturerId;
         }
         Date.Span[Count]               = type.Date;
         ExamResultId.Span[Count]       = type.ExamResultId;
         StudentId.Span[Count]          = type.StudentId;
         AcademicYear.Span[Count]       = type.AcademicYear;
         Semester.Span[Count]           = type.Semester;
         Credit.Span[Count]             = type.Credit;
         ProgramId.Span[Count]          = type.ProgramId;
         Level.Span[Count]              = type.Level;
         RegisteredCourseId.Span[Count] = type.RegisteredCourseId;
         Grade.Span[Count]              = type.Grade;
         GradePoint.Span[Count]         = type.GradePoint;
         ClassMark.Span[Count]          = type.ClassMark;
         ExamMark.Span[Count]           = type.ExamMark;
         TotalMark.Span[Count]          = type.TotalMark;
         Scoring.Span[Count]            = type.Scoring;
         LecturerId.Span[Count]         = type.LecturerId;
     }
 }