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><Country></c> element. /// </summary> /// <param name="val">A CountryCode object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this element as: "The country code."</para> /// <para>Version: 2.5</para> /// <para>Since: 2.3</para> /// </remarks> public void SetCountry( CountryCode val ) { SetField( CommonDTD.ADDRESS_COUNTRY, val ); }
///<summary>Sets the value of the <c><Country></c> element.</summary> /// <param name="Value">Gets or sets the content value of the &lt;Country&gt; element</param> ///<remarks> /// <para>This form of <c>setCountry</c> is provided as a convenience method /// that is functionally equivalent to the <c>Country</c></para> /// <para>Version: 2.6</para> /// <para>Since: 2.4</para> /// </remarks> public void SetCountry( CountryCode Value ) { RemoveChild( LearningDTD.STANDARDSETTINGBODY_COUNTRY); AddChild( LearningDTD.STANDARDSETTINGBODY_COUNTRY, new Country( Value ) ); }
/// <summary> /// Constructor that accepts values for all mandatory fields /// </summary> ///<param name="value">Gets or sets the content value of the &lt;Country&gt; element</param> /// public Country( CountryCode value ) : base(CommonDTD.COUNTRY) { this.SetValue( value ); }
/// <summary> /// Sets the value of the <c><Value></c> element. /// </summary> /// <param name="val">A CountryCode object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this of the content as: "Gets or sets the content value of the &lt;Country&gt; element"</para> /// <para>Version: 2.6</para> /// <para>Since: 2.3</para> /// </remarks> public void SetValue( CountryCode val ) { SetField( CommonDTD.COUNTRY, val ); }
/// <summary> /// Sets the value of the <c><CountryOfBirth></c> element. /// </summary> /// <param name="val">A CountryCode object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this element as: "The person's country of birth."</para> /// <para>Version: 2.5</para> /// <para>Since: 2.3</para> /// </remarks> public void SetCountryOfBirth( CountryCode val ) { SetField( CommonDTD.DEMOGRAPHICS_COUNTRYOFBIRTH, val ); }