<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Library_BookLog, App_Web_jv32n5u1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/Library/LibraryDetailBoxControl.ascx" TagName="LibraryControl" TagPrefix="Library" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="BookLogSearchUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="174"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <Library:LibraryControl ID="LibraryUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="SearchHeaderPanel" runat="server" meta:resourcekey="SearchHeaderPanelResource1">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="SearchHeaderLabel" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <asp:Panel ID="SearchDetailPanel" runat="server" meta:resourcekey="SearchDetailPanelResource1">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OrganizationLabel" Text="Organization" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="BatchLable" Text="Batch" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="BatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" onmouseenter="showHideTooltip()"
                                                OnSelectedIndexChanged="DepartmentDropDownList_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" onmouseenter="showHideTooltip()"
                                                OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="DivisionLabel" runat="server" Text="Division"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchReaderSourceTypeLabel" runat="server" Text=" Reader Source Type"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchReaderSourceTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                <asp:ListItem Text="- ALL -" Value="-1" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Student" Value="2003"></asp:ListItem>
                                                <asp:ListItem Text="Employee" Value="95"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchReaderCodeLabel" runat="server" Text="ID No / Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SearchReaderCodeTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="20"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchReaderNameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SearchReaderNameTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="200"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchResourceCodeLabel" runat="server" Text="Book Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SearchResourceCodeTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="20"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchResourceNameLabel" runat="server" Text="Book Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SearchResourceNameTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="200"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchBookStatusLabel" runat="server" Text="Book Status"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchBookStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchFromDateLabel" runat="server" Text="From Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePicker" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchToDateLabel" runat="server" Text="To Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePicker" runat="server" />
                                        </div>
                                    </div>
                                    <div id="SUIdDiv" class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SUIdLabel" runat="server" Text="SU Id"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SUIdTextBox" runat="server" SkinID="CustomWidthTextBox" Width="150px"
                                                MaxLength="50"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop15 col-md-3">
                                        <div class="fLeft pRight5">
                                            <asp:CheckBox ID="IsCurrentStatusCheckBox" runat="server" Text="Current Status" />
                                        </div>
                                    </div>

                                    <div class="alignCenter pTop5 col-md-12 center">
                                        <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                            SkinID="0" class="btn-search btn fas" />
                                        <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" OnClick="ClearSearchControls_Click"
                                            SkinID="0" class="btn-reset btn fas" />
                                        <asp:Button ID="PrintButton" runat="server" Text="&#xf15b; Print" OnClick="PrintButton_Click"
                                            SkinID="0" class="btn-report btn fas" />
                                    </div>
                                    <div id="BookLogListGridDiv" runat="server">

                                        <div class="himssuHeader7WireBox col-md-12">
                                            <div class="himsBoxHeader card-head inner" id="BookLogListGridViewPagerDiv" runat="server" visible="False">
                                                <div class="leftdiv">
                                                </div>
                                                <%--  <%--  <div class="himsBoxTitle">
                                                                <%--<div class="gridHeaderText">
                                                                <header>
                                                                <asp:Label ID="AssignRouteLabel" runat="server" Text="Book Log"></asp:Label>
                                                                </header>
                                                                </div>--%>
                                                <%--   <div class="fRight">
                                                                    <uc1:GridViewPager ID="BookLogListGridViewPager" ParentGridView="BookLogListGridView"
                                                                        runat="server" OnFirstRecordClick="BookLogListGridViewPager_FirstRecordClick"
                                                                        OnLastRecordClick="BookLogListGridViewPager_LastRecordClick" OnNextRecordClick="BookLogListGridViewPager_NextRecordClick"
                                                                        OnPrevRecordClick="BookLogListGridViewPager_PrevRecordClick" OnTextBoxValueChange="BookLogListGridViewPager_TextBoxValueChange" />
                                                                </div>
                                                            </div>--%>


                                                <div class="himsBoxHeader" id="Div2" runat="server" visible="true">
                                                    
                                                     <%--   <div class="gridHeaderText">
                                                            <asp:Label ID="GridHeaderLabel" Text="" runat="server" />
                                                        </div>--%>
                                                        <div class="col-md-12 padd-0">
                                                            <div class="col-md-5">
                                                                <div class="col-md-3 padd-0">
                                                                    <asp:Label ID="RecordsPerPage" Text="Records per Page : " runat="server" />
                                                                </div>
                                                                <div class="col-md-3 padd-0">
                                                                    <asp:DropDownList ID="AddRowsToGridDropDownList" SkinID="CustomWidthDropDownList" Width="65px" runat="server"
                                                                        AutoPostBack="true" OnSelectedIndexChanged="AddRowsToGridDropDownList_SelectedIndexChanged" class="form-control">
                                                                        <asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                        <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                        <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-7s">
                                                                <uc1:GridViewPager ID="BookLogListGridViewPager" ParentGridView="BookLogListGridView"
                                                                    runat="server" OnFirstRecordClick="BookLogListGridViewPager_FirstRecordClick"
                                                                    OnLastRecordClick="BookLogListGridViewPager_LastRecordClick" OnNextRecordClick="BookLogListGridViewPager_NextRecordClick"
                                                                    OnPrevRecordClick="BookLogListGridViewPager_PrevRecordClick" OnTextBoxValueChange="BookLogListGridViewPager_TextBoxValueChange" />

                                                            </div>
                                                        </div>
                                                   
                                                </div>



                                            </div>
                                            <div class="himsBoxContent pTop10">
                                                <asp:GridView runat="server" ID="BookLogListGridView" class="himssuHeader7WireBox col-md-12 table-responsive" AutoGenerateColumns="False"
                                                    EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="BookLogListGridView_RowDataBound"
                                                    AllowPaging="True" PageSize="10" DataKeyNames="BookLogId,ResourceCode" OnSelectedIndexChanged="BookLogListGridView_SelectedIndexChanged"
                                                    ShowHeader="true" meta:resourcekey="BookLogListGridViewResource1"
                                                    CssClass="table table-striped table-bordered">
                                                    <Columns>
                                                        <asp:CommandField ShowSelectButton="True" meta:resourcekey="CommandFieldResource1">
                                                            <ItemStyle HorizontalAlign="Center" Width="3%" />
                                                        </asp:CommandField>
                                                        <asp:TemplateField ItemStyle-Width="6%" ItemStyle-Wrap="true" HeaderText="Reader Type"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="ReaderSourceTypeLabel" SkinID="CustomWidthLabel" Text='<%# ((Sapphire.Vidyalaya.BusinessEntity.Business.LibraryBE.BookLog)Container.DataItem).ReaderSourceType %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="SUId" HeaderText="SUId" ItemStyle-Width="9%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="ReaderCode" HeaderText="Reader Code" ItemStyle-Width="6%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="ReaderName" HeaderText="Reader Name" ItemStyle-Width="18%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="ClassDept" HeaderText="Class / Department" ItemStyle-Width="5%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="ResourceCode" HeaderText="Book Code" ItemStyle-Width="9%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="ResourceName" HeaderText="Book Name" ItemStyle-Width="18%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="LogDate" HeaderText="Log Date" DataFormatString="{0:dd/MM/yyyy}"
                                                            ItemStyle-Width="6%" HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:TemplateField ItemStyle-Width="6%" ItemStyle-Wrap="true" HeaderText="Due Date"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="DueDateLabel" SkinID="CustomWidthLabel"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <%-- <asp:BoundField DataField="TransactionStatus" HeaderText="Transaction Status" ItemStyle-Width="8%"
                                                                        HeaderStyle-HorizontalAlign="Left" />--%>

                                                        <asp:TemplateField ItemStyle-Width="7%" HeaderText="Status" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:Label ID="StatusNameLabel" runat="server" Text='<%# ((Sapphire.Vidyalaya.BusinessEntity.Business.LibraryBE.BookLog)Container.DataItem).StatusName %>' Font-Bold="true" SkinID="CustomWidthLabel"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField Visible="false">
                                                            <ItemTemplate>
                                                                <asp:Label ID="StatusIdLabel" runat="server" Text='<%# ((Sapphire.Vidyalaya.BusinessEntity.Business.LibraryBE.BookLog)Container.DataItem).StatusId %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="BatchName" HeaderText="Issued Batch" ItemStyle-Width="8%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="OrgName" HeaderText="Issued Org" ItemStyle-Width="8%"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
