示例#1
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="code">The general ethnic category which reflects the individual's recognition of his or her community or with which the individual most identifies. England Values: Learner Ethnic Codes, Employee Ethniciy. Wales Values: EthnicCodes (Wales)</param>
 ///
 public Ethnicity( EthnicityCodes code )
     : base(CommonDTD.ETHNICITY)
 {
     this.SetCode( code );
 }
示例#2
0
 /// <summary>
 /// Sets the value of the <c>&lt;Code&gt;</c> element.
 /// </summary>
 /// <param name="val">A EthnicityCodes object</param>
 /// <remarks>
 /// <para>The SIF specification defines the meaning of this element as: "The general ethnic category which reflects the individual's recognition of his or her community or with which the individual most identifies. England Values: Learner Ethnic Codes, Employee Ethniciy. Wales Values: EthnicCodes (Wales)"</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.0</para>
 /// </remarks>
 public void SetCode( EthnicityCodes val )
 {
     SetField( CommonDTD.ETHNICITY_CODE, val );
 }
    private SifDataObject createPerson(string id,
                                       string lastName,
                                       string firstName,
                                       string number,
                                       string street,
                                       string locality,
                                       string town,
                                       string post,
                                       string phone,
                                       string gender,
                                       string grade,
                                       EthnicityCodes ethnicity,
                                       string birthDateyyyyMMdd)
    {
        SifDataObject person = createPersonObject(id);
        person.SetElementOrAttribute("@RefId", Adk.MakeGuid());

        Name name = new Name(NameType.CURRENT_LEGAL, firstName, lastName);
        PersonalInformation personal = new PersonalInformation(name);

        person.AddChild(CommonDTD.PERSONALINFORMATION, personal);

        AddressableObjectName aon = new AddressableObjectName();
        aon.StartNumber = number;
        Address address = new Address(AddressType.CURRENT, aon);
        address.Street = street;
        address.Locality = locality;
        address.Town = town;
        address.PostCode = post;
        address.SetCountry(CountryCode.GBR);
        personal.Address = address;

        personal.PhoneNumber = new PhoneNumber(PhoneType.HOME, phone);

        Demographics dem = new Demographics();
        dem.SetEthnicityList(new Ethnicity(ethnicity));
        dem.SetGender(Gender.Wrap(gender));
        try
        {
            dem.BirthDate = SifDate.ParseSifDateString(birthDateyyyyMMdd, SifVersion.SIF15r1);
        }
        catch (Exception pex)
        {
            Console.WriteLine(pex);
        }

        personal.Demographics = dem;

        return person;
    }
示例#4
0
 ///<summary>Adds the value of the <c>&lt;Ethnicity&gt;</c> element.</summary>
 /// <param name="Code">The general ethnic category which reflects the individual's recognition of his or her community or with which the individual most identifies. England Values: Learner Ethnic Codes, Employee Ethniciy. Wales Values: EthnicCodes (Wales)</param>
 ///<remarks>
 /// <para>This form of <c>setEthnicity</c> is provided as a convenience method
 /// that is functionally equivalent to the method <c>AddEthnicity</c></para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.0</para>
 /// </remarks>
 public void AddEthnicity(EthnicityCodes Code)
 {
     AddChild(CommonDTD.ETHNICITYLIST_ETHNICITY, new Ethnicity(Code));
 }
示例#5
0
 /// <summary>
 /// Sets the value of the <c>&lt;Code&gt;</c> element.
 /// </summary>
 /// <param name="val">A EthnicityCodes object</param>
 /// <remarks>
 /// <para>The SIF specification defines the meaning of this element as: "The general ethnic category which reflects the individual's recognition of his or her community or with which the individual most identifies. England Values: Learner Ethnic Codes, Employee Ethniciy. Wales Values: EthnicCodes (Wales)"</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.0</para>
 /// </remarks>
 public void SetCode(EthnicityCodes val)
 {
     SetField(CommonDTD.ETHNICITY_CODE, val);
 }
示例#6
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="code">The general ethnic category which reflects the individual's recognition of his or her community or with which the individual most identifies. England Values: Learner Ethnic Codes, Employee Ethniciy. Wales Values: EthnicCodes (Wales)</param>
 ///
 public Ethnicity(EthnicityCodes code) : base(CommonDTD.ETHNICITY)
 {
     this.SetCode(code);
 }