private static ReferenceType CreateReferenceType() { ReferenceType r = new ReferenceType(); r.Comments = "Commentaar"; r.ContactMethod = new List <ContactMethodType>(); ContactMethodType m = CreateContactMethodType(); r.ContactMethod.Add(m); var personName = new PersonNameType(); SetName(personName, "", "Jansen", "Jan", "Jan"); r.PersonName = personName; r.PositionTitle = "PositionTitle"; //<xsd:enumeration value="Professional"/> //<xsd:enumeration value="Personal"/> //<xsd:enumeration value="Verification"/> r.type = "Personal"; return(r); }
private static EmpContactInfoType CreateEmpContactInfoType() { EmpContactInfoType e = new EmpContactInfoType(); e.ContactMethod = new List <ContactMethodType>(); ContactMethodType m = CreateContactMethodType(); e.ContactMethod.Add(m); e.contactType = "Contacttype"; e.InternetDomainName = new List <InternetDomainNameType>(); InternetDomainNameType i = CreateInternetDomainNameType(); e.InternetDomainName.Add(i); e.LocationSummary = CreateEmploymentLocationSummaryType(); var personName = new PersonNameType(); SetName(personName, "", "Jansen", "Jan", "Jan"); e.PersonName = personName; return(e); }
private static ContactMethodType CreateContactMethodType() { ContactMethodType m = new ContactMethodType(); m.Mobile = CreateMobileNumber("0612312452", TelcomItemsChoiceType.FormattedNumber); m.Telephone = CreateNumber("0306561563", TelcomItemsChoiceType.FormattedNumber); m.Fax = CreateNumber("0306561563", TelcomItemsChoiceType.FormattedNumber); m.InternetEmailAddress = "*****@*****.**"; m.InternetWebAddress = "http://www.nocore.nl"; m.PostalAddress = new PostalAddressType(); m.PostalAddress.CountryCode = "NL"; m.PostalAddress.DeliveryAddress = new PostalAddressTypeDeliveryAddress(); m.PostalAddress.DeliveryAddress.AddressLine.Add("straat 1"); m.PostalAddress.DeliveryAddress.AddressLine.Add("1111 AA"); m.PostalAddress.DeliveryAddress.AddressLine.Add("Uden"); m.PostalAddress.DeliveryAddress.BuildingNumber = "1"; m.PostalAddress.DeliveryAddress.PostOfficeBox = "1234 BB"; m.PostalAddress.DeliveryAddress.StreetName = "Straat 1"; m.PostalAddress.DeliveryAddress.Unit = "Unit"; m.PostalAddress.Municipality = "Uden"; m.PostalAddress.PostalCode = "1111 AA"; m.PostalAddress.type = PostalAddressTypeType.streetAddress; m.PostalAddress.typeSpecified = true; return(m); }
public static String Generate(ContactMethodType method) { switch (method) { case ContactMethodType.Email: return(Guid.NewGuid().ToString().Replace("-", "")); case ContactMethodType.Mobile: return(GenerateMobileCode()); default: return(null); } }
private static SEPContactInfoType CreateSEPContactInfoType() { SEPContactInfoType c = new SEPContactInfoType(); c.ContactMethod = new List <ContactMethodType>(); ContactMethodType m = CreateContactMethodType(); c.ContactMethod.Add(m); var personName = new PersonNameType(); SetName(personName, "", "Jansen", "Jan", "Jan"); c.PersonName = personName; return(c); }
public ContactMethod(ContactMethodType contactMethodType) { ContactMethodType = contactMethodType; }
private static void DoHumanResource() { HumanResourceType humanResource; EntityIdType entityIDFlex2GO; EntityIdTypeIdValue entityIdTypeIdFlex2GO; EntityIdType entityIDNocore; EntityIdTypeIdValue entityIdTypeIdNocore; // aanmaken hoofdelement. humanResource = new HumanResourceType(); // referenceInformation hebben we zo ook nodig humanResource.ReferenceInformation = new HumanResourceTypeReferenceInformation(); // resourceInformation hebben we zo ook nodig. humanResource.ResourceInformation = new HumanResourceTypeResourceInformation(); // profielinformatie zoals beschikbaarheden hebben we zo ook nodig humanResource.Profile = new HumanResourceTypeProfile(); // userArea, die we gaan gebruiken voor eigen gegevens en setu aanvullingen humanResource.UserArea = new UserAreaType(); // voorkeuren, leeg element. humanResource.Preferences = new HumanResourceTypePreferences(); #region Status humanResource.HumanResourceStatus = new HumanResourceTypeHumanResourceStatus(); // nieuwe medewerker humanResource.HumanResourceStatus.status = KnownStatusType.New; #endregion #region Identifier van HumanResource in Flex2GO // maken van eigen identifier Flex2GO entityIDFlex2GO = new EntityIdType(); // wij zijn eigenaar entityIDFlex2GO.idOwner = "Flex2GO"; // waardeobject entityIdTypeIdFlex2GO = new EntityIdTypeIdValue(); // Flex2GO gebruikt guids entityIdTypeIdFlex2GO.Value = "F020D955-A2A8-4371-A57F-BB9E5012CEDD"; // toevoegen waarde object aan entityId object entityIDFlex2GO.IdValue.Add(entityIdTypeIdFlex2GO); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Flex2GO humanResource.HumanResourceId.Add(entityIDFlex2GO); #endregion #region Identifier van HumanResource in Nocore // maken van eigen identifier Nocore entityIDNocore = new EntityIdType(); // wij zijn eigenaar entityIDNocore.idOwner = "SEDIS"; // waardeobject entityIdTypeIdNocore = new EntityIdTypeIdValue(); // Nocore gebruikt integers, personeelsnummer entityIdTypeIdNocore.Value = "12345"; // toevoegen waarde object aan entityId object entityIDNocore.IdValue.Add(entityIdTypeIdNocore); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Nocore humanResource.HumanResourceId.Add(entityIDNocore); #endregion #region Identifier Bedrijf Flex2GO = StaffingSupplier indien van Flex2GO naar Nocore // maken van eigen identifier Flex2GO EntityIdType entityIDBedrijfFlex2GO = new EntityIdType(); // waardeobject EntityIdTypeIdValue entityIdTypeIdBedrijfFlex2GO = new EntityIdTypeIdValue(); // Flex2GO gebruikt guids, guid van het Bedrijf in Flex2GO entityIdTypeIdBedrijfFlex2GO.Value = "0F14A513-BC2A-4F44-9EBC-5EDA5CF58BDC"; // toevoegen waarde object aan entityId object entityIDBedrijfFlex2GO.IdValue.Add(entityIdTypeIdBedrijfFlex2GO); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Flex2GO humanResource.ReferenceInformation.StaffingSupplierId.Add(entityIDBedrijfFlex2GO); #endregion #region Identifier Administratie Nocore = StaffingCustomer indien van Flex2GO naar Nocore // maken van eigen identifier Nocore EntityIdType entityIDAdministratieNocore = new EntityIdType(); // waardeobject EntityIdTypeIdValue entityIdTypeIdAdministratieNocore = new EntityIdTypeIdValue(); // Nocore gebruikt integers, administratienummer entityIdTypeIdAdministratieNocore.Value = "1"; // toevoegen waarde object aan entityId object entityIDAdministratieNocore.IdValue.Add(entityIdTypeIdAdministratieNocore); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Nocore humanResource.ReferenceInformation.StaffingCustomerId.Add(entityIDAdministratieNocore); #endregion #region PersonName structuur // nieuw HR-XML naam object PersonNameType name = new PersonNameType(); // zet de naam op het HR-XML object in subroutine SetName(name, "de", "Vries", "Jan de Vries", "Jan"); // stop de personname op de resourceInformation humanResource.ResourceInformation.PersonName = name; #endregion #region ContactInfo // nieuw HR-XML contactInfo object EntityContactInfoType entityContactInfo = new EntityContactInfoType(); // gelijk aan formattedname bij ons entityContactInfo.EntityName = "Jan de Vries"; // zet contactinformatie en voeg die toe aan contactInfo object ContactMethodType contactInfo = new ContactMethodType(); contactInfo.Mobile = CreateMobileNumber("0612332230", TelcomItemsChoiceType.FormattedNumber); contactInfo.Telephone = CreateNumber("0306561563", TelcomItemsChoiceType.FormattedNumber); contactInfo.InternetEmailAddress = "*****@*****.**"; entityContactInfo.ContactMethod.Add(contactInfo); humanResource.ResourceInformation.EntityContactInfo = entityContactInfo; #endregion #region Adres // nieuw HR-XML adres object PostalAddressType postalAddress = new PostalAddressType(); // landcode van Nederland in ISO2 postalAddress.CountryCode = "NL"; // nieuw HR-XML PostalAddressTypeDeliveryAddress object PostalAddressTypeDeliveryAddress deliveryAddress = new PostalAddressTypeDeliveryAddress(); // eigenschappen op object plakken deliveryAddress.StreetName = "Groeneweg"; deliveryAddress.BuildingNumber = "21"; deliveryAddress.Unit = "Z"; deliveryAddress.AddressLine.Add("Groeneweg 21Z"); postalAddress.DeliveryAddress = deliveryAddress; postalAddress.PostalCode = "3981 CK"; // type = streetAddress = Huisadres postalAddress.type = PostalAddressTypeType.streetAddress; postalAddress.typeSpecified = true; // zet adres op ResourceInformation object humanResource.ResourceInformation.PostalAddress = postalAddress; #endregion #region Profile // reisafstand in kilometers HumanResourceTypePreferencesCommute commute = new HumanResourceTypePreferencesCommute(); commute.DistanceMax = "100"; humanResource.Preferences.Commute = commute; #endregion #region HumanResourceAdditionalNL HumanResourceAdditionalNLType humanResourceAdditionalNL = new HumanResourceAdditionalNLType(); //geslacht humanResourceAdditionalNL.Sex = SexType.male; humanResourceAdditionalNL.SexSpecified = true; // geboortedatum humanResourceAdditionalNL.BirthDate = new DateTime(1981, 07, 24); humanResourceAdditionalNL.BirthDateSpecified = true; // aanmaken idDocument en vervaldatum IdentificationDocumentType idDocument = new IdentificationDocumentType(); EffectiveDateType effictiveDate = new EffectiveDateType(); // vervaldatum effictiveDate.ValidTo = new DateTime(2015, 01, 10); effictiveDate.ValidToSpecified = true; idDocument.EffectiveDate = effictiveDate; // formaat en nummer idDocument.Format = "Paspoort"; idDocument.Id = "123456789"; humanResourceAdditionalNL.IdentificationDocument = idDocument; // toewijzen humanresourceAdditionalNL deel aan de humanResource humanResource.UserArea.HumanResourceAdditionalNL = humanResourceAdditionalNL; humanResource.UserArea.HumanResourceAdditionalNLSpecified = true; #endregion #region Nocore specifieke data NocoreHumanResourceType nocoreHumanResource = new NocoreHumanResourceType(); // intercedent nocoreHumanResource.AccountManager = "Piet Intercedent"; nocoreHumanResource.BankAccountInfo = new BankAccountInfoType(); nocoreHumanResource.BankAccountInfo.BankAccountForeign = "569759943"; nocoreHumanResource.Status = "Uit dienst"; // twee fase periodes, fase 1 en fase 2A FasePeriodType periode1 = new FasePeriodType(); periode1.Fase = "1"; periode1.From = new DateTime(2008, 01, 01); periode1.To = new DateTime(2008, 06, 30); periode1.ToSpecified = true; nocoreHumanResource.FaseHistorie.Add(periode1); FasePeriodType periode2 = new FasePeriodType(); periode2.Fase = "2A"; periode2.From = new DateTime(2008, 07, 01); periode2.ToSpecified = false; nocoreHumanResource.FaseHistorie.Add(periode2); // initialen, met puntjes ertussen nocoreHumanResource.Initials = "J."; // nocore vestiging nocoreHumanResource.Location = new NocoreLocationType(); nocoreHumanResource.Location.Code = "1"; nocoreHumanResource.Location.Name = "Hoofdvestiging"; // samenwonend nocoreHumanResource.MaritalStatus = "Gehuwd"; // nationaliteit nocoreHumanResource.Nationality = new NationalityType(); nocoreHumanResource.Nationality.GBACode = "1"; nocoreHumanResource.Nationality.Name = "Nederlandse"; // mutatiedatum nocoreHumanResource.Modified = DateTime.Now; humanResource.UserArea.NocoreHumanResource = nocoreHumanResource; humanResource.UserArea.NocoreHumanResourceSpecified = true; #endregion // serializen, valideren, en opslaan in bestand. Zie EntityBase voor meer informatie van de basisklasse humanResource.SaveToFile("HumanResource.xml"); // En weer laden uit bestand. HumanResourceType loadedHumanResource = EntityBase <HumanResourceType> .LoadFromFile("HumanResource.xml"); // druk naam af in de console. Console.WriteLine(loadedHumanResource.ResourceInformation.PersonName.FormattedName); }
public static ContactMethodTypeDto ToDto(this ContactMethodType entity) { Init(); return(Mapper.Map <ContactMethodTypeDto>(entity)); }
public async Task <ResponseModel <UserModel> > VerifyContactAsync(Guid userId, ContactMethodType method, string userSubmittedVerificationCode) { var rs = await this.QueryUser(userId, IncludeOptions.Entities); if (rs.Code == ResponseCode.NoData) { return(ResponseModel <UserModel> .Error(ResponseCode.InvalidCredentials)); } if (rs.Code != ResponseCode.Ok) { return(ResponseModel <UserModel> .Error(rs.Code, rs.Message)); } UserComposite composite = rs.Data[0]; switch (method) { case ContactMethodType.Email: if (composite.User.EmailVerification == null) { break; } else if (composite.User.EmailVerification.ExpiresAt < DateTime.UtcNow) { return(ResponseModel <UserModel> .Error(ResponseCode.EmailVerificationCodeExpired)); } else if (composite.User.EmailVerification.Code != userSubmittedVerificationCode) { return(ResponseModel <UserModel> .Error(ResponseCode.InvalidEmailVerificationCode)); } else { composite.UserEntity.User.Verified(method); // update the entity // send it back to table storage with the updates var rsUpdate = await this.UpdateEntity <UserEntity>(composite.UserEntity); } break; default: break; } return(ResponseModel <UserModel> .Success(composite.UserEntity.User)); }
private static void DoStaffingOrganization() { StaffingOrganizationType staffingOrganization = new StaffingOrganizationType(); // type organisatie, pattern extensie dus vrij, maar Customer, Intermediary en Supplier zijn gedefinieerd. staffingOrganization.typeOfOrganization = "Customer"; #region Organization // nieuwe organisatie, toevoegen. Maar één per bericht, dat is wat setu aanbeveelt. var organization = new Organization(); staffingOrganization.Organization.Add(organization); // nieuw referenceIDType var referenceIDType = new StaffingReferenceIdType(); staffingOrganization.ReferenceIdInfo.Add(referenceIDType); #region Identifier van StaffingOrganization in Flex2GO // maken van eigen identifier Flex2GO var entityIDFlex2GO = new EntityIdType(); // wij zijn eigenaar entityIDFlex2GO.idOwner = "Flex2GO"; // waardeobject var entityIdTypeIdFlex2GO = new EntityIdTypeIdValue(); // Flex2GO gebruikt guids entityIdTypeIdFlex2GO.Value = "F020D955-A2A8-4371-A57F-BB9E5012CEDD"; // toevoegen waarde object aan entityId object entityIDFlex2GO.IdValue.Add(entityIdTypeIdFlex2GO); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Flex2GO organization.OrganizationId.Add(entityIDFlex2GO); #endregion #region Identifier van StaffingOrganization in Nocore // maken van eigen identifier Nocore var entityIDNocore = new EntityIdType(); // wij zijn eigenaar entityIDNocore.idOwner = "SEDIS"; // waardeobject var entityIdTypeIdNocore = new EntityIdTypeIdValue(); // Nocore gebruikt integers, personeelsnummer entityIdTypeIdNocore.Value = "12345"; // toevoegen waarde object aan entityId object entityIDNocore.IdValue.Add(entityIdTypeIdNocore); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Nocore organization.OrganizationId.Add(entityIDNocore); #endregion // naam organisatie organization.OrganizationName = "Birdseyeview B.V."; // omschrijving organisatie organization.Description = "Makers van Flex2GO, internetplatform voor de uitzend- en payrollbranche"; // kvk var dunsNumber = new DunsNumberDataType(); dunsNumber.dunsNumberType = DunsNumberDataTypeDunsNumberType.standardDuns; dunsNumber.Value = "039087461"; organization.DunsNumber.Add(dunsNumber); // SBI-code 2008 voor VPO marktmonitor var industryCode = new IndustryCodeType(); industryCode.Value = "62.01"; organization.IndustryCode.Add(industryCode); var internetAdres = new InternetDomainNameType(); internetAdres.Value = "http://www.birdseyeview.nl/"; organization.InternetDomainName.Add(internetAdres); #endregion #region contactpersonen var organizationContactInfo = new OrganizationContactType(); // id van de contactpersoon in Flex2GO en/of NoCore #region Identifier van OrganizationContactType in Flex2GO // maken van eigen identifier Flex2GO EntityIdType entityIDContactFlex2GO = new EntityIdType(); // wij zijn eigenaar entityIDContactFlex2GO.idOwner = "Flex2GO"; // waardeobject EntityIdTypeIdValue entityIdContactTypeIdFlex2GO = new EntityIdTypeIdValue(); // Flex2GO gebruikt guids entityIdContactTypeIdFlex2GO.Value = "F020D955-A2A8-4371-A57F-BB9E5012CEDD"; // toevoegen waarde object aan entityId object entityIDContactFlex2GO.IdValue.Add(entityIdTypeIdFlex2GO); // toevoegen van EntityId object aan de lijst met HumanResourceId's, dit is die van Flex2GO organizationContactInfo.ContactId = entityIDContactFlex2GO; #endregion // Soort contactpersoon, met x: zelf te definieren, of één van de standaardwaarden organizationContactInfo.purpose = "x:Ontwikkelaar"; // Naam var personName = new PersonNameType(); SetName(personName, "", "Jansen", "Jan", "Jan"); organizationContactInfo.ContactName = personName; // ContactMethodes ContactMethodType contactInfo = new ContactMethodType(); contactInfo.Mobile = CreateMobileNumber("0612341234", TelcomItemsChoiceType.FormattedNumber); contactInfo.Telephone = CreateNumber("0306561563", TelcomItemsChoiceType.FormattedNumber); contactInfo.InternetEmailAddress = "*****@*****.**"; organizationContactInfo.ContactMethod = contactInfo; organization.ContactInfo.Add(organizationContactInfo); #endregion #region Adres var workSite = new WorkSiteType(); // nieuw HR-XML adres object PostalAddressType postalAddress = new PostalAddressType(); // landcode van Nederland in ISO2 postalAddress.CountryCode = "NL"; // nieuw HR-XML PostalAddressTypeDeliveryAddress object PostalAddressTypeDeliveryAddress deliveryAddress = new PostalAddressTypeDeliveryAddress(); // eigenschappen op object plakken deliveryAddress.StreetName = "Groeneweg"; deliveryAddress.BuildingNumber = "21"; deliveryAddress.Unit = "G"; deliveryAddress.AddressLine.Add("Groeneweg 21G"); postalAddress.DeliveryAddress = deliveryAddress; postalAddress.PostalCode = "3981 CK"; // type = streetAddress = Huisadres postalAddress.type = PostalAddressTypeType.streetAddress; postalAddress.typeSpecified = true; // zet adres op ResourceInformation object workSite.PostalAddress = postalAddress; organization.WorkSite.Add(workSite); #endregion #region NocoreSpecific staffingOrganization.UserArea = new UserAreaType(); var nocoreStaffingOrganization = new NocoreStaffingOrganizationType(); var cla = new CLAReferenceType(); cla.CLAId = "1045"; cla.Description = "THUISZORG"; nocoreStaffingOrganization.CLA = cla; nocoreStaffingOrganization.AccountManager = "Gert Dingemans"; nocoreStaffingOrganization.Location = new NocoreLocationType(); nocoreStaffingOrganization.Location.Code = "1"; nocoreStaffingOrganization.Location.Name = "Hoofdvestiging"; nocoreStaffingOrganization.Status = "Actief"; nocoreStaffingOrganization.Modified = DateTime.Now; staffingOrganization.UserArea.NocoreStaffingOrganization = nocoreStaffingOrganization; staffingOrganization.UserArea.NocoreStaffingOrganizationSpecified = true; #endregion var paymentInfo = new PaymentInfoType(); paymentInfo.BankAccountInfo = new BankAccountInfoType(); paymentInfo.BankAccountInfo.BankAccountForeign = "592177424"; paymentInfo.PaymentCondition = new PaymentInfoTypePaymentCondition(); paymentInfo.PaymentCondition.Description = "14 dagen"; // 19 voor 19%, 0 VOOR btw Verlegd paymentInfo.VATRate = 19; paymentInfo.VATRateSpecified = true; staffingOrganization.PaymentInfo.Add(paymentInfo); staffingOrganization.SaveToFile("StaffingOrganization.xml"); // Laad weer uit bestand StaffingOrganizationType loadedStaffingOrganization = EntityBase <StaffingOrganizationType> .LoadFromFile("StaffingOrganization.xml"); // druk naam af. Console.WriteLine(loadedStaffingOrganization.Organization[0].OrganizationName); }