<%@ Page Title="" Language="C#" MasterPageFile="~/EmptyAjaxMaster.Master" AutoEventWireup="true" CodeBehind="ChecklistEntitySelectionPage.aspx.cs" Inherits="MKInsight.Online.ActionTracking.TimeRecording.ChecklistEntitySelectionPage" %>
<%@ Register Src="../UIControls/TimeRecording/Audit/AuditSearchControl.ascx" TagName="AuditSearchControl" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../UIControls/PopupPanel.ascx" TagName="PopupPanel" TagPrefix="uc5" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="../UIControls/Interface/SimpleSectionBreak.ascx" TagName="SimpleSectionBreak" TagPrefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="h" runat="server">
    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>

    <link rel="stylesheet" type="text/css" href="../scripts/ASTJavascript/astreeview/astreeview.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/ASTJavascript/asdropdowntreeview/dropdowntreeview.css" />
    <script type="text/javascript" src="../scripts/ASTJavascript/astreeview/astreeview_packed.js"></script>

    <script type="text/javascript">

        function cb() {
            parent.$.colorbox.close();
            $('[id*=btn_partial_refresh]', parent.document).click();
        }

        function cb2() {
            parent.$.colorbox.close();
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cm" runat="server">
    <asp:UpdatePanel ID="up_u" runat="server">
        <ContentTemplate>


            <table style="width: 100%">
                <tr>
                    <td>
                        <uc1:AuditSearchControl ID="u_audit" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="p_w" runat="server" Visible="false">
                            <table style="width: 100%">
                                <tr>
                                    <td>
                                        <uc2:SimpleSectionBreak ID="lbl_WPs" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>

                                        <cc4:MKGridView ID="dg_c" runat="server" AllowSorting="true" AllowPaging="false"
                                            AutoGenerateColumns="False" BorderStyle="None" CellPadding="3" DataKeyNames="ID"
                                            Font-Size="8pt" OnRowDataBound="OnRowDataBound" Width="95%" OnSorting="OnGridSorting"  OnSelectedIndexChanged="OnCheckListSelected">
                                            <AlternatingRowStyle CssClass="alternatingrowstyle" />
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
                                            <PagerStyle HorizontalAlign="Left" />
                                            <Columns>
                                                <asp:TemplateField Visible="false" HeaderStyle-Width="0">
                                                    <ItemTemplate>
                                                        <asp:HiddenField ID="hdID" runat="server" Value='<%# Eval("ID") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:CommandField HeaderText="Select" ShowSelectButton="True" />                                                
                                                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                                <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
                                                
                                            </Columns>
                                            <SelectedRowStyle BackColor="#D6E8FF" Font-Bold="True" ForeColor="Black" />
                                        </cc4:MKGridView>
                                        <asp:Label ID="lbl_Info" runat="server" ForeColor="Blue" Visible="false"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <hr class="ee" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="divfright">
                                            <asp:Button ID="btn_Back" runat="server" OnClick="OnBack" />
                                            <asp:Button ID="btn_Finish" runat="server" Enabled="false" OnClick="OnAddCheckListCode" />
                                        </div>
                                    </td>
                                </tr>
                            </table>

                        </asp:Panel>
                    </td>
                </tr>


            </table>

              <cc1:ModalPopupExtender ID="mdp" runat="server" TargetControlID="btn_pHandler" PopupControlID="Pxc"
                BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <cc1:DragPanelExtender ID="dpE" runat="server" DragHandleID="pnlHeader" TargetControlID="pxc" />
            <asp:Button ID="btn_pHandler" runat="server" Style="display: none;" />
            <asp:Panel ID="Pxc" runat="server" CssClass="frame" Style="display: none; margin-top: 10px;">
                <div class="overlay">
                    <div style="float: right; margin-top: -28px; margin-right: -10px;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/jq/close.png" runat="server" />
                    </div>
                    <div style="float: right;">
                        <asp:Button ID="btn_TopOK" runat="server" OnClick="OnOK" />
                        <asp:Button ID="btn_TopCancel" runat="server" />
                    </div>
                    <uc5:PopupPanel ID="usc_PP" runat="server" />


                    <div class="divpok">
                        <asp:Button ID="btn_POK" runat="server" OnClick="OnOK" />
                        <asp:Button ID="btn_PCancel" runat="server" />
                    </div>


                </div>
            </asp:Panel>

        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
