<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="WhiteBoard.aspx.cs" Inherits="TEC_WhiteBoard" Title="TEC_WhiteBoard" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<center>
    <asp:HiddenField ID="hidCurrentDate" runat="server" />

    <table>
        <tr>
            <td style="width: 100px">
                <asp:HyperLink ID="hlPreviousMonth" runat="server"><</asp:HyperLink></td>
            <td style="width: 100px">
                <asp:Label ID="lblCurrentMonth" runat="server" Text="Label"></asp:Label></td>
            <td style="width: 100px">
                <asp:HyperLink ID="hlNextMonth" runat="server">></asp:HyperLink></td>
        </tr>
    </table>
    <asp:GridView DataSourceID="ObjectDataSource1" ID="GridView1" AutoGenerateColumns="false"
    runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowDataBound="GridView1_RowDataBound" >
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#DFF3FB" Font-Size="x-small" />
        <EditRowStyle Width="50px" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
        
        <Columns>
<%--            <asp:CommandField UpdateText="<%$ resources:Universal,Data_Update %>"
            CancelText="<%$ resources:Universal,Data_Cancel %>" EditText="<%$ resources:Universal,Data_Edit %>"
            DeleteText="<%$ resources:Universal,Data_Delete %>" />
--%>
            <asp:HyperLinkField DataNavigateUrlFields="Year,Month,Day"  DataNavigateUrlFormatString="WhiteBoardDetail.aspx?Year={0}&Month={1}&Day={2}"
                Text="<%$ resources:Universal,Data_Edit %>" />
<%--
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButtonEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        Text="<%$ resources:Universal,Data_Edit %>" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:LinkButton ID="LinkButtonUpdate" runat="server" ValidationGroup="AddValidationControls" CausesValidation="true"
                        Text="<%$ resources:Universal,Data_Update %>" CommandName="Update" />
                    <asp:LinkButton ID="LinkButtonCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="<%$ resources:Universal,Data_Cancel %>" />
                </EditItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="<%$ resources:Universal,Comm_Year %>" Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblYear" runat="server" Text='<%# Eval("Year") %>' />
                </ItemTemplate>
                <ItemStyle ForeColor="Blue" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ resources:Universal,Comm_Month %>" Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblMonth" runat="server" Text='<%# Eval("Month") %>' />
                </ItemTemplate>
                <ItemStyle ForeColor="Blue" />
            </asp:TemplateField>
            <asp:TemplateField >
                <ItemTemplate>
                    <asp:Label ID="lblDay" runat="server" Text='<%# Eval("Day") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblDay" runat="server" Text='<%# Eval("Day") %>' />
                </EditItemTemplate>
                <ItemStyle ForeColor="Blue" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="lblWeekDay" runat="server" Text='' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblWeekDay" runat="server" Text='' />
                </EditItemTemplate>
                <ItemStyle ForeColor="Blue" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ resources:Universal,Comm_Contents %>">
                <ItemTemplate>
                    <asp:Label ID="lblContents" runat="server" Text='<%# Eval("Contents") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtContents" runat="Server" Text='<%# Bind("Contents") %>' TextMode="multiLine" Rows="10" Width="600px"></asp:TextBox>
                </EditItemTemplate>
                <ItemStyle HorizontalAlign="Left" Width="600px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="TEC_WhiteBoardData"
        SelectMethod="SelectByMonth" InsertMethod="Insert"
        UpdateMethod="Update" DeleteMethod="Delete" ><%--FilterExpression="IsClosed='{0}'">--%>
        <UpdateParameters>
            <asp:Parameter Name="Year" Type="Int32" />        
            <asp:Parameter Name="Month" Type="Int32" />
            <asp:Parameter Name="Day" Type="Int32" />
            <asp:Parameter Name="Contents" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter Name="Year" Type="Int32" />
            <asp:Parameter Name="Month" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</center>
</asp:Content>

