/// <summary> /// /// </summary> /// <param name="connection"></param> public void ActiveCurrentWebService(WSConnection connection) { StatesEnum state; Setting = SettingsBLL.AddConnection(connection, true, out state); MessageManager.OnServiceAdded(connection.Uri == null ? string.Empty : connection.Uri.ToString(), state); }
/// <summary> /// Implement Add service Command /// </summary> public void ExecuteAddCommand(WSConnection conn) { try { StatesEnum state; Setting = SettingsBLL.AddConnection(conn, false, out state); if (state == StatesEnum.ConnectionAddedAndActivated || state == StatesEnum.ConnectionAddedSuccessfully) { WSConnections = new ObservableCollection <WSConnection>(Setting.WSConnections); NewConnectionUrl = NewConnectionLogin = NewConnectionPassword = string.Empty; } MessageManager.OnServiceAdded(conn.Url, state); } catch (UriFormatException ex) { LogHelper.Instance.LogInfo(ex.Message); MessageManager.OnServiceAdded(NewConnectionUrl, StatesEnum.ServiceInvalid); } }
/// <summary> /// Implement Add service Command /// </summary> private void ExecuteAddCommand(object prameter) { try { WSConnection conn = new WSConnection(NewConnectionUrl, NewConnectionLogin, NewConnectionPassword, string.Empty); StatesEnum state; Setting = SettingsBLL.AddConnection(conn, false, out state); if (state == StatesEnum.ConnectionAddedAndActivated || state == StatesEnum.ConnectionAddedSuccessfully) { WSConnections = new ObservableCollection <WSConnection>(Setting.WSConnections); NewConnectionUrl = NewConnectionLogin = NewConnectionPassword = string.Empty; } base.MessageManager.OnServiceAdded(conn.Url, state); } catch (UriFormatException ex) { base.MessageManager.OnServiceAdded(NewConnectionUrl, StatesEnum.ServiceInvalid); } }