Esempio n. 1
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="refId">The ID (GUID) of the learner.</param>
 ///<param name="personalInformation">Personal name, demographic, address, email, and phone information for this learner. CBDS: Mulitple</param>
 ///<param name="inCare">Information relating to whether the learner is "looked after" as defined by the Children Act 1989, which refers to children who are subject to care orders and those who are accommodated.</param>
 ///
 public LearnerPersonal( string refId, PersonalInformation personalInformation, InCare inCare )
     : base(Adk.SifVersion, LearnerDTD.LEARNERPERSONAL)
 {
     this.RefId = refId;
     this.PersonalInformation = personalInformation;
     this.InCare = inCare;
 }
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="refId">Note that the same GUID may be assigned to this person when they are also a learner (via LearnerPersonal) and/or a contact (via ContactPersonal).</param>
 ///<param name="localId">The locally-assigned identifier for this workforce member.</param>
 ///<param name="personalInformation">Personal name, demographic, address, email, and phone information for this person. CBDS: Mulitple</param>
 ///
 public WorkforcePersonal( string refId, string localId, PersonalInformation personalInformation )
     : base(Adk.SifVersion, WorkforceDTD.WORKFORCEPERSONAL)
 {
     this.RefId = refId;
     this.LocalId = localId;
     this.PersonalInformation = personalInformation;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="refId">The ID (GUID) of a person referenced as a contact. Note that this GUID may be the same GUID assigned to a LearnerPersonal and/or WorkforcePersonal object record.</param>
 ///<param name="personalInformation">Name, demographic, address, email, and phone information for a person acting as a contact.</param>
 ///
 public ContactPersonal( string refId, PersonalInformation personalInformation )
     : base(Adk.SifVersion, SchoolDTD.CONTACTPERSONAL)
 {
     this.RefId = refId;
     this.PersonalInformation = personalInformation;
 }
    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;
    }