Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the address type (work, home). Possibility to set the "Work" fields in add to the "Home" fields. Address fields could appear under the "Work" label. #433

Open
rpontigg opened this issue Nov 25, 2022 · 1 comment

Comments

@rpontigg
Copy link

Type of issue

[ ] Bug
[ ] Question (e.g. about handling/usage)
[x] Request for new feature/improvement

Expected Behavior

I would like to print some values under the "work" label.
For example I want address, city and so on to appear under the "work" label.
However the class only allows to set street,
houseNumber, city, zipCode, country only referred to the home address and not to the work address.

Current Behavior

the class only allows to set street,
houseNumber, city, zipCode, country only referred to the home address and not to the work address.

Possible Solution (optional)

It should be useful if other field could be set, in order to change the address label from "home" to "work".

Steps to Reproduce (for bugs)

Your Environment

.Net framework 4.5

@rpontigg rpontigg changed the title Possibility to set the "Work" fields in add to the "Home" field.s. Address fields could appear under the "Work" label. Possibility to set the "Work" fields in add to the "Home" fields. Address fields could appear under the "Work" label. Nov 25, 2022
@rpontigg rpontigg changed the title Possibility to set the "Work" fields in add to the "Home" fields. Address fields could appear under the "Work" label. Set the address type (work, home). Possibility to set the "Work" fields in add to the "Home" fields. Address fields could appear under the "Work" label. Nov 25, 2022
@rpontigg
Copy link
Author

Just to update, I've found a workaround replacing the content of the payload of the "ContactData" object.
For example:

ContactData generator = new ContactData(ContactData.ContactOutputType.VCard3, name, lastName, nickName, phone, mobilePhone, workPhone, email, birthDayD, webSite, street, houseNumber, city, zipCode, country, note, stateRegion, ContactData.AddressOrder.Default, org, orgTitle);
string payload = generator.ToString();

payload = payload.Replace("ADR;TYPE=HOME", "ADR;TYPE=WORK");
payload = payload.Replace("TEL;TYPE=HOME", "TEL;TYPE=WORK");
payload = payload.Replace("EMAIL:", "EMAIL;TYPE=INTERNET;TYPE=WORK:");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant