コード例 #1
0
 public void Add(EmergencyContact type)
 {
     lock (type)
     {
         if (Count == ParentId.Length)
         {
             var newLength = ParentId.Length + 1000;
             var _ParentId = new string[newLength];
             ParentId.CopyTo(_ParentId);
             ParentId = _ParentId;
             var _Name = new string[newLength];
             Name.CopyTo(_Name);
             Name = _Name;
             var _Occupation = new string[newLength];
             Occupation.CopyTo(_Occupation);
             Occupation = _Occupation;
             var _Address = new string[newLength];
             Address.CopyTo(_Address);
             Address = _Address;
             var _Region = new string[newLength];
             Region.CopyTo(_Region);
             Region = _Region;
             var _HomeTown = new string[newLength];
             HomeTown.CopyTo(_HomeTown);
             HomeTown = _HomeTown;
             var _Mobile = new string[newLength];
             Mobile.CopyTo(_Mobile);
             Mobile = _Mobile;
             var _Email = new string[newLength];
             Email.CopyTo(_Email);
             Email = _Email;
             var _StudentId = new string[newLength];
             StudentId.CopyTo(_StudentId);
             StudentId = _StudentId;
         }
         ParentId.Span[Count]   = type.ParentId;
         Name.Span[Count]       = type.Name;
         Occupation.Span[Count] = type.Occupation;
         Address.Span[Count]    = type.Address;
         Region.Span[Count]     = type.Region;
         HomeTown.Span[Count]   = type.HomeTown;
         Mobile.Span[Count]     = type.Mobile;
         Email.Span[Count]      = type.Email;
         StudentId.Span[Count]  = type.StudentId;
     }
 }
コード例 #2
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;
     }
 }
コード例 #3
0
        public void Add(Student student)
        {
            lock (student)
            {
                if (Count == StudentId.Length)
                {
                    var newLength  = StudentId.Length + 1000;
                    var _StudentId = new string[newLength];
                    StudentId.CopyTo(_StudentId);
                    StudentId = _StudentId;
                    var _IndexNumber = new string[newLength];
                    IndexNumber.CopyTo(_IndexNumber);
                    IndexNumber = _IndexNumber;
                    var _ReferenceNumber = new string[newLength];
                    ReferenceNumber.CopyTo(_ReferenceNumber);
                    ReferenceNumber = _ReferenceNumber;
                    var _Surname = new string[newLength];
                    Surname.CopyTo(_Surname);
                    Surname = _Surname;
                    var _Othernames = new string[newLength];
                    Othernames.CopyTo(_Othernames);
                    Othernames = _Othernames;
                    var _Title = new string[newLength];
                    Title.CopyTo(_Title);
                    Title = _Title;
                    var _Gender = new string[newLength];
                    Gender.CopyTo(_Gender);
                    Gender = _Gender;
                    var _MaritalStatus = new string[newLength];
                    MaritalStatus.CopyTo(_MaritalStatus);
                    MaritalStatus = _MaritalStatus;
                    var _DateofBirth = new string[newLength];
                    DateofBirth.CopyTo(_DateofBirth);
                    DateofBirth = _DateofBirth;
                    var _Disability = new bool[newLength];
                    Disability.CopyTo(_Disability);
                    Disability = _Disability;
                    var _Country = new string[newLength];
                    Country.CopyTo(_Country);
                    Country = _Country;
                    var _Region = new string[newLength];
                    Region.CopyTo(_Region);
                    Region = _Region;
                    var _HomeTown = new string[newLength];
                    HomeTown.CopyTo(_HomeTown);
                    HomeTown = _HomeTown;
                    var _Address1 = new string[newLength];
                    Address1.CopyTo(_Address1);
                    Address1 = _Address1;
                    var _Address2 = new string[newLength];
                    Address2.CopyTo(_Address2);
                    Address2 = _Address2;
                    var _Contact1 = new string[newLength];
                    Contact1.CopyTo(_Contact1);
                    Contact1 = _Contact1;
                    var _Contact2 = new string[newLength];
                    Contact2.CopyTo(_Contact2);
                    Contact2 = _Contact2;
                    var _PersonalEmail = new string[newLength];
                    PersonalEmail.CopyTo(_PersonalEmail);
                    PersonalEmail = _PersonalEmail;
                    var _UniversityEmail = new string[newLength];
                    UniversityEmail.CopyTo(_UniversityEmail);
                    UniversityEmail = _UniversityEmail;
                    var _ResidentialStatus = new string[newLength];
                    ResidentialStatus.CopyTo(_ResidentialStatus);
                    ResidentialStatus = _ResidentialStatus;
                    var _ProgramOfStudy = new string[newLength];
                    ProgramOfStudy.CopyTo(_ProgramOfStudy);
                    ProgramOfStudy = _ProgramOfStudy;
                    var _Specialization = new string[newLength];
                    Specialization.CopyTo(_Specialization);
                    Specialization = _Specialization;
                    var _ProgramStatus = new string[newLength];
                    ProgramStatus.CopyTo(_ProgramStatus);
                    ProgramStatus = _ProgramStatus;
                    var _Level = new string[newLength];
                    Level.CopyTo(_Level);
                    Level = _Level;
                    var _StudentType = new string[newLength];
                    StudentType.CopyTo(_StudentType);
                    StudentType = _StudentType;
                    var _EnrollmentOption = new string[newLength];
                    EnrollmentOption.CopyTo(_EnrollmentOption);
                    EnrollmentOption = _EnrollmentOption;
                    var _RegistrationStatus = new string[newLength];
                    RegistrationStatus.CopyTo(_RegistrationStatus);
                    RegistrationStatus = _RegistrationStatus;
                    var _DateOfEntry = new System.DateTime[newLength];
                    DateOfEntry.CopyTo(_DateOfEntry);
                    DateOfEntry = _DateOfEntry;
                    var _DateOfCompletion = new System.DateTime[newLength];
                    DateOfCompletion.CopyTo(_DateOfCompletion);
                    DateOfCompletion = _DateOfCompletion;
                    var _Results = new StudentResultDM[newLength];;
                    Results.CopyTo(_Results);
                    Results = _Results;
                    var _RegisteredCourses = new RegisteredCourseDM[newLength];
                    RegisteredCourses.CopyTo(_RegisteredCourses);
                    RegisteredCourses = _RegisteredCourses;
                    var _EmergencyContact = new EmergencyContactDM[newLength];
                    EmergencyContact.CopyTo(_EmergencyContact);
                    EmergencyContact = _EmergencyContact;
                    var _Owning = new bool[newLength];
                    //Owning.CopyTo(_Owning);
                    //Owning = _Owning;
                    //var _FeesBalance = new string[newLength];
                    //FeesBalance.CopyTo(_FeesBalance);
                    //FeesBalance = _FeesBalance;
                    var _PamentOption = new string[newLength];
                    PamentOption.CopyTo(_PamentOption);
                    PamentOption = _PamentOption;
                    var _DepartmentId = new string[newLength];
                    DepartmentId.CopyTo(_DepartmentId);
                    DepartmentId = _DepartmentId;
                    var _State = new int[newLength];
                    State.CopyTo(_State);
                    State = _State;
                }
                StudentId.Span[Count]          = student.StudentId;
                IndexNumber.Span[Count]        = student.IndexNumber;
                ReferenceNumber.Span[Count]    = student.ReferenceNumber;
                Surname.Span[Count]            = student.Surname;
                Othernames.Span[Count]         = student.Othernames;
                Title.Span[Count]              = student.Title;
                Gender.Span[Count]             = student.Gender;
                MaritalStatus.Span[Count]      = student.MaritalStatus;
                DateofBirth.Span[Count]        = student.DateofBirth;
                Disability.Span[Count]         = student.Disability;
                Country.Span[Count]            = student.Country;
                Region.Span[Count]             = student.Region;
                HomeTown.Span[Count]           = student.HomeTown;
                Address1.Span[Count]           = student.Address1;
                Address2.Span[Count]           = student.Address2;
                Contact1.Span[Count]           = student.Contact1;
                Contact2.Span[Count]           = student.Contact2;
                PersonalEmail.Span[Count]      = student.PersonalEmail;
                UniversityEmail.Span[Count]    = student.UniversityEmail;
                ResidentialStatus.Span[Count]  = student.ResidentialStatus;
                ProgramOfStudy.Span[Count]     = student.ProgramOfStudy;
                Specialization.Span[Count]     = student.Specialization;
                ProgramStatus.Span[Count]      = student.ProgramStatus;
                Level.Span[Count]              = student.Level;
                StudentType.Span[Count]        = student.StudentType;
                EnrollmentOption.Span[Count]   = student.EnrollmentOption;
                RegistrationStatus.Span[Count] = student.RegistrationStatus;
                DateOfEntry.Span[Count]        = student.DateOfEntry;
                DateOfCompletion.Span[Count]   = student.DateOfCompletion;

                //Owning.Span[Count] = student.Owning;
                //FeesBalance.Span[Count] = student.FeesBalance;
                PamentOption.Span[Count] = student.PamentOption;
                DepartmentId.Span[Count] = student.DepartmentId;
                State.Span[Count]++;
                Count++;

                Results.Span[Count] = new StudentResultDM(length);
                if (student.Results?.Count > 0)
                {
                    foreach (var t in student.Results)
                    {
                        Results.Span[Count].Add(t);
                    }
                }

                EmergencyContact.Span[Count] = new EmergencyContactDM(length);
                if (student.EmergencyContact?.Count > 0)
                {
                    foreach (var t in student.EmergencyContact)
                    {
                        EmergencyContact.Span[Count].Add(t);
                    }
                }

                RegisteredCourses.Span[Count] = new RegisteredCourseDM(length);
                if (student.RegisteredCourses?.Count > 0)
                {
                    foreach (var t in student.RegisteredCourses)
                    {
                        RegisteredCourses.Span[Count].Add(t);
                    }
                }
            }
        }
コード例 #4
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;
     }
 }