<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Admin.Master" CodeBehind="DailyLog.aspx.vb" Inherits="Superbowl.DailyLog" 
    title="Untitled Page" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<link href='calendar_control/scripts/CalendarControl.css' rel='stylesheet' type='text/css'>
	<script src='calendar_control/scripts/CalendarControl.js' language='javascript'></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
<table width="100%" cellpadding="2">
    <tr>
        <td align="center" class="headings" colspan="4">Daily Operational Log</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td width="30%">&nbsp;</td>
    </tr>
    <tr>		 
        <td align="right">Start Date:</td>
        <td align="left"><asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox></td>
         <td align="right">End Date:</td>
        <td  align="left"><asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox></td>        
    </tr>	
    <tr>		 
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
        <td align="right"><asp:Button ID="btnSearch" runat="server" Text="Search" /></td>
        <td  align="left"><asp:Button ID="btnExport" runat="server" Text="Export" /></td>
    </tr>
    <tr>		 
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
    </tr>
    <tr>		 
        <td align="left" colspan="4" style="border: 1px solid maroon">
			  <asp:GridView ID="gvLog" runat="server" Width="100%" CellPadding="2" 
				  AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
				  DataSourceID="sdsLog" PageSize="25" HeaderStyle-CssClass="gvHeader" 
				  DataKeyNames="dtStamp">	  	
					<Columns>
						
					  <asp:BoundField DataField="dtStamp" HeaderText="Date" ReadOnly="True" 
              SortExpression="dtStamp" ItemStyle-Wrap="False" >
<ItemStyle Wrap="False"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="strFile" HeaderText="File" 
              SortExpression="strFile"  ItemStyle-Wrap="False">
<ItemStyle Wrap="False"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="strAction" HeaderText="Action" 
              SortExpression="strAction"  ItemStyle-Wrap="False">
            <HeaderStyle Width="25%" />
<ItemStyle Wrap="True"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="strLog" HeaderText="Log" 
              SortExpression="strLog" >
            <HeaderStyle Width="35%" />
            </asp:BoundField>
            <asp:BoundField DataField="blnEmail" HeaderText="Emailed" 
              SortExpression="blnEmail" ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
             <asp:BoundField DataField="refStamp" HeaderText="Grouped Time Stamp" 
               SortExpression="refStamp" />
						
					</Columns>
					<HeaderStyle CssClass="gvHeader"/>				  
				  <AlternatingRowStyle CssClass="lightergrey" />
				   <PagerSettings PageButtonCount="20" Mode="NumericFirstLast" FirstPageText="<B>&lt;&lt;</B>" LastPageText="<B>&gt;&gt;</B>" />
				  <RowStyle CssClass="gvItem" />		
			  </asp:GridView>
			    <asp:SqlDataSource ID="sdsLog" runat="server" 
            ConnectionString="<%$ ConnectionStrings:csStockControl %>" 
            SelectCommand="SELECT [dtStamp], [strFile], [strAction], [strLog], [refStamp], CASE WHEN [blnEmail] = 0 THEN 'Yes' ELSE 'No' END AS blnEmail FROM [dlyImportLog] ORDER BY [dtStamp]">
          </asp:SqlDataSource>
			  <asp:Label ID="lblMessage" CssClass="redBold" runat="server" Text=""></asp:Label>
			  <asp:GridView ID="gvExport" runat="server" 
				  AlternatingRowStyle-CssClass="lightergrey"  HeaderStyle-CssClass="gvHeader" 
						SelectedRowStyle-CssClass="gvItem" CellPadding="0" visible="False" 
				  DataSourceID="sdsLog" AutoGenerateColumns="False" DataKeyNames="dtStamp">
				   <Columns>
						
					   <asp:BoundField DataField="dtStamp" HeaderText="TimeStamp" ReadOnly="True" 
               SortExpression="dtStamp" />
             <asp:BoundField DataField="strFile" HeaderText="File" 
               SortExpression="strFile" />
             <asp:BoundField DataField="strAction" HeaderText="Action" 
               SortExpression="strAction" />
             <asp:BoundField DataField="strLog" HeaderText="Log" 
               SortExpression="strLog" />
             <asp:BoundField DataField="blnEmail" HeaderText="Emailed" 
               SortExpression="blnEmail" ItemStyle-HorizontalAlign="Center" />
             <asp:BoundField DataField="refStamp" HeaderText="GroupByTimeStamp" 
               SortExpression="refStamp" />
						
					</Columns>
				   <SelectedRowStyle CssClass="gvItem" />
					<HeaderStyle CssClass="gvHeader" />
					<AlternatingRowStyle CssClass="lightergrey" />	  						
			  </asp:GridView>	  		  
		  	
		  </td>
    </tr>
    <tr>		 
        <td align="left"><asp:CheckBox ID="chkResize" runat="server" AutoPostBack="True" CssClass="red" Text="Show 1000" /></td>
        <td  align="left">&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
    </tr>
</table>




</asp:Content>
