<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="WhiteBoardDetail.aspx.cs" Inherits="Maintenance_TEC_WhiteBoardDetail" Title="<%$ Resources: SiteMapLocalizations, Maintenance_WhiteBoardDetail %>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<center>
    <asp:HiddenField ID="hidCondition" runat="server" />
    <asp:Label ID="lblPageTitle" Font-Bold="true" Font-Size="large" ForeColor="Red" runat="Server"></asp:Label>
    <br />
    <asp:Button ID="btnAddNew" runat="Server" Width="100px" Text="<%$ resources:Universal,Data_AddNew %>" OnClick="btnAddNew_Click" />
    <asp:Button ID="btnBack" runat="Server" Width="100px" Text="<%$ resources:Universal,Msg_Back %>" OnClientClick="javascript: window.location.replace('WhiteBoard.aspx'); return false;" />
    
    
    
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" PageSize="40"
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="WhiteBoardID" DataSourceID="ObjectDataSource1" EmptyDataText="null"
        ForeColor="#333333" GridLines="None" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" >
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

        <Columns>
            <asp:CommandField UpdateText="<%$ resources:Universal,Data_Update %>" InsertText="<%$ resources:Universal,Data_Save %>"
            CancelText="<%$ resources:Universal,Data_Cancel %>" EditText="<%$ resources:Universal,Data_Edit %>"
            DeleteText="<%$ resources:Universal,Data_Delete %>" />

            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblWhiteBoardID" runat="server" Text='<%# Eval("WhiteBoardID") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblWhiteBoardID" runat="server" Text='<%# Bind("WhiteBoardID") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lblWhiteBoardID" runat="server" Text='<%# Eval("WhiteBoardID") %>' />
               </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblYear" runat="server" Text='<%# Eval("Year") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblYear" runat="server" Text='<%# Bind("Year") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lblYear" runat="server" Text='<%# Request["Year"].ToString() %>' />
               </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblMonth" runat="server" Text='<%# Eval("Month") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblMonth" runat="server" Text='<%# Bind("Month") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lblMonth" runat="server" Text='<%# Request["Month"].ToString() %>' />
               </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblDay" runat="server" Text='<%# Eval("Day") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="lblDay" runat="server" Text='<%# Bind("Day") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Label ID="lblDay" runat="server" Text='<%# Request["Day"].ToString() %>' />
               </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ resources:Universal, Comm_Contents %>">
                <ItemTemplate>
                    <asp:Label ID="lblContents" runat="server" Text='<%# Eval("Contents") %>' Width="600px"/>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtContents" runat="server" Text='<%# Bind("Contents") %>' TextMode="multiLine" Rows="5" Width="600px"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtContents" runat="server" Text='<%# Bind("Contents") %>' TextMode="multiLine" Rows="5" Width="600px"></asp:TextBox>
               </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButtonEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        Text="<%$ resources:Universal,Data_Edit %>" />
                    <asp:LinkButton ID="LinkButtonDelete" runat="server" CausesValidation="False" CommandName="Delete"
                        Text="<%$ resources:Universal,Data_Delete %>" OnClientClick="<%$ Resources: Universal, Msg_DelConfirm %>" />
                </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>
                <FooterTemplate>
                    <asp:LinkButton ID="LinkButtonInsert" runat="server" ValidationGroup="AddValidationControls" CausesValidation="true" 
                        Text="<%$ resources:Universal,Data_Save %>"  CommandName="Insert" OnClick="Insert_Click" />
                    <asp:LinkButton ID="LinkButtonCancel" runat="server" CausesValidation="False" CommandName="Cancel" OnClick="InsertCancel_Click"
                         Text="<%$ resources:Universal,Data_Cancel %>" />
                </FooterTemplate>
            </asp:TemplateField>
        </Columns>
     
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <EditRowStyle BackColor="#999999" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>


    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="TEC_WhiteBoardData"
        SelectMethod="Select" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" 
        UpdateMethod="Update" DeleteMethod="Delete" >
        <InsertParameters>
            <asp:Parameter Name="Year" Type="int32" />        
            <asp:Parameter Name="Month" Type="int32" />
            <asp:Parameter Name="Day" Type="int32" />
            <asp:Parameter Name="Contents" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Contents" Type="String" />
            <asp:Parameter Name="original_WhiteBoardID" Type="int32" />
        </UpdateParameters>
        <DeleteParameters>
            <asp:Parameter Name="original_WhiteBoardID" Type="int32" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="Year" QueryStringField="Year" Type="int32" />
            <asp:QueryStringParameter Name="Month" QueryStringField="Month" Type="int32" />
            <asp:QueryStringParameter Name="Day" QueryStringField="Day" Type="int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

</center>
</asp:Content>

