private static StudentPersonal CreateStudent( String id, String lastName, String firstName, String street, String city, String state, CountryCode country, String post, String phone, Sex gender, YearLevelCode grade, String birthDateyyyyMMdd ) { StudentPersonal student = new StudentPersonal(); ; student.RefId = Adk.MakeGuid(); student.LocalId = id; PersonInfo stupersonal = new PersonInfo(); student.PersonInfo = stupersonal; // Set the Name Name name = new Name( NameType.LEGAL ); name.FamilyName = lastName; name.GivenName = firstName; stupersonal.Name = name; Address addr = new Address(); addr.SetType( AddressType.C0765_PHYSICAL_LOCATION ); addr.SetStreet( street ); addr.City = city; addr.StateProvince = state; addr.PostalCode = post; addr.Country = country.ToString(); stupersonal.AddressList = new AddressList( addr ); stupersonal.PhoneNumberList = new PhoneNumberList( new PhoneNumber( PhoneNumberType.PRIMARY, phone ) ); Demographics dem = new Demographics(); dem.SetSex( gender ); dem.BirthDate = DateTime.ParseExact ( birthDateyyyyMMdd, "yyyyMMdd", CultureInfo.InvariantCulture.DateTimeFormat ); stupersonal.Demographics = dem; return student; }
/// <summary> /// Sets the value of the <c><Sex></c> element. /// </summary> /// <param name="val">A Sex object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this element as: "Person's gender."</para> /// <para>Version: 2.6</para> /// <para>Since: 2.4</para> /// </remarks> public void SetSex( Sex val ) { SetField( AssessmentDTD.ASSESSMENTSTUDENTSNAPSHOT_SEX, val ); }
/// <summary> /// Sets the value of the <c><Sex></c> element. /// </summary> /// <param name="val">A Sex object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this element as: " /// 'Sex' is the distinction 'male' and 'female', as /// reported by the person"</para> /// <para>Version: 2.6</para> /// <para>Since: 2.3</para> /// </remarks> public void SetSex(Sex val) { SetField(CommonDTD.DEMOGRAPHICS_SEX, val); }
/// <summary> /// Sets the value of the <c><Sex></c> element. /// </summary> /// <param name="val">A Sex object</param> /// <remarks> /// <para>Version: 2.6</para> /// <para>Since: 2.6</para> /// </remarks> public void SetSex( Sex val ) { SetField( Sif3assessmentDTD.SIF3ASSESSMENTSTUDENTSNAPSHOT_SEX, val ); }
/// <summary> /// Sets the value of the <c><Sex></c> element. /// </summary> /// <param name="val">A Sex object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this element as: " /// 'Sex' is the distinction 'male' and 'female', as /// reported by the person"</para> /// <para>Version: 2.5</para> /// <para>Since: 2.3</para> /// </remarks> public void SetSex( Sex val ) { SetField( CommonDTD.DEMOGRAPHICS_SEX, val ); }