Пример #1
0
        public virtual void WriteSalesforceData(ISalesforceContact contact)
        {
            var personal = this.Personal;

            personal.FirstName = contact.GetProperty <string>("FirstName");
            personal.Surname   = contact.GetProperty <string>("LastName");
            personal.JobTitle  = contact.GetProperty <string>("JobTitle");
            personal.BirthDate = contact.GetProperty <DateTime?>("Birthdate");

            this.Email.SmtpAddress = contact.Email;

            this.Phone.Number = contact.GetProperty <string>("Phone");
        }
        public virtual void WriteSalesforceData(ISalesforceContact contact)
        {
            var personal = this.Personal;

              personal.FirstName = contact.GetProperty<string>("FirstName");
              personal.Surname = contact.GetProperty<string>("LastName");
              personal.JobTitle = contact.GetProperty<string>("JobTitle");
              personal.BirthDate = contact.GetProperty<DateTime?>("Birthdate");

              this.Email.SmtpAddress = contact.Email;

              this.Phone.Number = contact.GetProperty<string>("Phone");
        }
        protected virtual Dictionary <string, object> GetProperties(ISalesforceContact contact, string[] propertyNames)
        {
            if (contact == null)
            {
                return(new Dictionary <string, object>(0));
            }

            var dictionary = new Dictionary <string, object>(propertyNames.Length);

            foreach (var propertyName in propertyNames)
            {
                object value = contact.GetProperty <object>(propertyName);

                if (value != null)
                {
                    dictionary[propertyName] = value;
                }
            }

            return(dictionary);
        }
        protected virtual Dictionary<string, object> GetProperties(ISalesforceContact contact, string[] propertyNames)
        {
            if (contact == null)
              {
            return new Dictionary<string, object>(0);
              }

              var dictionary = new Dictionary<string, object>(propertyNames.Length);

              foreach (var propertyName in propertyNames)
              {
            object value = contact.GetProperty<object>(propertyName);

            if (value != null)
            {
              dictionary[propertyName] = value;
            }
              }

              return dictionary;
        }