C2017-003: Support SQL Server for storing of Referenced Object data
This commit is contained in:
42
PROMS/ReferencedObjects/LibSource/RODBInterface/InputBox.cs
Normal file
42
PROMS/ReferencedObjects/LibSource/RODBInterface/InputBox.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RODBInterface
|
||||
{
|
||||
public partial class InputBox : Form
|
||||
{
|
||||
private string _ResultConnectString = null;
|
||||
|
||||
public string ResultConnectString
|
||||
{
|
||||
get { return _ResultConnectString; }
|
||||
set { _ResultConnectString = value; }
|
||||
}
|
||||
public InputBox(string constring)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.tbSqlConnectString.Text = constring;
|
||||
}
|
||||
|
||||
private void btnTestConnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool canConnect = SqlRODB.TestConnect(this.tbSqlConnectString.Text);
|
||||
if (!canConnect)
|
||||
MessageBox.Show("Connection failed.", "Connection Failed");
|
||||
else
|
||||
MessageBox.Show("You have been successfully connected to the database!", "Connection Succeeded");
|
||||
}
|
||||
|
||||
private void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
ResultConnectString = this.tbSqlConnectString.Text;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user