Exemplo n.º 1
0
 private void DBConnection_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!DesignerUtility.TestConnection(this.GetDataConnection(), GetDataConnection()))
     {
         e.Cancel = true;
     }
 }
Exemplo n.º 2
0
 private void bTestConnection_Click(object sender, System.EventArgs e)
 {
     if (DesignerUtility.TestConnection(this.cbDataProvider.Text, tbConnection.Text))
     {
         MessageBox.Show("Connection succeeded!", "Test Connection");
     }
 }
Exemplo n.º 3
0
 private void bTestConnection_Click(object sender, System.EventArgs e)
 {
     if (DesignerUtility.TestConnection(this.cbDataProvider.Text, tbConnection.Text))
     {
         MessageBox.Show(Strings.DialogDatabase_Show_ConnectionSuccessful, Strings.DesignerUtility_Show_TestConnection);
     }
 }
Exemplo n.º 4
0
        private void bTestConnection_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cbDataProvider.Text))
            {
                MessageBox.Show("Please select a Data Provider before testing.", "Test Connection", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (DesignerUtility.TestConnection(this.cbDataProvider.Text, tbConnection.Text))
            {
                MessageBox.Show("Connection succeeded!", "Test Connection");
            }
        }
Exemplo n.º 5
0
        private void bTestConnection_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cbDataProvider.Text))
            {
                MessageBox.Show(Strings.DialogDatabase_ShowD_SelectDataProvider, Strings.DesignerUtility_Show_TestConnection, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (DesignerUtility.TestConnection(this.cbDataProvider.Text, tbConnection.Text))
            {
                MessageBox.Show(Strings.DialogDatabase_Show_ConnectionSuccessful, Strings.DesignerUtility_Show_TestConnection);
            }
        }
Exemplo n.º 6
0
        private void bTestConnection_Click(object sender, System.EventArgs e)
        {
            string cType = GetDataProvider();

            if (cType == null)
            {
                return;
            }

            if (DesignerUtility.TestConnection(cType, GetDataConnection()))
            {
                MessageBox.Show("Connection successful!", "Test Connection");
            }
        }
        private void bTestConnection_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cbDataProvider.Text))
            {
                MessageBox.Show(Strings.DialogDatabase_ShowD_SelectDataProvider, Strings.DesignerUtility_Show_TestConnection, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            var connectionString = tbConnection.Text;

            if (tbConnection.Text.StartsWith("=Parameters!"))
            {
                connectionString = _Draw.GetReportParameterDefaultValue(tbConnection.Text);
            }

            if (DesignerUtility.TestConnection(this.cbDataProvider.Text, connectionString))
            {
                MessageBox.Show(Strings.DialogDatabase_Show_ConnectionSuccessful, Strings.DesignerUtility_Show_TestConnection);
            }
        }