*master*
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head id="Head1" runat="server">
<title>Incident Summary</title>
<script language="javascript" type="text/javascript" src="JScript.js"></script>
</head>
<body>
<a href="#TOP"></a>
<form id="form1" runat="server">
<div>
<table width="100%" border="0">
<tr>
<%-- First Row-- Title --%>
<td colspan="3">
<%-- Begin Inner Title Table--%>
<table border="0" cellspacing="1" width="100%">
<%-- Inner Title Table--%>
<tr>
<td style="text-align: center" colspan="3">
<img src="images/NMCI_Incident_Summary.jpg" alt="Incident Summary Logo" /></td>
</tr>
</table>
<%-- End Inner Title Table--%>
</td>
</tr>
<tr>
<td style="text-align: center" colspan="3">
Currently Logged in User is:
<%=HttpContext.Current.User.Identity.Name%>
</td>
</tr>
<tr>
<%-- Second Row- Bread Crumb Menu --%>
<td colspan="3">
You are here:<asp:SiteMapPath ID="SiteMapPath2" runat="server" Font-Names="Verdana"
Font-Size="0.8em" />
</td>
</tr>
<tr>
<%-- Third Row- Verttical Menu and Content --%>
<td valign="top">
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" Font-Names="Verdana"
Font-Size="0.8em" ImageSet="XPFileExplorer" NodeIndent="10" ExpandDepth="1">
<ParentNodeStyle Font-Bold="True" />
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
VerticalPadding="0px" />
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
NodeSpacing="0px" VerticalPadding="2px" />
</asp:TreeView>
</td>
<td colspan="2" id="MyPlaceMCB">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td colspan="3">
<hr />
</td>
</tr>
<tr>
<%-- Forth Row- Footer --%>
<td colspan="3" style="text-align: center">
<address>
The information contained in this database is confidential and proprietary information
of Electronic Data Systems Corporation (EDS). This information is not to be disclosed
to third parties without written authorization from EDS. This information is to
be used solely for the purpose of performance of the NMCI contract.<br />
</address>
<asp:HyperLink ID="Hyperlink1" runat="server" NavigateUrl="~/FeedBack.aspx">Provide Feedback to the Developer</asp:HyperLink>
</td>
</tr>
</table>
</div>
</form>
<a href="#Bottom"></a>
</body>
</html>
*page*
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" Title="Untitled Page" Theme="Theme1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:Repeater ID="rptFAQs" runat="server">
<ItemTemplate>
<hr />
<div id='<%# "h" & Container.ItemIndex.ToString() %>' class="header" onclick='<%# "ToggleDisplay(" & Container.ItemIndex.ToString() & ");" %>'>
<b><%# Eval("LastUpdated") %></b>-
<b>Last Update:</b><%# Eval("SiteName") %>-
<b>Site: </b><%# Eval("StatusName") %>
Status: <%# Eval("OutageShortDescription") %>
<br /><%# "d" & Container.ItemIndex.ToString() %>
</div>
<div id='<%# "d" & Container.ItemIndex.ToString() %>' class="details">
<table border="0" cellpadding="1" cellspacing="1">
<tr>
<td colspan="1" style="width: 125px">
ID#:<asp:HyperLink ID="Hyperlink1" runat="server" NavigateUrl='<%# "~/Edit_IS_MultiView.aspx?IncidentID=" & Eval("IncidentID")%>'
Text='<%# Eval("IncidentID") %>' ToolTip="Edit Record">Novell: NFS Links</asp:HyperLink>
</td>
<td colspan="1" style="width: 799px">
Last Updated:
<asp:Label ID="LastUpdatedLabel" runat="server" Text='<%# Eval("SiteName") %>'
Font-Bold="true" Font-Size="10pt"></asp:Label></td>
<td colspan="1" style="width: 799px">
<asp:Label ID="lblIncidentStatus" runat="server" Font-Bold="True" Font-Size="10pt"
Text="Current Status:"></asp:Label>
<asp:Label ID="IncidentStatus" runat="server" Text='<%# Eval("OutageShortDescription") %>' Font-Bold="True"
Font-Size="10pt" ForeColor="Blue"></asp:Label></td>
</tr>
<tr>
<td colspan="1" style="width: 125px">
<asp:Label ID="LblSiteImpacted" runat="server" Font-Bold="True" Font-Size="10pt"
Text="Site Impacted:"></asp:Label></td>
<td colspan="2" rowspan="1">
<asp:Label ID="SiteNameLabel" runat="server" Text='<%# Eval("StatusName") %>' Font-Bold="True"
Font-Size="10pt" ForeColor="Blue"></asp:Label></td>
</tr>
</table>
</div>
</ItemTemplate>
</asp:Repeater>
</asp:Content>
*code behind*
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Me.BindData()
End If
End Sub
Private Sub BindData()
' Get Connection string from Web Config
'Dim myConnection As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("IncidentConnectionString").ToString)
'' Create the command object, passing in the SQL string (Stored Procedure), Open the connection
'Const strSQL As String = "usp_incidentsummary_SELECT" 'Using a Stored Procedure
'Dim myCommand As New SqlCommand(strSQL, myConnection)
'myCommand.CommandType = CommandType.StoredProcedure
''Set the datagrid's datasource to the datareader and databind
'Dim resultsDataSet As New DataSet()
'Dim myDataAdapter As SqlDataAdapter = New SqlDataAdapter(strSQL, myConnection)
'myDataAdapter.Fill(resultsDataSet)
Dim resultsDataSet As DataSet = New DataSet()
Dim table As DataTable = New DataTable("MyTable")
resultsDataSet.Tables.Add(table)
table.Columns.Add("SiteName", GetType(String))
table.Columns.Add("StatusName", GetType(String))
table.Columns.Add("OutageShortDescription", GetType(String))
table.Columns.Add("IncidentID", GetType(Integer))
table.Columns.Add("LastUpdated", GetType(DateTime))
table.Rows.Add(New Object() {"Site1", "Open", "Description 1", 1, DateTime.Now})
table.Rows.Add(New Object() {"Site2", "Closed", "Description 2", 2, DateTime.Now.AddDays(-1)})
table.Rows.Add(New Object() {"Site3", "Pending", "Description 3", 3, DateTime.Now.AddHours(-2)})
rptFAQs.DataSource = resultsDataSet
rptFAQs.DataMember = table.TableName
rptFAQs.DataBind()
End Sub
End Class
*javascript*
function ToggleDisplay(id)
{
var elem = document.getElementById('d' + id);
if (elem)
{
if (elem.style.display != 'block')
{
elem.style.display = 'block';
elem.style.visibility = 'visible';
}
else
{
elem.style.display = 'none';
elem.style.visibility = 'hidden';
}
}
}
*style sheet*
.header { font-size: 10pt; font-weight: normal ; cursor: hand; cursor:pointer; background-color:gray; font-family: 'Trebuchet MS';}
.details { display:none; visibility:hidden; background-color:#eeeeee; font-family: 'Trebuchet MS'; }