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; } }
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; } }
public void Add(MountedCourse type) { lock (type) { if (Count == MountedCoureId.Length) { var newLength = MountedCoureId.Length + 1000; var _MountedCoureId = new string[newLength]; MountedCoureId.CopyTo(_MountedCoureId); MountedCoureId = _MountedCoureId; var _EnrollmentOption = new string[newLength]; EnrollmentOption.CopyTo(_EnrollmentOption); EnrollmentOption = _EnrollmentOption; var _Level = new string[newLength]; Level.CopyTo(_Level); Level = _Level; var _MaxLimit = new int[newLength]; MaxLimit.CopyTo(_MaxLimit); MaxLimit = _MaxLimit; var _MinLimit = new int[newLength]; MinLimit.CopyTo(_MinLimit); MinLimit = _MinLimit; var _Semester = new string[newLength]; Semester.CopyTo(_Semester); Semester = _Semester; var _AcademicYear = new string[newLength]; AcademicYear.CopyTo(_AcademicYear); AcademicYear = _AcademicYear; var _ProgramId = new string[newLength]; ProgramId.CopyTo(_ProgramId); ProgramId = _ProgramId; var _AssignedBy = new string[newLength]; AssignedBy.CopyTo(_AssignedBy); AssignedBy = _AssignedBy; var _Date = new System.DateTime[newLength]; Date.CopyTo(_Date); Date = _Date; var _CourseName = new string[newLength]; CourseName.CopyTo(_CourseName); CourseName = _CourseName; var _CourseCode = new string[newLength]; CourseCode.CopyTo(_CourseCode); CourseCode = _CourseCode; var _AssignedTo = new string[newLength]; AssignedTo.CopyTo(_AssignedTo); AssignedTo = _AssignedTo; var _Specialization = new string[newLength]; Specialization.CopyTo(_Specialization); Specialization = _Specialization; var _Category = new string[newLength]; Category.CopyTo(_Category); Category = _Category; var _Scoring = new bool[newLength]; Scoring.CopyTo(_Scoring); Scoring = _Scoring; var _Credit = new int[newLength]; Credit.CopyTo(_Credit); Credit = _Credit; } MountedCoureId.Span[Count] = type.MountedCoureId; EnrollmentOption.Span[Count] = type.EnrollmentOption; Level.Span[Count] = type.Level; MaxLimit.Span[Count] = type.MaxLimit; MinLimit.Span[Count] = type.MinLimit; Semester.Span[Count] = type.Semester; AcademicYear.Span[Count] = type.AcademicYear; ProgramId.Span[Count] = type.ProgramId; AssignedBy.Span[Count] = type.AssignedBy; Date.Span[Count] = type.Date; CourseName.Span[Count] = type.CourseName; CourseCode.Span[Count] = type.CourseCode; AssignedTo.Span[Count] = type.AssignedTo; Specialization.Span[Count] = type.Specialization; Category.Span[Count] = type.Category; Scoring.Span[Count] = type.Scoring; Credit.Span[Count] = type.Credit; Count++; } }