void btn_open_partner_Click(Office.CommandBarButton Ctrl, ref bool CancelDefault) { try { Connect.isLoggedIn(); this.CheckMailCount(); if (countMail() == 1) { foreach (Outlook.MailItem mailitem in Tools.MailItems()) { Object[] contact = Cache.OpenERPOutlookPlugin.RedirectPartnerPage(mailitem); if ((int)contact[1] > 0) { Cache.OpenERPOutlookPlugin.RedirectWeb(contact[2]); } else { frm_contact contact_form = new frm_contact(mailitem.SenderName, mailitem.SenderEmailAddress); contact_form.Show(); } } } } catch (Exception e) { Connect.handleException(e); } }
void btn_open_partner_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault) { try { Connect.isLoggedIn(); this.CheckMailCount(); if (countMail() == 1) { foreach (outlook.MailItem mailitem in Tools.MailItems()) { Object[] contact = Cache.OpenERPOutlookPlugin.RedirectPartnerPage(mailitem); if ((int)contact[1] > 0) { Cache.OpenERPOutlookPlugin.RedirectWeb(contact[2]); } else { frm_contact contact_form = new frm_contact(mailitem.SenderName, mailitem.SenderEmailAddress); contact_form.Show(); } } } } catch (Exception e) { Connect.handleException(e); } }