Пример #1
0
        /// <summary>
        /// Create SEN Status entity
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="SENStatusID"></param>
        /// <param name="startDate"></param>
        /// <param name="learnerID"></param>
        /// <param name="collectionCount"></param>
        /// <param name="referenceID"></param>
        /// <param name="extensionData"></param>
        /// <returns></returns>
        public DataEntityDTO CreateSENStatus(Guid ID, Guid SENStatusID, string startDate, Guid learnerID, int referenceID, int collectionCount, ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid {
                Value = ID
            };
            DataEntityDTO.SimplePropertyDTODate StartDateProperty = new DataEntityDTO.SimplePropertyDTODate {
                Value = new Date {
                    internalDateTime = DateTime.Parse(startDate)
                }
            };
            DataEntityDTO.ReferencePropertyDTO senStatusProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = SENStatusID
            };

            DataEntityDTO.ReferencePropertyDTO LearnerProperty = new DataEntityDTO.ReferencePropertyDTO
            {
                EntityPrimaryKey    = learnerID,
                InternalReferenceID = (short?)collectionCount
            };

            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "LearnerSENStatus",
                Values     = new Dictionary <string, DataEntityDTO.SimplePropertyDTO>
                {
                    { "ID", IDProperty },
                    { "StartDate", StartDateProperty },
                    { "Learner", LearnerProperty },
                    { "SENStatus", senStatusProperty }
                }
            };


            return(DataExchangeDetail.EntitySettings(entity, ID, referenceID, extensionData));
        }
Пример #2
0
        /// <summary>
        /// Create learner yeargroup Data entity
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="learnerId"></param>
        /// <param name="startDate"></param>
        /// <param name="yeargroup"></param>
        /// <param name="collectionCount"></param>
        /// <param name="referenceID"></param>
        /// <param name="extensionData"></param>
        /// <returns></returns>
        public DataEntityDTO CreateLearnerYearGroup(Guid ID, Guid learnerId, string startDate, Guid yeargroup, int referenceID, int collectionCount, ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid {
                Value = ID
            };
            DataEntityDTO.SimplePropertyDTODate StartDateProperty = new DataEntityDTO.SimplePropertyDTODate {
                Value = new Date {
                    internalDateTime = DateTime.Parse(startDate)
                }
            };
            DataEntityDTO.ReferencePropertyDTO yearGroupProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = yeargroup
            };

            DataEntityDTO.ReferencePropertyDTO LearnerProperty = new DataEntityDTO.ReferencePropertyDTO
            {
                EntityPrimaryKey    = learnerId,
                InternalReferenceID = (short?)collectionCount
            };

            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "LearnerYearGroupMembership",
                Values     = new Dictionary <string, DataEntityDTO.SimplePropertyDTO>
                {
                    { "ID", IDProperty },
                    { "StartDate", StartDateProperty },
                    { "Learner", LearnerProperty },
                    { "YearGroup", yearGroupProperty }
                }
            };

            return(DataExchangeDetail.EntitySettings(entity, ID, referenceID, extensionData));
        }
Пример #3
0
        public DataEntityDTO CreatePupil(
            Guid ID, 
            string legalForename, 
            string legalSurname, 
            Date dateOfBirth,
            Guid genderID,
            Guid schoolID, 
            int referenceID, 
            ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid { Value = ID };
            DataEntityDTO.SimplePropertyDTOString legalForenameProperty = new DataEntityDTO.SimplePropertyDTOString { Value = legalForename };
            DataEntityDTO.SimplePropertyDTOString legalSurnameProperty = new DataEntityDTO.SimplePropertyDTOString { Value = legalSurname };
            DataEntityDTO.SimplePropertyDTODate dateOfBirthProperty = new DataEntityDTO.SimplePropertyDTODate { Value = dateOfBirth };
            DataEntityDTO.ReferencePropertyDTO schoolProperty = new DataEntityDTO.ReferencePropertyDTO { EntityPrimaryKey = schoolID };
            DataEntityDTO.ReferencePropertyDTO genderProperty = new DataEntityDTO.ReferencePropertyDTO { EntityPrimaryKey = genderID };
            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "Learner",
                Values = new Dictionary<string, DataEntityDTO.SimplePropertyDTO>
                {
                    {"ID", IDProperty},
                    {"LegalForename", legalForenameProperty},
                    {"LegalSurname", legalSurnameProperty},
                    {"DateOfBirth", dateOfBirthProperty},
                    {"Gender", genderProperty},
                    {"School", schoolProperty}
                }
            };

            return PupilDetails.EntitySettings(entity, ID, referenceID, extensionData);
        }
Пример #4
0
        /// <summary>
        /// Create pupil data
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="legalForename"></param>
        /// <param name="legalSurname"></param>
        /// <param name="dateOfBirth"></param>
        /// <param name="genderID"></param>
        /// <param name="UPN"></param>
        /// <param name="admissionNo"></param>
        /// <param name="schoolID"></param>
        /// <param name="referenceID"></param>
        /// <param name="extensionData"></param>
        /// <returns></returns>
        public DataEntityDTO CreatePupil(Guid ID, string legalForename, string legalSurname, string dateOfBirth, Guid genderID, Guid yeargroupID, string UPN, string admissionNo, Guid schoolID, int referenceID, ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid {
                Value = ID
            };
            DataEntityDTO.SimplePropertyDTOString legalForenameProperty = new DataEntityDTO.SimplePropertyDTOString {
                Value = legalForename
            };
            DataEntityDTO.SimplePropertyDTOString legalSurnameProperty = new DataEntityDTO.SimplePropertyDTOString {
                Value = legalSurname
            };
            DataEntityDTO.SimplePropertyDTODate dateOfBirthProperty = new DataEntityDTO.SimplePropertyDTODate {
                Value = new Date {
                    internalDateTime = DateTime.Parse(dateOfBirth)
                }
            };
            DataEntityDTO.ReferencePropertyDTO schoolProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = schoolID
            };
            DataEntityDTO.ReferencePropertyDTO genderProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = genderID
            };
            DataEntityDTO.ReferencePropertyDTO yeargroupProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = yeargroupID
            };
            DataEntityDTO.SimplePropertyDTOString admissionNoProperty = new DataEntityDTO.SimplePropertyDTOString {
                Value = admissionNo
            };
            DataEntityDTO.SimplePropertyDTOString UPNProperty = new DataEntityDTO.SimplePropertyDTOString {
                Value = UPN
            };

            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "Learner",
                Values     = new Dictionary <string, DataEntityDTO.SimplePropertyDTO>
                {
                    { "ID", IDProperty },
                    { "LegalForename", legalForenameProperty },
                    { "LegalSurname", legalSurnameProperty },
                    { "DateOfBirth", dateOfBirthProperty },
                    { "AdmissionNumber", admissionNoProperty },
                    { "UPN", UPNProperty },
                    { "Gender", genderProperty },
                    { "School", schoolProperty },
                    { "YearGroup", yeargroupProperty }
                }
            };

            return(DataExchangeDetail.EntitySettings(entity, ID, referenceID, extensionData));
        }
Пример #5
0
        /// <summary>
        /// Create enrolment details for pupil
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="learnerId"></param>
        /// <param name="startDate"></param>
        /// <param name="leavingDate"></param>
        /// <param name="schoolId"></param>
        /// <param name="referenceID"></param>
        /// <param name="collectionCount"></param>
        /// <param name="extensionData"></param>
        /// <returns></returns>
        public DataEntityDTO CreateLearnerEnrolment(Guid ID, Guid learnerId, string startDate, string leavingDate, Guid schoolId, int referenceID, int collectionCount, ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid {
                Value = ID
            };
            DataEntityDTO.SimplePropertyDTODate StartDateProperty = new DataEntityDTO.SimplePropertyDTODate {
                Value = new Date {
                    internalDateTime = DateTime.Parse(startDate)
                }
            };
            DataEntityDTO.ReferencePropertyDTO schoolProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = schoolId
            };


            DataEntityDTO.ReferencePropertyDTO LearnerProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = learnerId
            };

            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "LearnerEnrolment",
                Values     = new Dictionary <string, DataEntityDTO.SimplePropertyDTO>
                {
                    { "ID", IDProperty },
                    { "DOA", StartDateProperty },
                    { "Learner", LearnerProperty },
                    { "School", schoolProperty }
                }
            };

            if (string.IsNullOrEmpty(leavingDate))
            {
                return(DataExchangeDetail.EntitySettings(entity, ID, referenceID, extensionData));
            }
            DataEntityDTO.SimplePropertyDTODate DOLProperty = new DataEntityDTO.SimplePropertyDTODate
            {
                Value = new Date {
                    internalDateTime = DateTime.Parse(leavingDate)
                }
            };
            entity.Values.Add("DOL", DOLProperty);

            return(DataExchangeDetail.EntitySettings(entity, ID, referenceID, extensionData));
        }
Пример #6
0
        /// <summary>
        /// Create enrolment details for pupil
        /// </summary>
        /// <param name="id"></param>
        /// <param name="learnerEnrolmentId"></param>
        /// <param name="enrolmentStatusID"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="referenceID"></param>
        /// <param name="collectionCount"></param>
        /// <param name="extensionData"></param>
        /// <returns></returns>

        public DataEntityDTO CreateLearnerEnrolmentStatus(Guid id, Guid learnerEnrolmentId, Guid enrolmentStatusID, string startDate, string endDate, int referenceID, int collectionCount, ExtensionDataObject extensionData)
        {
            DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid {
                Value = id
            };
            DataEntityDTO.SimplePropertyDTODate StartDateProperty = new DataEntityDTO.SimplePropertyDTODate {
                Value = new Date {
                    internalDateTime = DateTime.Parse(startDate)
                }
            };
            DataEntityDTO.ReferencePropertyDTO learnerEnrolmentProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = learnerEnrolmentId
            };


            DataEntityDTO.ReferencePropertyDTO enrolmentStatusProperty = new DataEntityDTO.ReferencePropertyDTO {
                EntityPrimaryKey = enrolmentStatusID
            };

            DataEntityDTO entity = new DataEntityDTO
            {
                EntityName = "LearnerEnrolmentStatus",
                Values     = new Dictionary <string, DataEntityDTO.SimplePropertyDTO>
                {
                    { "ID", IDProperty },
                    { "StartDate", StartDateProperty },
                    { "LearnerEnrolment", learnerEnrolmentProperty },
                    { "EnrolmentStatus", enrolmentStatusProperty }
                }
            };

            if (string.IsNullOrEmpty(endDate))
            {
                return(DataExchangeDetail.EntitySettings(entity, id, referenceID, extensionData));
            }
            DataEntityDTO.SimplePropertyDTODate endDateProperty = new DataEntityDTO.SimplePropertyDTODate
            {
                Value = new Date {
                    internalDateTime = DateTime.Parse(endDate)
                }
            };
            entity.Values.Add("EndDate", endDateProperty);

            return(DataExchangeDetail.EntitySettings(entity, id, referenceID, extensionData));
        }