Exemplo n.º 1
0
        public static Entities.Contact.Contact GetContactAddressByCompany(long companyId)
        {
            Entities.Contact.Contact contact = new Entities.Contact.Contact();
            Entities.CompanyAddress.CompanyAddress companyAddress = _commands.GetContactAddressByCompany(companyId, ActiveUser);
            if (companyAddress != null)
            {
                contact.ConBusinessAddress1      = companyAddress.Address1;
                contact.ConBusinessAddress2      = companyAddress.Address2;
                contact.ConBusinessCity          = companyAddress.City;
                contact.ConBusinessStateId       = companyAddress.StateId;
                contact.ConBusinessStateIdName   = companyAddress.StateIdName;
                contact.ConBusinessZipPostal     = companyAddress.ZipPostal;
                contact.ConBusinessCountryId     = companyAddress.CountryId;
                contact.ConBusinessCountryIdName = companyAddress.CountryIdName;
            }

            return(contact);
        }
Exemplo n.º 2
0
 public static Entities.Contact.Contact ContactCardAddOrEdit(Entities.Contact.Contact contact)
 {
     return(_commands.ContactCardAddOrEdit(contact, ActiveUser));
 }
Exemplo n.º 3
0
 public Entities.Contact.Contact PostContactCard(Entities.Contact.Contact contact)
 {
     return(JsonConvert.DeserializeObject <ApiResult <Entities.Contact.Contact> >(RestClient.Execute(
                                                                                      HttpRestClient.RestAuthRequest(Method.PUT, string.Format("{0}/{1}", RouteSuffix, "AddContactCard"), ActiveUser).AddObject(contact)).Content).Results?.FirstOrDefault());
 }
Exemplo n.º 4
0
        /// <summary>
        /// Updates an existing contact record
        /// </summary>
        /// <param name="contact"></param>
        /// <returns></returns>

        public Entities.Contact.Contact Put(Entities.Contact.Contact contact)
        {
            return(_commands.Put(ActiveUser, contact));
        }
Exemplo n.º 5
0
 public Entities.Contact.Contact ContactCardAddOrEdit(Entities.Contact.Contact contact)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.ContactCardAddOrEdit(contact));
 }