Exemplo n.º 1
0
        // Token: 0x06002DA3 RID: 11683 RVA: 0x001023F4 File Offset: 0x001005F4
        private void SetEmailPropertyValue(Contact contact, ContactPropertyInfo propertyInfo)
        {
            ContactPropertyInfo emailDisplayAsProperty = ContactUtilities.GetEmailDisplayAsProperty(propertyInfo);
            EmailAddressIndex   emailPropertyIndex     = ContactUtilities.GetEmailPropertyIndex(propertyInfo);
            string email       = (string)base.GetParameter(propertyInfo.Id);
            string displayName = (string)base.GetParameter(emailDisplayAsProperty.Id);

            ContactUtilities.SetContactEmailAddress(contact, emailPropertyIndex, email, displayName);
        }
Exemplo n.º 2
0
        private void SetEmail(ContactPropertyInfo propertyInfo)
        {
            ContactPropertyInfo emailDisplayAsProperty = ContactUtilities.GetEmailDisplayAsProperty(propertyInfo);
            string            text  = this.GetFormParameterStringValue(propertyInfo.Id);
            string            text2 = this.GetFormParameterStringValue(emailDisplayAsProperty.Id);
            EmailAddressIndex emailPropertyIndex = ContactUtilities.GetEmailPropertyIndex(propertyInfo);

            if (Utilities.WhiteSpaceOnlyOrNullEmpty(text))
            {
                text = null;
            }
            if (Utilities.WhiteSpaceOnlyOrNullEmpty(text2))
            {
                text2 = null;
            }
            ContactUtilities.SetContactEmailAddress(this.Contact, emailPropertyIndex, text, text2);
        }
Exemplo n.º 3
0
        public void AddOneOffToContacts()
        {
            ExTraceGlobals.ContactsCallTracer.TraceDebug((long)this.GetHashCode(), "DirectoryItemEventHandler.AddOneOffToContacts");
            string displayName = (string)base.GetParameter("dn");
            string email       = (string)base.GetParameter("em");
            string text        = (string)base.GetParameter("mp");

            using (Contact contact = Contact.Create(base.UserContext.MailboxSession, base.UserContext.ContactsFolderId))
            {
                ContactUtilities.SetContactEmailAddress(contact, ContactUtilities.GetEmailPropertyIndex(ContactUtilities.Email1EmailAddress), email, displayName);
                if (!string.IsNullOrEmpty(text))
                {
                    contact.SetOrDeleteProperty(ContactUtilities.MobilePhone.PropertyDefinition, text);
                }
                contact.Save(SaveMode.ResolveConflicts);
                contact.Load();
                this.RenderUrlToOpenContactAsDraft(contact.Id.ObjectId.ToBase64String(), "IPM.Contact");
            }
        }