<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterFile/TimeCheck.master"
    CodeFile="TA_UI_Master_LevelChild.aspx.cs" Inherits="Masters_TA_UI_Master_LevelChild" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="server">
    <table border="0" cellspacing="0" cellpadding="0" width="500">
        <tr>
            <td valign="top" width="15">
                <img src="../Images/corner1.gif" width="15" height="15" /></td>
            <td valign="top" background="../Images/sideline.gif" bgcolor="#EAEAEA" width="365">
                <img src="../Images/spacer.gif" width="1" height="1" /></td>
            <td valign="top" width="11">
                <img src="../Images/corner2.gif" width="15" height="15" /></td>
        </tr>
        <tr>
            <td background="../Images/line.gif" width="15">
                &nbsp;</td>
            <td valign="top" bgcolor="#EAEAEA">
                <table border="0" align="center" cellpadding="0" cellspacing="1" width="500">
                    <tr>
                        <td valign="top" align="left" class="ModuleTitle">
                            <asp:Label ID="lblHead" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="grvLevel" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                CssClass="td" Width="500px" AllowSorting="True" DataSourceID="ObjectDataSource1"
                                CellPadding="4">
                                <Columns>
                                    <asp:TemplateField HeaderText="Level ID" Visible="False">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLevelID" Text='<%# Eval("Id") %>' runat="server"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="checkall" OnClick="javascript: return select_all(this.checked,this.id);"
                                                runat="server" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="deletethis" OnClick="javascript: return select_all(this.checked,this.id);"
                                                runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Level No" SortExpression="levelId">
                                        <ItemTemplate>
                                            <asp:Label ID="lblleveId" Text='<%# Eval("levelId") %>' runat="server">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Parent Level" SortExpression="parentLevelId">
                                        <ItemTemplate>
                                            <%--<a href="TA_UI_Master_LevelDetails.aspx?tid=<%# Eval("parentId") %>&sid=<%=Session.SessionID %>">--%>
                                            <asp:Label ID="lblparentId" Text='<%# Eval("parentId") %>' runat="server">                                                        
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Level Name" SortExpression="levelName">
                                        <ItemTemplate>
                                            <a href="TA_UI_Master_LevelChild.aspx?tid=<%# Eval("Id") %>&sid=<%=Session.SessionID %>">
                                                <asp:Label ID="lblLevelName" Text='<%# Eval("Name") %>' runat="server"></asp:Label></a>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Description" SortExpression="description">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDescription" Text='<%# Eval("description") %>' runat="server">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Modify">
                                        <ItemTemplate>
                                            <a href="TA_UI_Master_LevelChildModify.aspx?tid=<%# Eval("levelId") %>&chID=<%# Eval("Id") %>&sid=<%=Session.SessionID %>">
                                                <asp:Label ID="lblModify" Text='Modify' runat="server">                                                        
                                                </asp:Label></a>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle Height="30px" />
                                <PagerStyle VerticalAlign="Bottom" HorizontalAlign="Right" Font-Overline="False"
                                    Font-Size="Smaller" />
                                <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last"
                                    NextPageText="Next" PreviousPageText="&lt;" />
                            </asp:GridView>
                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="selectChildLevel"
                                TypeName="org_levelsEventData">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="lel_Id" QueryStringField="tid" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" valign="bottom">
                            <table width="43%" border="0" align="center" cellpadding="5" cellspacing="0">
                                <tr>
                                    <td align="right" valign="middle">
                                    </td>
                                    <td align="left" valign="middle">
                                        <%--<asp:Button ID="btn_Modify" runat="server" ImageUrl="../Images/button_r4_c6.jpg" OnClick="btn_Modify_Click"/>--%>
                                    </td>
                                    <td align="left" valign="middle">
                                        <asp:Button ID="btn_Add" runat="server" OnClick="btn_Add_Click" /></td>
                                    <td align="left" valign="middle">
                                        <asp:Button ID="btn_cancel" runat="server" OnClick="btn_cancel_Click" />
                                    </td>
                                    <td align="left" valign="middle">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
            <td background="../Images/line1.gif" width="11">
                &nbsp;</td>
        </tr>
        <tr>
            <td valign="bottom" width="15">
                <img src="../Images/corner3.gif" width="15" height="16" /></td>
            <td valign="bottom" background="../Images/sideline1.gif" bgcolor="#EAEAEA" width="365">
                <img src="../Images/spacer.gif" width="1" height="1" /></td>
            <td valign="bottom" width="11">
                <img src="../Images/corner4.gif" width="15" height="16" /></td>
        </tr>
    </table>
</asp:Content>
