<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Library_BookDataBulkUpdate, App_Web_zand5342" 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">
    <style type="text/css">
        input:disabled + input[type=image], input:read-only + a {
            pointer-events: visible;
            cursor: pointer !important;
        }
    </style>
    <asp:UpdatePanel ID="BookSearchUpdatePanel" 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-database"></i>
                                            <asp:Label ID="SearchHeaderLabel" runat="server" Text="Update"></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="CategoryLabel" runat="server" Text="Category" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchCategoryDropDownList" SkinID="CustomWidthDropDownList"
                                                onmouseleave="showHideTooltip()" AutoPostBack="true" CssClass="form-control" onmouseenter="showHideTooltip()" OnSelectedIndexChanged="CategoryDropDownList_SelectedIndexChanged">
                                                <asp:ListItem Text=" - Select - " Value="0"></asp:ListItem>
                                                <asp:ListItem Text="Book Information" Value="1"></asp:ListItem>
                                                <asp:ListItem Text="Other Information" Value="2"></asp:ListItem>
                                                <asp:ListItem Text="Purchase Information" Value="3"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SubCategoryLabel" runat="server" Text="SubCategory" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchSubCategoryDropDownList" SkinID="CustomWidthDropDownList"
                                                onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="SearchSubCategoryDropDownList_SelectedIndexChanged">
                                                <asp:ListItem Text=" - Select - " Value="0"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CodeLabel" runat="server" Text="Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="CodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="25" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="Subject" runat="server" Text="Subject"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SubjectTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="200" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="LanguageLabel" runat="server" Text="Language"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="LanguageTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="200" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="BookTagLabel" runat="server" Text="Book Tag"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="BookTagTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="200" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop15 p-l-10 col-md-3">
                                        <asp:CheckBox ID="IsBlankCheckBox" runat="server" Text="Empty Data" class="pLeft5" />
                                    </div>
                                    <%--mantis 0040042 : Added Filter 'From Code' TO 'To Code' : By Krunal K Patel .--%>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="FromCodeLabel" runat="server" Text="From Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="FromCodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="200" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>                                    
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ToCodeLabel" runat="server" Text="To Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ToCodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="200" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="alignCenter pTop5 col-md-12 center">
                                        <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click"
                                            SkinID="0" class="btn-search btn fas" />
                                        <asp:Button ID="SaveButton" Text="&#xf0c7; Save" runat="Server" OnClick="SaveButton_Click"
                                            SkinID="0" class="btn-save btn fas" />
                                        <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click"
                                            SkinID="0" class="btn-reset btn fas" />
                                        <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                            <i class="fas fa-upload"></i>Browse</a>
                                        <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />

                                        <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel"
                                            SkinID="0" CssClass="fas btn btn-examcommon" OnClick="ImportFromExcelButton_Click" />
                                        <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click"
                                            SkinID="0" class="btn-examcommon btn fas" />

                                    </div>

                                    <div id="BookListGridDiv" runat="server" visible="false">

                                        <div class="himssuHeader7WireBox col-md-12 ">
                                            <div class="himsBoxHeader card-head inner" id="BookListGridViewPagerDiv" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <div class="headerText fLeft">
                                                        <asp:Label ID="GridViewLabel" Text="" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="fRight display-flex">
                                                    <asp:TextBox ID="ApplyAllTextBox" runat="server" ClientIDMode="Static" MaxLength="100"
                                                        SkinID="CustomWidthTextBox" Width="100px"></asp:TextBox>
                                                    <asp:DropDownList ID="ApplyAllSubCategoryDropDownList" runat="server" Visible="false" SkinID="CustomWidthDropDownList"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Width="160px" class="form-control">
                                                    </asp:DropDownList>
                                                    <Date:DatePickerControl ID="ApplyAllSubCategoryDatePicker" runat="server" DisplayDatePicker="true" Visible="false" />

                                                    &nbsp;&nbsp;&nbsp;  
                                                        <asp:Button ID="ApplyAllButton" runat="server" OnClick="ApplyAllButton_Click"
                                                            Text="&#xf058; Apply All" SkinID="0" CssClass="btn btn-apply fas" />

                                                </div>
                                            </div>
                                            <div class="himsBoxContent table-responsive">
                                                <asp:GridView runat="server" ID="BookListGridView" AutoGenerateColumns="False"
                                                    EmptyDataText="No records available for the seacrh criteria!"
                                                    AllowPaging="false" DataKeyNames="BookId,SubCategory" ShowHeader="True" meta:resourcekey="BookListGridViewResource1"
                                                    CssClass="table table-striped table-bordered table-hover" OnRowDataBound="BookListGridView_RowDataBound">
                                                    <Columns>
                                                        <asp:BoundField DataField="Code" HeaderText="Book Code" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="Title" HeaderText="Book Name" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left" />

                                                        <asp:TemplateField HeaderText="Book Data" ItemStyle-Width="60%" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:DropDownList ID="SubCategoryDropDownList" runat="server" Visible="false" SkinID="CustomWidthDropDownList"
                                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Width="160px" class="form-control">
                                                                </asp:DropDownList>
                                                                <asp:TextBox ID="SubCategoryTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false">
                                                                </asp:TextBox>
                                                                <asp:Panel ID="CheckBoxPanel" runat="server" Visible="false">
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="SubCategoryCheckBox" runat="server" Visible="false" />
                                                                        <span></span>
                                                                    </label>
                                                                </asp:Panel>
                                                                <Date:DatePickerControl ID="SubCategoryDatePicker" runat="server" DisplayDatePicker="true" Visible="false" />
                                                                <acc:AutoCompleteControl ID="SubCategoryAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                                    MaxLength="200" DisplayLoadingStatus="true" SkinID="CustomWidthTextBox"
                                                                    Width="154px" ValidateOnTextChanged="false" Visible="false" />
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="40%" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                                <asp:HiddenField ID="hfFeeAllocationGridViewSV" runat="server" />
                                                <asp:HiddenField ID="hfFeeAllocationGridViewSH" runat="server" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                    </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>

    <%--<script type="text/javascript">
        window.onload = function () {
            FreezGrid();
        };

        var x = 0;



        function FreezGrid() {

            $('#<%=BookListGridView.ClientID%>').gridviewScroll({
                width: "99.99%",
                height: 380,
                overflow: "Scroll",
                railsize: 1,
                freezesize: 0, // Freeze Number of Columns.
                startVertical: $("#<%=hfFeeAllocationGridViewSV.ClientID%>").val(),
                <%--startHorizontal: $("#<%=hfFeeAllocationGridViewSH.ClientID%>").val(),--%>
    <%--onScrollVertical: function (delta) {
                    // alert(delta);
                    $("#<%=hfFeeAllocationGridViewSV.ClientID%>").val(delta);
                },--%>
    <%--onScrollHorizontal: function (delta) {
                    $("#<%=hfFeeAllocationGridViewSH.ClientID%>").val(delta);
                }--%>
    <%--  })
        }--%>
</asp:Content>

