Пример #1
0
        public void Update_all_medlemsnr_in_of()
        {
            of.connector.Contacts contacts = _of_connection.Get_contacts();
            foreach (int id in contacts)
            {
                crm.Contact crm_contact = new crm.Contact(_service, _tracingService);

                of.data.Contact of_contact = _of_connection.Contact.Get(id);
                crm_contact.Get_contact_from_basis_information(_service, of_contact.Of_id.ToString());                //todo felter

                if (crm_contact.CrmEntity == null)
                {
                    continue;
                }

                if (Needs_medlemsnr_update_in_of(crm_contact, of_contact))
                {
                    //todo sæt medlemsnr
                    of_contact.External_id = crm_contact.new_kkadminmedlemsnr?.ToString();
                    _of_connection.Contact.Patch(of_contact.Of_id.Value, of_contact);
                }
                //todo remove
                break;
            }
        }