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); }
/// <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)); }
public DataEntityDTO CreateStandardPupilLogNote( Guid ID, string title, string noteText, Guid learnerID, Guid categoryID, Guid userID, bool pinned, int collectionCount, int referenceID, ExtensionDataObject extensionData) { DataEntityDTO.SimplePropertyDTOGuid IDProperty = new DataEntityDTO.SimplePropertyDTOGuid { Value = ID }; DataEntityDTO.SimplePropertyDTOString titleProperty = new DataEntityDTO.SimplePropertyDTOString { Value = title }; DataEntityDTO.SimplePropertyDTOString noteTextProperty = new DataEntityDTO.SimplePropertyDTOString { Value = noteText }; DataEntityDTO.SimplePropertyDTOBool pinnedProperty = new DataEntityDTO.SimplePropertyDTOBool { Value = pinned }; DataEntityDTO.SimplePropertyDTODateTime createdOnProperty = new DataEntityDTO.SimplePropertyDTODateTime { Value = DateTime.Now }; DataEntityDTO.SimplePropertyDTOGuid createdByProperty = new DataEntityDTO.SimplePropertyDTOGuid { Value = userID }; DataEntityDTO.ReferencePropertyDTO learnerProperty = new DataEntityDTO.ReferencePropertyDTO { EntityPrimaryKey = learnerID }; DataEntityDTO.ReferencePropertyDTO categoryProperty = new DataEntityDTO.ReferencePropertyDTO { EntityPrimaryKey = categoryID }; DataEntityDTO entity = new DataEntityDTO { EntityName = "PupilLogNoteStandard", Values = new Dictionary<string, DataEntityDTO.SimplePropertyDTO> { {"ID", IDProperty}, {"Title", titleProperty}, {"NoteText", noteTextProperty}, {"Pinned", pinnedProperty}, {"CreatedOn", createdOnProperty}, {"CreatedByUserId", createdByProperty}, {"Learner", learnerProperty}, {"PupilLogNoteCategory", categoryProperty} } }; return PupilDetails.EntitySettings(entity, ID, referenceID, extensionData); }