<%@ page language="C#" autoeventwireup="true" inherits="Pages_MaterialManagement_Procurement_StockIssueStudentBulk, App_Web_juwaiqy3" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Common/Stock/StockDetailBoxControl.ascx" TagName="StockControl" TagPrefix="Stock" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">

    <asp:UpdatePanel ID="OTQueueListingUpdatePanel" runat="server">
        <ContentTemplate>
            <style>
                .customscrolltable tr th:first-child,
                .customscrolltable tr td:first-child {
                    width: 150px;
                }

                .rollno_row {
                    min-width: 80px !important;
                }

                .classno_row th:nth-child(4) {
                    min-width: 90px !important;
                }

                .classno_row th:nth-child(5) {
                    min-width: 150px !important;
                }

                .classno_row th:nth-child(6),
                .classno_row th:nth-child(10) {
                    min-width: 80px !important;
                }

                .classno_row th:nth-child(7),
                .classno_row th:nth-child(8),
                .classno_row th:nth-child(9) {
                    min-width: 110px !important;
                }
            </style>
            <input type="hidden" id="hdnSessionid" runat="server" />
            <table border="0" style="vertical-align: top; margin-top: -1px; border-collapse: collapse;">
                <tr>
                    <td class="dashBoardLeftCont">
                        <div class="himssuHeader3WireBox">
                            <table>
                                <tr>
                                    <td>
                                        <div class="himsBoxContent">
                                            <div class="leftUlMenu">
                                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="160"
                                                    Visible="true" runat="server" />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>

            <div class="whiteboxpaddingleft row">
                <Stock:StockControl ID="StockUserControl" runat="server" Visible="true" />
                <div class="card card-box col-md-12 p-0">
                    <div class="himsBoxContent card-body">
                        <%--Added for mantis : 37719--%>
                        <asp:Panel ID="DetailPanel" runat="Server">
                            <div class="contentHolder">
                                <div class="tableContainer">
                                    <cc1:TabContainer Width="100%" ID="FeeAllocationTabContainer" runat="server" CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox ajax__tab_container ajax__tab_default"
                                        AutoPostBack="true" meta:resourcekey="FeeAllocationTabContainerResource1" ActiveTabIndex="0">
                                        <cc1:TabPanel Width="100%" ID="ImportStockIssuePanel" runat="server" HeaderText="ImportStockIssue">
                                            <HeaderTemplate>
                                                <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                    <li class="fancyTab"><a><i class="fas fa-money-bill-alt"></i>&nbsp;Stock Issue Student Bulk</a></li>
                                                </ul>
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <div class="col-md-6">
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="SearchForClassLabel" runat="server" Text="Class" SkinID="mandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" AutoPostBack="true" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <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="cBoth"></div>
                                                    <div class="outerBox pTop5 col-md-12">
                                                        <div class="outerBox pTop5">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="lblCode" runat="server" Text="Student Code" meta:resourcekey="codelike"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:TextBox ID="txtcodelike" runat="server"></asp:TextBox>
                                                                <div class="cBoth"></div>
                                                                <b>
                                                                    <asp:Label ID="Label1" runat="server" ForeColor="#a94442" Text="For Search Multiple Record (Eg.2,5,20)"></asp:Label></b>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="col-md-6">
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="MainGroupLabel2" SkinID="mandatoryLabel" runat="server" Text="Main Group"></asp:Label>
                                                        </div>
                                                        <asp:DropDownList ID="ItemMainGroupDropDownList" runat="server" CssClass="form-control"
                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" OnSelectedIndexChanged="ItemMainGroupDropDownList_SelectedIndexChanged" AutoPostBack="true" />
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="SearchSubGroupLabel" runat="server" Text="Sub Group"
                                                                meta:resourcekey="Label11Resource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList ID="ItemSubGroupDropDownList"
                                                                runat="server" onmouseleave="showHideTooltip()" AutoPostBack="false" SkinID="CustomWidthDropDownList" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                                meta:resourcekey="MainGroupDropDownListResource1">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>

                                                    <div class="cBoth"></div>
                                                    <div class="outerBox pTop5 col-md-12">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="lblitemNameLike" runat="server" Text="SubGroup Name" meta:resourcekey="ItemName1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="txtitemlike" runat="server"></asp:TextBox>
                                                            <div class="cBoth"></div>
                                                            <b>
                                                                <asp:Label ID="Label3" runat="server" ForeColor="#a94442" Text="For Search Multiple Record (Eg.FAN,BOOK,SHIRT)"></asp:Label></b>
                                                        </div>
                                                    </div>
                                                </div>

                                                <%-- <div class="col-md-12 pTop15" id="CodeNoteDiv" runat="server">
                            <div class="alert alert-info">
                                <i class="material-icons">info</i> |&nbsp;
                                <asp:Label ID="RamarkLabel" runat="server" Text="Add Student Code and SubGroup Name with , Comma sepration without any Space (Eg. 2. 5. 10)" Font-Bold="true"></asp:Label>
                            </div>
                        </div>--%>

                                                <div class="outerBox pTop15 col-md-12">
                                                    <div class="searchBoxBtn alignCenter col-md-6">
                                                        <asp:Button ID="SearchStudentButton" Text="&#xf002; Search Student" runat="server"
                                                            OnClick="SearchStudentButton_Click" SkinID="0" CssClass="fas btn btn-search" />
                                                    </div>
                                                    <div class="searchBoxBtn alignCenter col-md-6">
                                                        <asp:Button ID="SearchItemButton" Text="&#xf002; Search Item" runat="server"
                                                            OnClick="SearchItemButton_Click" SkinID="0" CssClass="fas btn btn-search" />
                                                    </div>
                                                </div>
                                                <%--Added for mantis : 38706--%>
                                                <div id="StockKitDiv" runat="server" visible="true">
                                                    <div class="outerBox11 pTop5 col-md-3" style="float: right; margin-bottom: 6px; margin-top: -8px;">
                                                        <div class="controlLabelWidth">
                                                            <asp:CheckBox ID="StockKitCheckBox" runat="server" Visible="true" AutoPostBack="True" OnCheckedChanged="StockKitCheckBox_CheckedChanged" />
                                                            <asp:Label ID="SubCategoryBulkLabel" runat="server" Text="Stock Kit" class="pLeft5"></asp:Label>
                                                        </div>
                                                        <div runat="server" class="fLeft pRight5 chck-dropdown-onclick bg-lghtgrey outerBox11 col-md-12 overflow-x-hidden padd-0">
                                                            <asp:CheckBoxList ID="StockKitCheckBoxList" runat="server" AutoPostBack="true" OnSelectedIndexChanged="StockKitCheckBoxList_CheckedChanged">
                                                            </asp:CheckBoxList>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="cBoth"></div>
                                                <div id="IssuedDataDiv" class="col-md-6" runat="server" style="float: left;" visible="false">
                                                    <div class="outerBox pTop5 col-md-4">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="IssuedByLabel" runat="server" Text="Issued By"
                                                                meta:resourcekey="IssuedByLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="IssuedByTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                                MaxLength="100" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()" meta:resourcekey="IssuedByTextBoxResource1"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="pull-right col-md-8 display-flex pTop10">
                                                        <asp:DropDownList ID="ApplyDropDownList" runat="server" SkinID="CustomWidthDropDownList" class="form-control"></asp:DropDownList>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="ApplyTextBox" runat="server" SkinID="CustomWidthTextBox" Width="100px" class="mt-1"></asp:TextBox>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:Button ID="ApplyPayDetailButton" runat="server" Text="Apply" SkinID="0" CssClass="btn-apply btn fas" OnClick="ApplyPayDetailButton_Click" />
                                                    </div>
                                                </div>

                                                <div id="SaveDataDiv" class="col-md-6" runat="server" style="float: right" visible="false">
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="IssuedLabel" runat="server" Text="Issued Date"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <Date:DatePickerControl DisplayDatePicker="true" ID="IssuedDateLabel"
                                                                runat="server" Visible="true" />
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="ToLocationLabel" SkinID="mandatoryLabel" runat="server"
                                                                Text="To Dept" meta:resourcekey="ToLocationLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList ID="ToDepartmentDropDownList" runat="server" CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true"
                                                                SkinID="CustomWidthDropDownList" onmouseenter="showHideTooltip()">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="cBoth"></div>
                                                <div class="fRight col-md-6" id="AddDatadiv" runat="server" visible="false">
                                                    <div class="Outerbox col-md-7">
                                                        <div class="controlLabelWidth">
                                                            <asp:Button ID="AddButtton" CssClass="btn btn-add fas" SkinID="0" runat="server" Text="&#xf067; Add" OnClick="AddButtton_Click" />
                                                        </div>
                                                    </div>
                                                    <div class="Outerbox col-md-5">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="QuantityLabel" runat="server" SkinID="0" Text="Quantity"></asp:Label>
                                                            <asp:TextBox ID="ApplyQuntityTextBox" runat="server" SkinID="CustomWidthTextBox" Width="60px" Font-Bold="false" onkeypress="OnlyNumericEntry()"></asp:TextBox>
                                                            <asp:Button ID="ApplyButton" runat="server" Text="Apply" SkinID="0" CssClass="btn-apply btn fas" OnClick="ApplyButton_Click" />
                                                        </div>
                                                    </div>
                                                </div>

                                                <div id="Gridview" class="col-md-12">
                                                    <div class="col-md-6" id="StudentListDiv" visible="true" style="margin-top: -5px;">
                                                        <div id="Div5" class="himssuHeader6WireBox pTop5 width-100" runat="server" style="height: 100%;">
                                                            <div class="himsBoxContent table-responsive customscrolltable">
                                                                <asp:GridView ID="StudentListGridview" runat="server" AutoGenerateColumns="False" EmptyDataText="No records found"
                                                                    OnRowDataBound="StockIssueStdBulk_StudentList_RowDataBound" OnPageIndexChanging="StockIssueStdBulk_StudentList_PageIndexChanging"
                                                                    SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                    DataKeyNames="StudentId, AcademicId" CssClass="table table-striped table-bordered table-hover classno_row">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="4%" HeaderStyle-Width="4%" ItemStyle-Wrap="true">
                                                                            <HeaderTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="StudentListHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                        Visible="true" OnCheckedChanged="StudentListHeaderSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </HeaderTemplate>
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="StudentListSelectCheckBox" runat="server" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="Code" HeaderText="Code" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="5%" HeaderStyle-Width="5%" />
                                                                        <asp:BoundField DataField="RollNo" HeaderText="RollNo" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="5%" HeaderStyle-Width="5%" />
                                                                        <asp:BoundField DataField="ClassDiv" HeaderText="Class-Div" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%" HeaderStyle-Width="10%" />
                                                                        <asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="20%" HeaderStyle-Width="20%" />
                                                                        <asp:TemplateField HeaderText="Receipt No" Visible="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%" HeaderStyle-Width="10%"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="ReceiptNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Enabled="false"
                                                                                    SkinID="CustomWidthTextBox" Width="100%" runat="server" MaxLength="9" onkeypress="javascript:return isNumberKey(this)"> </asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Pay Type" Visible="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%" HeaderStyle-Width="15%"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <asp:DropDownList runat="server" ID="PayTypeDropDownList" SkinID="CustomWidthDropDownList" onmouseleave="showHideTooltip()" AutoPostBack="true"
                                                                                    onmouseenter="showHideTooltip()" class="form-control clsPayTypeDropDownList" OnSelectedIndexChanged="PayTypeDropDownList_SelectedIndexChanged">
                                                                                </asp:DropDownList>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Cheque Number" Visible="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%" HeaderStyle-Width="15%"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="ChequeNumberTextBox" CssClass="ChequeNumberTextBox" runat="server" MaxLength="40" Width="100%"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Cheque Date" Visible="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%" HeaderStyle-Width="15%"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <Date:DatePickerControl DisplayDatePicker="true" ID="ChequeDatePickerControl" Visible="True" runat="Server"></Date:DatePickerControl>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Bank Name" Visible="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%" HeaderStyle-Width="15%"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="BankNameTextBox" runat="server" MaxLength="20" Width="100%" CssClass="clsBankNameTextBox"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>

                                                    </div>
                                                    <%--Changed for mantis : 39377--%>
                                                    <div class="col-md-6" id="ItemListDiv" visible="true" runat="server">
                                                        <%--Added new datakeys for mantis : 40773--%>
                                                        <asp:GridView ID="ItemListGridView" runat="server" AutoGenerateColumns="False" EmptyDataText="No records found"
                                                            OnRowDataBound="ItemListGridView_RowDataBound" OnPageIndexChanging="ItemListGridView_PageIndexChanging"
                                                            SkinID="" ShowHeader="True" PagerSettings-Visible="false" OnRowCommand="ItemListGridView_RowCommand"
                                                            DataKeyNames="ItemSubGroupId,StockItemId,Quantity,Id" CssClass="table table-striped table-bordered table-hover">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="1%"
                                                                    ItemStyle-Wrap="true">
                                                                    <HeaderTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="ItemListHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                Visible="true" OnCheckedChanged="ItemListHeaderSelectCheckBox_CheckedChanged" />
                                                                            <span></span>
                                                                        </label>
                                                                    </HeaderTemplate>
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="ItemListSelectCheckBox" runat="server" />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField ItemStyle-Width="10%">
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="ImageButtonAdd" runat="server" CommandArgument='<%# Eval("ItemSubGroupId") %>' />
                                                                        <asp:ImageButton ID="ImageButtonDelete" runat="server" CommandArgument='<%#  Eval("ItemSubGroupId")  %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Item Id" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IdLabel" runat="server" Text='<%#Eval("ItemSubGroupId") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="StockItem" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockItemId" runat="server" Text='<%#Eval("StockItemId") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="SubGroup" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="GroupLabel" runat="server" Text='<%#Eval("StockItemName") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Item Name" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="22%">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="Size_DropDownList" runat="server" AutoPostBack="true" Width="100%" CssClass="form-control" OnSelectedIndexChanged="Size_DropDownList_SelectedIndexChanged"></asp:DropDownList>
                                                                        <asp:HiddenField ID="HiddenFieldType" runat="server" />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="WAC Cost" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="WACCOstLabel" runat="server" Text=''></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Quantity" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="8%">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="ItemQuantityTextBox" runat="server" SkinID="CustomWidthTextBox" onkeypress="OnlyNumericEntry()" MaxLength="100"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                    </div>
                                                    <div class="fRight col-md-6" id="TempListDiv" visible="true">
                                                        <asp:GridView ID="TempItemlistGridview" runat="server" AutoGenerateColumns="False" SkinID="" ShowHeader="True" ShowFooter="true"
                                                            PagerSettings-Visible="false" CssClass="table table-striped table-bordered table-hover" OnRowDataBound="TempItemlistGridview_RowDataBound"
                                                            OnRowCommand="TempItemlistGridview_RowCommand" DataKeyNames="ItemSubGroupId">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="SubGroup" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="GroupLabel" runat="server" Text='<%#Bind("StockItemName") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalLabel" ClientIDMode="Static" runat="server" Text="" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Item Name" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="NameLabel" runat="server" Text='<%#Bind("ItemName") %>'></asp:Label>
                                                                        <asp:HiddenField ID="ItemIDHiddenField" runat="server" />
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalLabel1" ClientIDMode="Static" runat="server" Text="" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="WAC Cost" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="WACCOstLabel" runat="server" Text='<%#Bind("WACCOst") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalWacCostLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Quantity" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="8%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="QuantityLabel" runat="server" Text='<%#Bind("Quantity") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalLabel2" ClientIDMode="Static" runat="server" Text="" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Total Cost" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TotalCOstLabel" runat="server" Text='<%#Bind("TotalCost") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalCostLabel2" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField ItemStyle-Width="5%">
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="ImageButtonDelete" runat="server" />
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:Label ID="TotalLabel3" ClientIDMode="Static" runat="server" Text="" Font-Bold="true"></asp:Label>
                                                                    </FooterTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                    </div>
                                                </div>

                                                <%--Added for mantis : 37719--%>
                                            </ContentTemplate>

                                        </cc1:TabPanel>
                                        <cc1:TabPanel Width="100%" ID="ImportStudentStockIssueTabPanel" runat="server" HeaderText="Import Student Stock Issue">
                                            <HeaderTemplate>
                                                <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                    <li class="fancyTab"><a><i class="fas fa-money-bill-alt"></i>&nbsp; Import Student Stock Issue</a></li>
                                                </ul>
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DepartmentImportLabel" SkinID="mandatoryLabel" runat="server"
                                                            Text="To Dept" meta:resourcekey="ToLocationLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="DeptDropDownList" runat="server" CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true"
                                                            SkinID="CustomWidthDropDownList" onmouseenter="showHideTooltip()">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop15 col-md-2">
                                                    <div class="controlLabelWidth">
                                                        <asp:HyperLink ID="HyperLink3" runat="server" Text="&#xf101; Download Template" NavigateUrl="~/ContentTemplates/Import/ImportStockIssueStudentBulkNew_Template.xls" CssClass="pointer fas"></asp:HyperLink>
                                                        <asp:HyperLink ID="HyperLink1" runat="server" Text="&#xf101; Download Template" NavigateUrl="~/ContentTemplates/Import/ImportStockIssueStudentBulkReceipt_Template.xls" CssClass="pointer fas"></asp:HyperLink>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop15 col-md-2">
                                                    <div class="controlLabelWidth">
                                                        <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                            <i class="fa fa-arrow-down"></i>Browse</a>
                                                        <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />
                                                    </div>
                                                    <asp:Label class="controlLabelWidth" ID="Label2" runat="server"></asp:Label>
                                                </div>
                                                <div class="outerBox pTop15 col-md-2" style="margin-left: -80px;">
                                                    <div class="controlLabelWidth">
                                                        <asp:Button ID="StudentStockIssueBulkImportButton" runat="server" Text="&#xf019; Import" CssClass="btn btn-examcommon fas" SkinID="0" OnClick="StudentStockIssueBulkImportButton_Click" />
                                                    </div>
                                                </div>

                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                    </cc1:TabContainer>

                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                </div>
            </div>
            <%--</div>--%>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/stock-inward-bulk" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stock-inward-bulk")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        $("[id*=ChekHeder]").live("click", function () {
            var chkHeader = $(this);
            var grid = $(this).closest("table");
            $('#ctl00_CP_MedicineGridView tr').each(function () {
                if (chkHeader.is(":checked")) {
                    $(this).find('input[type=checkbox]').prop('checked', true);
                }
                else {
                    $(this).find('input[type=checkbox]').prop('checked', false);
                }
            });
        });
    </script>
    <script type="text/javascript">
        function sum() {
            $('#ctl00_CP_MedicineGridView tr').each(function () {
                var qty = $(this).find('.qtytxtbox').val();
                var price = $(this).find('.prctxtbox').val();

                if ((qty != '') && (price != '')) {
                    var valueTotal = (qty * price);

                    $(this).find('.ValueBox').val(valueTotal);

                }
            });
        }
       <%-- function ValidateApply() {
            var chcnt = 0
            $('#ctl00_CP_MedicineGridView tr').each(function () {
                if ($(this).find('input[type=checkbox]').is(':checked')) {
                    chcnt = chcnt + 1;
                }
            });
            if (chcnt == 0) {
                alert('please select atleast one checkbox');
            }
            else {
                var value = document.getElementById('<%=ApplyAllTextBox.ClientID%>').value;
                var mydropdown = document.getElementById('<%=ApplyAllDropDownList.ClientID%>').value;
                if ((mydropdown != '--Select--') && (value != '')) {


                    if (document.getElementById('<%=ApplyAllDropDownList.ClientID%>').value == "Quantity") {
                        $('#ctl00_CP_MedicineGridView tr').each(function () {
                            if ($(this).find('input[type=checkbox]').is(':checked')) {
                                $(this).find('.qtytxtbox').val($('#ctl00_CP_ApplyAllTextBox').val());
                            }
                        });
                    }
                    else if (document.getElementById('<%=ApplyAllDropDownList.ClientID%>').value == "Price") {
                        $('#ctl00_CP_MedicineGridView tr').each(function () {
                            if ($(this).find('input[type=checkbox]').is(':checked')) {
                                $(this).find('.prctxtbox').val($('#ctl00_CP_ApplyAllTextBox').val());
                            }
                        });
                    }

                    $('#ctl00_CP_MedicineGridView tr').each(function () {
                        var qty = $(this).find('.qtytxtbox').val();
                        var price = $(this).find('.prctxtbox').val();

                        if ((qty != '') && (price != '')) {
                            var valueTotal = (qty * price);

                            $(this).find('.ValueBox').val(valueTotal);

                        }
                    });

                }
                else {
                    if ((mydropdown = "--Select--") && (value = " ")) {
                        alert("Please Enter Value and Select Apply All DropDown.");
                    }
                    else {
                        if (mydropdown != "--Select--") {
                            alert("Please Select Apply All Dropdown.");
                        }
                        if (value != " ") {
                            alert("Please Enter Apply All Value.");
                        }
                    }
                }
            }
        }--%>
        function FormatIt(obj) {
            if (obj.value.length == 2) // Day
                obj.value = obj.value + "/";
            if (obj.value.length == 5) // month
                obj.value = obj.value + "/";
        }
        function OnlyNumericEntry() {
            if ((event.keyCode < 48 || event.keyCode > 57 || event.keyCode == 13 || event.keyCode == 176)) {
                event.returnValue = false;
            }
            else {
                var Quantity = document.getElementById("ItemQuantityTextBox").value;
            }
        }
    </script>
</asp:Content>
