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;
        }
Example #2
0
 /// <summary>
 /// Sets the value of the <c>&lt;Country&gt;</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>&lt;Country&gt;</c> element.</summary>
 /// <param name="Value">Gets or sets the content value of the &amp;lt;Country&amp;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 ) );
 }
Example #4
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="value">Gets or sets the content value of the &amp;lt;Country&amp;gt; element</param>
 ///
 public Country( CountryCode value )
     : base(CommonDTD.COUNTRY)
 {
     this.SetValue( value );
 }
Example #5
0
 /// <summary>
 /// Sets the value of the <c>&lt;Value&gt;</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 &amp;lt;Country&amp;gt; element"</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void SetValue( CountryCode val )
 {
     SetField( CommonDTD.COUNTRY, val );
 }
Example #6
0
 /// <summary>
 /// Sets the value of the <c>&lt;CountryOfBirth&gt;</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 );
 }