コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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);
            }
        }
コード例 #3
0
ファイル: SelectWSVM.cs プロジェクト: samadm/ReportGenerator
        /// <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);
            }
        }