Skip to content

Commit a6917cb

Browse files
committed
Alignment to TEAM 1.6.5
1 parent 295defe commit a6917cb

13 files changed

+167
-389
lines changed

Virtual_EDW/App.config

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<configSections>
4-
5-
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6-
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
7-
<section name="Virtual_EDW.Properties.User_Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
8-
<section name="Virtual_EDW.Virtual_Enterprise_Data_Warehouse" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
9-
</sectionGroup>
10-
</configSections>
11-
<startup useLegacyV2RuntimeActivationPolicy="true">
12-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
13-
</startup>
14-
<entityFramework>
15-
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
16-
<parameters>
17-
<parameter value="mssqllocaldb" />
18-
</parameters>
19-
</defaultConnectionFactory>
20-
<providers>
21-
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
22-
</providers>
23-
</entityFramework>
24-
<userSettings>
25-
<Virtual_EDW.Properties.User_Settings>
26-
<setting name="StagingDatabase" serializeAs="String">
27-
<value>EDW_100_Staging_Area</value>
28-
</setting>
29-
<setting name="RoelantColour" serializeAs="String">
30-
<value>255, 128, 0</value>
31-
</setting>
32-
</Virtual_EDW.Properties.User_Settings>
33-
<Virtual_EDW.Virtual_Enterprise_Data_Warehouse>
34-
<setting name="StagingDatabase" serializeAs="String">
35-
<value>EDW_100_Staging_Area</value>
36-
</setting>
37-
</Virtual_EDW.Virtual_Enterprise_Data_Warehouse>
38-
</userSettings>
39-
<connectionStrings>
40-
<add name="DataVaultFrameworkEntities" connectionString="metadata=res://*/DataVault.csdl|res://*/DataVault.ssdl|res://*/DataVault.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=BISERVER\BISERVER_SANDBOX;initial catalog=EDW_900_OMD_Framework;user id=sa;password=K3kobus2;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
41-
</connectionStrings>
42-
<runtime>
3+
<runtime>
434
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
445
<dependentAssembly>
456
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

Virtual_EDW/Form_About.Designer.cs

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

Virtual_EDW/Form_About.cs

Lines changed: 13 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,37 @@
1-
using System;
2-
using System.Data;
3-
using Microsoft.Data.SqlClient;
4-
using System.Diagnostics;
5-
using System.Text;
1+
using System.Diagnostics;
62
using System.Windows.Forms;
7-
using TEAM;
83

94
namespace Virtual_Data_Warehouse
105
{
116
public partial class FormAbout : FormBase
127
{
138
//private readonly FormMain _myParent;
149

15-
public FormAbout(FormMain parent)
10+
public FormAbout()
1611
{
17-
MyParent = parent;
1812
InitializeComponent();
1913
FormBorderStyle = FormBorderStyle.FixedSingle;
2014
}
21-
22-
private void ButtonClose_Click(object sender, EventArgs e)
15+
16+
private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
2317
{
24-
Close();
18+
// Specify that the link was visited.
19+
linkLabelTeam.LinkVisited = true;
20+
// Navigate to a URL.
21+
Process.Start("https://github.com/RoelantVos/virtual-data-warehouse");
2522
}
2623

27-
private void Button1_Click(object sender, EventArgs e)
28-
{
29-
var conn = new SqlConnection {ConnectionString = TeamConfigurationSettings.MetadataConnection.CreateSqlServerConnectionString(false)};
30-
31-
try
32-
{
33-
conn.Open();
34-
35-
var sqlForWorkCountDown = new StringBuilder();
36-
37-
sqlForWorkCountDown.AppendLine("SELECT ");
38-
sqlForWorkCountDown.AppendLine(" MINUTES_TO_WORK_THIS_WEEK, (MINUTES_TO_WORK_THIS_WEEK/60) as HOURS_TO_WORK_THIS_WEEK");
39-
sqlForWorkCountDown.AppendLine("FROM");
40-
sqlForWorkCountDown.AppendLine("( ");
41-
sqlForWorkCountDown.AppendLine("SELECT");
42-
sqlForWorkCountDown.AppendLine(" CASE");
43-
sqlForWorkCountDown.AppendLine(" WHEN");
44-
sqlForWorkCountDown.AppendLine(" DATEDIFF(");
45-
sqlForWorkCountDown.AppendLine(" mi,");
46-
sqlForWorkCountDown.AppendLine(" GETDATE(),");
47-
sqlForWorkCountDown.AppendLine(" dateadd(hour,17,cast(CAST(getdate() as DATE) as datetime)))<=0");
48-
sqlForWorkCountDown.AppendLine(" THEN 0");
49-
sqlForWorkCountDown.AppendLine(" ELSE");
50-
sqlForWorkCountDown.AppendLine(" DATEDIFF(");
51-
sqlForWorkCountDown.AppendLine(" mi,");
52-
sqlForWorkCountDown.AppendLine(" GETDATE(),");
53-
sqlForWorkCountDown.AppendLine(" dateadd(hour,17,cast(CAST(getdate() as DATE) as datetime))) ");
54-
sqlForWorkCountDown.AppendLine(" END");
55-
sqlForWorkCountDown.AppendLine(" +");
56-
sqlForWorkCountDown.AppendLine(" CASE");
57-
sqlForWorkCountDown.AppendLine(" WHEN 6-datepart(WEEKDAY,GETDATE())<0");
58-
sqlForWorkCountDown.AppendLine(" THEN 0");
59-
sqlForWorkCountDown.AppendLine(" ELSE 6-datepart(WEEKDAY,GETDATE())");
60-
sqlForWorkCountDown.AppendLine(" END*480");
61-
sqlForWorkCountDown.AppendLine(" as MINUTES_TO_WORK_THIS_WEEK");
62-
sqlForWorkCountDown.AppendLine(") as sub");
63-
64-
// MessageBox.Show(sqlForWorkCountdDown.ToString());
65-
var workCountDownDatatable = Utility.GetDataTable(ref conn, sqlForWorkCountDown.ToString());
66-
67-
//var workCountDownDatatable = _myParent.Invoke((MethodInvoker)delegate() { _myParent.GetDataTable(ref connHstg, sqlForWorkCountdDown.ToString()); });
68-
69-
int minutesToWork = 0;
70-
int hoursToWork = 0;
71-
72-
foreach (DataRow row in workCountDownDatatable.Rows)
73-
{
74-
minutesToWork = (int) row["MINUTES_TO_WORK_THIS_WEEK"];
75-
hoursToWork = (int) row["HOURS_TO_WORK_THIS_WEEK"];
76-
}
77-
78-
MessageBox.Show(
79-
"There are only " + minutesToWork + " minutes (" + hoursToWork + " hours) left to work this week!",
80-
"Important announcement",
81-
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
82-
}
83-
catch (Exception)
84-
{
85-
MessageBox.Show("There is no database connection for the PSA database! Please check the details in the information pane.","An issue has been encountered", MessageBoxButtons.OK, MessageBoxIcon.Error);
86-
}
87-
}
88-
89-
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
24+
private void linkLabelTeam_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
9025
{
9126
// Specify that the link was visited.
9227
linkLabel1.LinkVisited = true;
9328
// Navigate to a URL.
9429
Process.Start("http://www.roelantvos.com");
9530
}
9631

97-
98-
32+
private void buttonClose_Click(object sender, System.EventArgs e)
33+
{
34+
Close();
35+
}
9936
}
10037
}

0 commit comments

Comments
 (0)