コード例 #1
0
        void IEditableObject.CancelEdit()
        {
            IsEditMode = false;

            m_ServerName = m_ServerName_PreEdit;
            m_DatabaseName = m_DatabaseName_PreEdit;
            m_SqlServerAuthenticationTypeEnumeration = m_SqlServerAuthenticationTypeEnumeration_PreEdit;
            m_UserId = m_UserId_PreEdit;
            m_Password = m_Password_PreEdit;
        }
コード例 #2
0
        private void AuthenticationTypeChanged(SqlServerAuthenticationTypeEnumeration sqlServerAuthenticationType)
        {
            switch ( sqlServerAuthenticationType ) {
                case SqlServerAuthenticationTypeEnumeration.SqlServer:
                    m_GuiUserIdTextBox.Enabled = true;
                    m_GuiPasswordTextBox.Enabled = true;
                    m_GuiUserIdLabel.Enabled = true;
                    m_GuiPasswordLabel.Enabled = true;
                    break;

                case SqlServerAuthenticationTypeEnumeration.Windows:
                    m_GuiUserIdTextBox.Enabled = false;
                    m_GuiPasswordTextBox.Enabled = false;
                    m_GuiUserIdLabel.Enabled = false;
                    m_GuiPasswordLabel.Enabled = false;
                    break;
            }

            if ( sqlConnectionSettingsModelBindingSource.Count > 0 ) {
                ( (SqlConnectionSettingsModel)sqlConnectionSettingsModelBindingSource[0] ).SqlServerAuthenticationType = sqlServerAuthenticationType;
            }

            //m_GuiGetDatabasesButton.Enabled = CanRefreshDatabase();
            m_GuiDatabaseCombo.Enabled = CanRefreshDatabase ();
        }
コード例 #3
0
        void IEditableObject.BeginEdit()
        {
            m_ServerName_PreEdit = m_ServerName;
            m_DatabaseName_PreEdit = m_DatabaseName;
            m_SqlServerAuthenticationTypeEnumeration_PreEdit = m_SqlServerAuthenticationTypeEnumeration;
            m_UserId_PreEdit = m_UserId;
            m_Password_PreEdit = m_Password;

            IsEditMode = true;
        }