Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
psr007ps authored Nov 2, 2019
1 parent 8ccce81 commit 18670ff
Show file tree
Hide file tree
Showing 93 changed files with 19,230 additions and 0 deletions.
13 changes: 13 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup>
<connectionStrings>
<add name="coniiqtest" connectionString=" Data Source=<Server Name>;Initial Catalog=identityiq; Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="coniiqtestb" connectionString=" Data Source=<Server Name>;Initial Catalog=Cloned_identityiq; Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="coniiq" connectionString=" Data Source=<Server Name>;Initial Catalog=identityiq; Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="coniiqDevA" connectionString=" Data Source=<Server Name>;Initial Catalog=identityiq; Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="coniiqDevB" connectionString=" Data Source=<Server Name>;Initial Catalog=Cloned_IIQ; Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
14 changes: 14 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Application x:Class="IIQ_Dashboard.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:IIQ_Dashboard"
StartupUri="Login.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles\TestConnectionsStyle.xaml"/>
<ResourceDictionary Source="Styles\IIQDashboardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace IIQ_Dashboard
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
28 changes: 28 additions & 0 deletions CustomButton/ButtonTile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

using System.Windows.Media;

namespace IIQ_Dashboard.CustomButton
{
public class ButtonTile : Button
{
public static readonly DependencyProperty TileImageSourceProperty = DependencyProperty.Register("TileImageSource", typeof(ImageSource), typeof(ButtonTile));
public ImageSource TileImageSource
{
get
{
return this.GetValue(TileImageSourceProperty) as ImageSource;
}
set
{
this.SetValue(TileImageSourceProperty, value);
}
}
}
}
259 changes: 259 additions & 0 deletions DAL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IIQ_Dashboard
{
class DAL
{
SqlConnection coniiqtest;
SqlCommand cmdiiq;
DataSet ds = new DataSet();
SqlDataAdapter daiiq;

public DataSet Test()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiqtest = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiqtest"].ConnectionString);
cmdiiq = new SqlCommand(@"select attributes as details, dateadd(s,convert(integer,LEFT(convert(varchar,completed),10)),'19691231 19:00:00:000') as completed from [identityiq].[identityiq].[spt_task_result] where name IN
('Test All Applications')", coniiqtest);
daiiq = new SqlDataAdapter(cmdiiq);
daiiq.Fill(ds);
coniiqtest.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return ds;
}

SqlConnection coniiqtestb;
//SqlCommand cmdiiq;
DataSet dsub = new DataSet();
//SqlDataAdapter daiiq;

public DataSet TestB()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiqtestb = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiqtestb"].ConnectionString);
cmdiiq = new SqlCommand(@"select attributes as details, dateadd(s,convert(integer,LEFT(convert(varchar,completed),10)),'19691231 19:00:00:000') as completed from [Cloned_identityiq].[identityiq].[spt_task_result] where name IN
('Eversource - Test All Applications')", coniiqtestb);
daiiq = new SqlDataAdapter(cmdiiq);
daiiq.Fill(dsub);
coniiqtestb.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dsub;
}


SqlConnection coniiqDevA;
//SqlCommand cmdiiq;
DataSet dstd = new DataSet();
//SqlDataAdapter daiiq;

public DataSet DevA()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiqDevA = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiqDevA"].ConnectionString);
cmdiiq = new SqlCommand(@"select attributes as details, dateadd(s,convert(integer,LEFT(convert(varchar,completed),10)),'19691231 19:00:00:000') as completed from [identityiq].[identityiq].[spt_task_result] where name IN
('Eversource - Test All Applications')", coniiqDevA);
daiiq = new SqlDataAdapter(cmdiiq);
daiiq.Fill(dstd);
coniiqDevA.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dstd;
}

SqlConnection coniiqDevB;
//SqlCommand cmdiiq;
DataSet dstdb = new DataSet();
//SqlDataAdapter daiiq;

public DataSet DevB()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiqDevB = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiqDevA"].ConnectionString);
cmdiiq = new SqlCommand(@"select attributes as details, dateadd(s,convert(integer,LEFT(convert(varchar,completed),10)),'19691231 19:00:00:000') as completed from [Cloned_IIQ].[identityiq].[spt_task_result] where name IN
('Test All Applications')", coniiqDevB);
daiiq = new SqlDataAdapter(cmdiiq);
daiiq.Fill(dstdb);
coniiqDevB.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dstdb;
}

SqlConnection coniiq;
SqlCommand cmdiiqtsk;
DataSet dstsk = new DataSet();
SqlDataAdapter daiiqtsk;
public DataSet GetTasks()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiq = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiq"].ConnectionString);
cmdiiqtsk = new SqlCommand(@"select name, dateadd(s,convert(integer,LEFT(convert(varchar,created),10)),'19691231 19:00:00:000') as created,
dateadd(s,convert(integer,LEFT(convert(varchar,completed),10)),'19691231 19:00:00:000') as completed, completion_status as status from [identityiq].[spt_task_result] where name IN
('Account Aggregation - Corporate Person',
'Account Aggregation - Workday',
'Eversource Refresh Identity Cubes',
'HR Account Aggregations',
'Perform Identity Request Maintenance',
'Perform Maintenance',
'Account Aggregation - Sumtotal',
'Account Aggregation - ACF2',
'Account Aggregation - RACF',
'Account Group Aggregation - RACF',
'Mainframe Account Aggregations',
'CIP Account Aggregations',
'Account Aggregation - Active Directory - NESD',
'Account Group Aggregation - Active Directory - NESD',
'Account Group Aggregation - Lotus Notes',
'Account Aggregation - Lotus Notes',
'Core Account Aggregations',
'Account Group Aggregation - Continuum',
'Account Aggregation - Continuum',
'Account Group Aggregation - Active Directory - NSTAR',
'Account Group Aggregation - Active Directory - NU',
'Account Aggregation - Active Directory - NSTAR',
'Account Aggregation - Active Directory - NU',
'Account Group Aggregation - Adept Transmission',
'Account Aggregation - RIM',
'Account Aggregation - NSTAR EMS ESAT',
'Account Aggregation - McAfee EPO',
'Account Aggregation - NH ESCC EMS',
'Account Aggregation - Firewalls',
'Account Aggregation - ITSM',
'Account Aggregation - ITAM',
'Account Aggregation - ADEPT Transmission',
'Account Aggregation - ADEPT Facilities',
'Account Aggregation - Andover Continuum',
'Account Group Aggregation - Active Directory ESCC',
'Account Group Aggregation - Active Directory - CVX',
'Account Aggregation - Active Directory - ESCC',
'Account Aggregation - Active Directory - CVX',
'Account Aggregation - Windows Servers (NU Domain)',
'Account Group Aggregation - STORMS Database',
'Account Aggregation - STORMS Database',
'Account Aggregation - STORMS',
'Account Group Aggregation - Oracle eBS Database',
'Account Group Aggregation - Oracle eBS',
'Account Aggregation - Oracle eBS Database',
'Account Aggregation - Oracle eBS Server',
'Account Aggregation - Oracle eBS',
'Eversource - SOX Account Aggregations',
'Account Aggregation - ADABAS Admin',
'Account Aggregation - IDMS',
'Account Aggregation - NSTAR CIS',
'Account Aggregation - Large Power Billing',
'Account Aggregation - Large Customer Billing',
'Account Aggregation - Meter Data Management system',
'Account group Aggregation - Meter Data Management system',
'Account Aggregation - PowerPlan',
'Account group Aggregation - PowerPlan',
'Account Aggregation - PowerPlan Database',
'Account group Aggregation - PowerPlan Database',
'Account Aggregation - Transmission Billing',
'Account group Aggregation - Transmission Billing',
'Account Aggregation - Unvouchered Liability System',
'Account group Aggregation - Unvouchered Liability System'
)", coniiq);
daiiqtsk = new SqlDataAdapter(cmdiiqtsk);
daiiqtsk.Fill(dstsk);
coniiq.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dstsk;
}

SqlCommand cmdiiqfltsk;
DataSet dsfltsk = new DataSet();
SqlDataAdapter daiiqfltsk;
public DataSet GetFailedTasks()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiq = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiq"].ConnectionString);
cmdiiqfltsk = new SqlCommand(@"select a.name, cast(messages as xml) as error_message,
dateadd(s,convert(integer,LEFT(convert(varchar,a.created),10)),'19691231 19:00:00:000') as created,
dateadd(s,convert(integer,LEFT(convert(varchar,a.completed),10)),'19691231 19:00:00:000') as completed
from [identityiq].[identityiq].[spt_task_result] as a
where completion_status='Error'
and dateadd(s,convert(integer,LEFT(convert(varchar,a.completed),10)),'19691231 19:00:00:000') > dateadd(day,-1, cast(getdate() as date))
order by a.name,a.created desc", coniiq);
daiiqfltsk = new SqlDataAdapter(cmdiiqfltsk);
daiiqfltsk.Fill(dsfltsk);
coniiq.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dsfltsk;
}
SqlCommand cmdiiqwar;
DataSet dswar = new DataSet();
SqlDataAdapter daiiqwar;
public DataSet GetWarnings()
{
try
{
//coniiq = GetConnectionString("conIIQ");
coniiq = new SqlConnection(ConfigurationManager.ConnectionStrings["coniiq"].ConnectionString);
cmdiiqwar = new SqlCommand(@"select a.name, cast(messages as xml) as error_message,
dateadd(s,convert(integer,LEFT(convert(varchar,a.created),10)),'19691231 19:00:00:000') as created,
dateadd(s,convert(integer,LEFT(convert(varchar,a.completed),10)),'19691231 19:00:00:000') as completed
from [identityiq].[identityiq].[spt_task_result] as a
where completion_status='Warning'
and dateadd(s,convert(integer,LEFT(convert(varchar,a.completed),10)),'19691231 19:00:00:000') > dateadd(day,-1, cast(getdate() as date))
order by a.name,a.created desc", coniiq);
daiiqwar = new SqlDataAdapter(cmdiiqwar);
daiiqwar.Fill(dswar);
coniiq.Close();
}
catch (SqlException ex)
{
Console.WriteLine(ex.ToString());
Console.ReadKey();
}
return dswar;
}
}

}
Loading

0 comments on commit 18670ff

Please sign in to comment.