Skip to content

Commit 0807b83

Browse files
committed
V1.5 preload
- Configuration screen - Pushed global config variables to base form - Support for JSON (table_mapping) only at this stage
1 parent 8ea4e6c commit 0807b83

16 files changed

+4345
-1969
lines changed

TEAM/FormAlert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void buttonClose_Click(object sender, EventArgs e)
7373

7474
private void buttonShowLog_Click(object sender, EventArgs e)
7575
{
76-
Process.Start(GlobalVariables.ConfigurationPath + @"\Error_Log.txt");
76+
Process.Start(GlobalParameters.ConfigurationPath + @"\Error_Log.txt");
7777
}
7878
}
7979
}

TEAM/FormBase.cs

Lines changed: 449 additions & 4 deletions
Large diffs are not rendered by default.

TEAM/Form_About.cs

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace TEAM
99
{
10-
public partial class FormAbout : Form
10+
public partial class FormAbout : FormBase
1111
{
1212
private readonly FormMain _myParent;
1313

@@ -25,8 +25,8 @@ private void buttonClose_Click(object sender, EventArgs e)
2525

2626
private void button1_Click(object sender, EventArgs e)
2727
{
28-
29-
var connHstg = new SqlConnection {ConnectionString = _myParent.textBoxPSAConnection.Text};
28+
var configurationSettings = new ConfigurationSettings();
29+
var connHstg = new SqlConnection {ConnectionString = configurationSettings.ConnectionStringHstg };
3030

3131
try
3232
{
@@ -93,29 +93,5 @@ private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
9393
// Navigate to a URL.
9494
Process.Start("http://www.roelantvos.com");
9595
}
96-
97-
public DataTable GetDataTable(ref SqlConnection sqlConnection, string sql)
98-
{
99-
// Pass the connection to a command object
100-
var sqlCommand = new SqlCommand(sql, sqlConnection);
101-
var sqlDataAdapter = new SqlDataAdapter { SelectCommand = sqlCommand };
102-
103-
var dataTable = new DataTable();
104-
105-
// Adds or refreshes rows in the DataSet to match those in the data source
106-
107-
try
108-
{
109-
sqlDataAdapter.Fill(dataTable);
110-
}
111-
112-
catch (Exception exception)
113-
{
114-
MessageBox.Show("An error has occurred: " + exception.Message);
115-
return null;
116-
}
117-
return dataTable;
118-
}
119-
12096
}
12197
}

TEAM/Form_Graph.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ private void SetDefaultLabelParameters()
225225

226226
private void MetadataGraph()
227227
{
228-
var connOmd = new SqlConnection { ConnectionString = MyParent.textBoxMetadataConnection.Text };
228+
var configurationSettings = new FormBase.ConfigurationSettings();
229+
var connOmd = new SqlConnection { ConnectionString = configurationSettings.ConnectionStringOmd };
229230

230231
var systemList = new List<string>(); // To create the groups (per system)
231232
var nodeDictionary = new Dictionary<string, string>(); // To create the nodes and add them to a parent node (group)

TEAM/Form_Main.Designer.cs

Lines changed: 151 additions & 1318 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TEAM/Form_Main.cs

Lines changed: 241 additions & 347 deletions
Large diffs are not rendered by default.

TEAM/Form_Manage_Configuration.Designer.cs

Lines changed: 1407 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TEAM/Form_Manage_Configuration.cs

Lines changed: 670 additions & 0 deletions
Large diffs are not rendered by default.

TEAM/Form_Manage_Configuration.resx

Lines changed: 666 additions & 0 deletions
Large diffs are not rendered by default.

TEAM/Form_Manage_Metadata.Designer.cs

Lines changed: 33 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)