示例#1
0
 public static AMTANGEE.SDK.Contacts.ContactBase GetContactBySource(string source, string adressType)
 {
     AMTANGEE.SDK.Contacts.ContactBase cb = null;
     if (adressType.ToLower() == "person")
     {
         AMTANGEE.SDK.Contacts.Contacts contacts = AMTANGEE.SDK.Contacts.Contacts.SearchBySource(AMTANGEE.SDK.Contacts.SearchKinds.EndsWith, ":" + source);
         if (contacts.Count > 0)
         {
             cb = contacts[0];
         }
     }
     else
     {
         AMTANGEE.SDK.Contacts.Contacts contacts = AMTANGEE.SDK.Contacts.Contacts.SearchBySource(AMTANGEE.SDK.Contacts.SearchKinds.EndsWith, ":" + source);
         if (contacts.Count > 0)
         {
             foreach (AMTANGEE.SDK.Contacts.ContactBase contactBase in contacts)
             {
                 if (contactBase is AMTANGEE.SDK.Contacts.Contact)
                 {
                     cb = contactBase;
                     break;
                 }
             }
         }
     }
     return(cb);
 }
示例#2
0
            public static AMTANGEE.SDK.Contacts.ContactBase GetContactByCustomerOrVendorNo(string customerOrVendorNo, string adressType)
            {
                AMTANGEE.SDK.Contacts.ContactBase cb = null;
                AMTANGEE.SDK.Contacts.Search      s  = new SDK.Contacts.Search(AMTANGEE.SDK.Global.CurrentUser);
                s.SearchCriteria = "ADDRESSES.DLL:KUNDENNUMMER=" + customerOrVendorNo;
                if (adressType.ToLower() == "person")
                {
                    AMTANGEE.SDK.Contacts.Contacts contacts = AMTANGEE.SDK.Contacts.Contacts.Search(s, false, false); //AMTANGEE.SDK.Contacts.Contacts.SearchBySource(AMTANGEE.SDK.Contacts.SearchTypes.EndsWith, ":" + parameter["number"]);
                    if (contacts.Count > 0)
                    {
                        cb = contacts[0];
                    }
                }
                else
                {
                    AMTANGEE.SDK.Contacts.Contacts contacts = AMTANGEE.SDK.Contacts.Contacts.Search(s, false, false);//AMTANGEE.SDK.Contacts.Contacts.SearchBySource(AMTANGEE.SDK.Contacts.SearchTypes.EndsWith, ":" + parameter["number"]);
                    if (contacts.Count > 0)
                    {
                        foreach (AMTANGEE.SDK.Contacts.ContactBase contactBase in contacts)
                        {
                            if (contactBase is AMTANGEE.SDK.Contacts.Contact)
                            {
                                cb = contactBase;
                            }
                        }
                    }
                }

                return(cb);
            }
示例#3
0
        void Interfaces.Contacts.IContactShortInformationPlugin.ContactShortInformationEntryDoubleClicked(Interfaces.Contacts.ContactShortInformationEntry entry)
        {
            AMTANGEE.SDK.Contacts.ContactBase cb = (AMTANGEE.SDK.Contacts.ContactBase)entry.Data;

            string url = SettingsClass.URL;


            url = url.Replace("@@GUID", cb.Guid.ToString());
            if (cb.DefaultEmailAddress != null && cb.DefaultEmailAddress.ExistsAndLoadedAndRights)
            {
                url = url.Replace("@@EMAIL", cb.DefaultEmailAddress.Address);
            }
            else
            {
                url = url.Replace("@@EMAIL", "");
            }

            if (cb.DefaultPhoneNumber != null && cb.DefaultPhoneNumber.ExistsAndLoadedAndRights)
            {
                url = url.Replace("@@PHONENUMBER", cb.DefaultPhoneNumber.Comparison);
            }
            else
            {
                url = url.Replace("@@PHONENUMBER", "");
            }

            if (cb is AMTANGEE.SDK.Contacts.Contact)
            {
                url = url.Replace("@@CUSTOMERNO", ((AMTANGEE.SDK.Contacts.Contact)cb).CustomerNo);
            }
            else
            {
                url = url.Replace("@@CUSTOMERNO", ((AMTANGEE.SDK.Contacts.ContactPerson)cb).Parent.CustomerNo);
            }

            if (cb is AMTANGEE.SDK.Contacts.Contact)
            {
                url = url.Replace("@@VENDORNO", ((AMTANGEE.SDK.Contacts.Contact)cb).VendorNo);
            }
            else
            {
                url = url.Replace("@@VENDORNO", ((AMTANGEE.SDK.Contacts.ContactPerson)cb).Parent.VendorNo);
            }

            System.Diagnostics.Process.Start(url);
        }
示例#4
0
 public void LoadData(AMTANGEE.SDK.Contacts.ContactBase contact)
 {
     label2.Text = contact.ToString();
 }