private void UpdateSIPAccountCompleted(object sender, UpdateSIPAccountCompletedEventArgs e)
 {
     if (IsUnauthorised(e.Error))
     {
         SessionExpired();
     }
     else if (UpdateSIPAccountComplete != null)
     {
         UpdateSIPAccountComplete(e);
     }
 }
        private void UpdateSIPAccountComplete(UpdateSIPAccountCompletedEventArgs e)
        {
            try
            {
                // The SIP account returned by the web service call is the account after the update operation was carried out.
                SIPAccount sipAccount = e.Result;

                if (m_editControl != null)
                {
                    m_editControl.WriteStatusMessage(MessageLevelsEnum.Info, "Update completed successfully for " + sipAccount.SIPUsername + "@" + sipAccount.SIPDomain + ".");
                }
            }
            catch (Exception excp)
            {
                string excpMessage = (excp.InnerException != null) ? excp.InnerException.Message : excp.Message;
                if (m_editControl != null)
                {
                    m_editControl.WriteStatusMessage(MessageLevelsEnum.Error, excpMessage);
                }
                else
                {
                    LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error performing a SIP Account update." + excpMessage);
                }
            }
        }
 private void UpdateSIPAccountCompleted(object sender, UpdateSIPAccountCompletedEventArgs e) {
     if (IsUnauthorised(e.Error)) {
         SessionExpired();
     }
     else if (UpdateSIPAccountComplete != null) {
         UpdateSIPAccountComplete(e);
     }
 }