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><AddressList></c> element.</summary> /// <param name="Address">An Address</param> ///<remarks> /// <para>This form of <c>setAddressList</c> is provided as a convenience method /// that is functionally equivalent to the <c>AddressList</c></para> /// <para>Version: 2.5</para> /// <para>Since: 2.3</para> /// </remarks> public void SetAddressList( Address Address ) { RemoveChild( StudentDTD.STUDENTSDTN_ADDRESSLIST); AddChild( StudentDTD.STUDENTSDTN_ADDRESSLIST, new AddressList( Address ) ); }
///<summary>Sets the value of the <c><AddressList></c> element.</summary> /// <param name="Address">An Address</param> ///<remarks> /// <para>This form of <c>setAddressList</c> is provided as a convenience method /// that is functionally equivalent to the <c>AddressList</c></para> /// <para>Version: 2.6</para> /// <para>Since: 2.3</para> /// </remarks> public void SetAddressList( Address Address ) { RemoveChild( CommonDTD.PERSONINFO_ADDRESSLIST); AddChild( CommonDTD.PERSONINFO_ADDRESSLIST, new AddressList( Address ) ); }
///<summary>Sets the value of the <c><AddressList></c> element.</summary> /// <param name="Address">An Address</param> ///<remarks> /// <para>This form of <c>setAddressList</c> is provided as a convenience method /// that is functionally equivalent to the <c>AddressList</c></para> /// <para>Version: 2.6</para> /// <para>Since: 2.3</para> /// </remarks> public void SetAddressList( Address Address ) { RemoveChild( SchoolDTD.SCHOOLINFO_ADDRESSLIST); AddChild( SchoolDTD.SCHOOLINFO_ADDRESSLIST, new AddressList( Address ) ); }
///<summary>Sets the value of the <c><AddressList></c> element.</summary> /// <param name="Address">An Address</param> ///<remarks> /// <para>This form of <c>setAddressList</c> is provided as a convenience method /// that is functionally equivalent to the <c>AddressList</c></para> /// <para>Version: 2.5</para> /// <para>Since: 2.3</para> /// </remarks> public void SetAddressList( Address Address ) { RemoveChild( StudentDTD.LEAINFO_ADDRESSLIST); AddChild( StudentDTD.LEAINFO_ADDRESSLIST, new AddressList( Address ) ); }