private void DeleteSIPProviderCompleted(object sender, DeleteSIPProviderCompletedEventArgs e)
 {
     if (IsUnauthorised(e.Error))
     {
         SessionExpired();
     }
     else if (DeleteSIPProviderComplete != null)
     {
         DeleteSIPProviderComplete(e);
     }
 }
        private void DeleteSIPProviderComplete(DeleteSIPProviderCompletedEventArgs e)
        {
            try
            {
                SIPProvider sipProvider = e.Result;

                LogActivityMessage_External(MessageLevelsEnum.Info, "Delete completed successfully for " + sipProvider.ProviderName + ".");

                for (int index = 0; index < m_sipProviders.Count; index++)
                {
                    if (m_sipProviders[index].Id == sipProvider.Id)
                    {
                        m_sipProviders.RemoveAt(index);
                        break;
                    }
                }

                m_sipProvidersPanel.AssetDeleted();
            }
            catch (Exception excp)
            {
                string excpMessage = (excp.InnerException != null) ? excp.InnerException.Message : excp.Message;
                LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error deleting the SIP Provider. " + excpMessage);
            }
        }
 private void DeleteSIPProviderCompleted(object sender, DeleteSIPProviderCompletedEventArgs e) {
     if (IsUnauthorised(e.Error)) {
         SessionExpired();
     }
     else if (DeleteSIPProviderComplete != null) {
         DeleteSIPProviderComplete(e);
     }
 }