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

<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DataPickerControl" TagPrefix="HIMS" %>
<%@ Register Src="~/UserControls/MaterialManagement/Procurement/BatchUpdation.ascx" TagPrefix="BUC" TagName="BatchUserControl" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="Common" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/AlphabetSearchCommonControl.ascx" TagName="AlphabetSearchCommonControl" TagPrefix="ACS" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>
<%@ Register Src="~/UserControls/Common/Stock/StockDetailBoxControl.ascx" TagName="StockControl" TagPrefix="Stock" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">

    <div class="dashBoardLeftCont" valign="top">
        <div class="himssuHeader3WireBox">
            <table cellpadding="0" cellspacing="0">
                <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>
    </div>

    <div class="whiteboxpaddingleft row">
        <%--<div class="">
               <link href='<%= ResolveUrl("~/App_Themes/responsiv-popup.css") %>' rel="stylesheet" type="text/css" />
            <div class="hls-bg"></div>
            <!--Loading msg start-->
            <div id="dvTestLoadingmsg" class="hls-wrap">
                <div class="hls-container">
                    <div class="hls-content">
                        <div class="dsh-syndicate white-popup" style="display: inline-block; width: 119%; height: 150px">
                            <div class="shippingcard" style="text-align: center; vertical-align: middle; width: 100%;">
                                <span id="spn1msg">Loading Details</span><br>
                                <span style="line-height: 2;" id="spn2msg"><b>Please Wait ...</b></span><br>
                                <span id="spnloadingimgOPD">
                                    <img src="../../../Images/Loading1.gif" /></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>--%>

        <!--Loading msg end-->
        <%--  <style type="text/css">
                .loadingbg {
                    background-image: url("/Images/loading_bg.png");
                    position: fixed;
                    top: 50%;
                    left: 50%;
                    background-repeat: no-repeat;
                    height: 107px;
                    text-align: center;
                    vertical-align: middle;
                    width: 100px;
                    z-index: 99;
                    background-position: center;
                }

                .loadingtext {
                    color: #FFF;
                }
            </style>--%>
        <%--<asp:UpdateProgress ID="MainUpdateProgress" runat="Server" AssociatedUpdatePanelID="HREmployeeMasterSearchUpdatePanel" DisplayAfter="0">
            <ProgressTemplate>
                <div class="loadingbg">
                    <img src="../../Images/ajax-loader.gif" width="32" height="32" vspace="22" style="margin: 0px;" alt="loading" />
                    <div class="loadingtext">
                        Loading...
                    </div>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>--%>
        <asp:UpdatePanel ID="HREmployeeMasterSearchUpdatePanel" runat="server">
            <ContentTemplate>
                <Stock:StockControl ID="StockUserControl" runat="server" Visible="true" />
                <asp:Panel ID="Panel1" runat="server" meta:resourcekey="Panel1Resource1" Visible="true">
                    <div class="himssuHeader1WireBox card-box card">
                        <div class="himsBoxHeader  card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText" id="codeHeader">
                                    <header>
                                        <i class="fas fa-sync"></i>
                                        Stock Reset
                                    </header>
                                </div>
                                <div class="fRight mt-27">
                                    <asp:Button ID="SearchButton" runat="server" SkinID="0" CssClass="btn btn-search fas" Text="&#xf002;  Search" OnClick="SearchButton_Click" />
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="outerBox col-md-3 pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ResetNoLabel" runat="server" Text="Reset No" meta:resourcekey="ResetqNoLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft display-flex">
                                        <acc:AutoCompleteControl ID="ResetNoTextBox" runat="server" MinimumPrefixLength="2"
                                            ContextKey="Procurement.StockResetNumber" AutoPostBack="true"
                                            DisplayLoadingStatus="true" FirstRowSelected="false" MaxLength="20" ValidateOnTextChanged="false" />
                                        <asp:ImageButton ID="ResetNoSearchImageButton" ToolTip="Reset No. Search" SkinID="FindImage"
                                            OnClick="ResetNoSearchImageButton_Click" runat="server" meta:resourcekey="ResetNoSearchImageButtonResource1" />
                                    </div>
                                </div>
                                <div class="outerBox col-md-3 pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ResetDateLabel" runat="server" Text="Reset Date" meta:resourcekey="ResetDateLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="ResetdDateLabel" runat="server"
                                            meta:resourcekey="ResetdDateLabelResource1"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox col-md-3 pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ResetdByLabel" runat="server" Text="Reset By" meta:resourcekey="ResetdByLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="ResetdByTextBox" SkinID="CustomWidthTextBox" runat="server"
                                            MaxLength="100" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            meta:resourcekey="ResetdByTextBoxResource1"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                                <div class="outerBox col-md-3 pTop5 ">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="FromLocationLabel" SkinID="mandatoryLabel" runat="server" Text="To SubLocation"
                                            meta:resourcekey="FromLocationLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft">
                                        <asp:DropDownList ID="ToStoreLocationDropDownList" runat="server" CssClass="form-control" AutoPostBack="True"
                                            SkinID="CustomWidthDropDownList" OnSelectedIndexChanged="ToStoreLocationDropDownList_SelectedIndexChanged"
                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="ToStoreLocationDropDownListResource1">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="lbl" runat="server" Text="Transaction Date" meta:resourcekey="InwardNoLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft">
                                        <asp:Label ID="lbltransactionDate" runat="server"></asp:Label>
                                    </div>
                                </div>
                            </div>

                            <div class="himssuHeader1WireBox">
                                <div class="himsBoxHeader card-head inner" id="StockResetLabelDiv" runat="server" Visible="true">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                Stock Reset Details
                                            </header>
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBoxContent width-100">
                                    <div class="contentHolder" id="StockResetDiv" runat="server" visible="true">

                                        <div runat="server" id="mssg">
                                            <div class="alert alert-info">
                                                <strong>Info!</strong>
                                                <i class="material-icons">info</i>
                                                <asp:Label ID="lblmssge" runat="server"
                                                    meta:resourcekey="ResetQtyLabelResource1"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-md-12 bg-lghtgrey  radiobtn">
                                            <span class="col-md-3">
                                                <asp:RadioButton runat="server" ID="rbbrows" Text="Upload" GroupName="type" Checked="true" OnCheckedChanged="rbbrows_Click" AutoPostBack="true" />
                                            </span>
                                            <span class="col-md-4">
                                                <asp:RadioButton runat="server" ID="rbcopy" Text="Copy" GroupName="type" OnCheckedChanged="rbcopy_Click" AutoPostBack="true" />
                                            </span>
                                        </div>


                                        <div id="divcopy" class="col-md-12" runat="server">

                                            <div class="pTop15 pb5 ">
                                                <asp:HyperLink ID="HyperLink2" runat="server" CssClass="pointer" NavigateUrl="~/ContentTemplates/Import/StockReset.xls"><i class="fas fa-angle-double-right"></i> Stock Reset Template</asp:HyperLink>
                                            </div>



                                            <div class="pTop5">
                                                <asp:TextBox ID="txtCopied" runat="server" TextMode="MultiLine" AutoPostBack="true"
                                                    OnTextChanged="PasteToGridView" Height="200" placeholder="Copy and Paste data here" />
                                            </div>


                                        </div>
                                        <div id="divBrowser" runat="server" class="col-md-12 padd-0">
                                            <div runat="server">
                                                <div class="outerBox col-md-3 pTop5">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ItemCodeLabel" SkinID="mandatoryLabel" runat="server" Text="Item Code"
                                                            meta:resourcekey="ItemCodeLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft display-flex">
                                                        <acc:AutoCompleteControl ID="StockItemCodeTextBox" runat="server" MinimumPrefixLength="2"
                                                            IsCacheEnabled="false" ContextKey="Common.ItemTitleAll" AutoPostBack="true"
                                                            DisplayLoadingStatus="true" FirstRowSelected="false" MaxLength="20" ValidateOnTextChanged="false" />
                                                        <asp:ImageButton ID="ItemCodeSearchButton" ToolTip="Item Code Search" SkinID="FindImage"
                                                            OnClick="ItemCodeSearchButton_Click" runat="server" meta:resourcekey="ItemCodeSearchButtonResource1" />
                                                    </div>
                                                </div>
                                                <div class="outerBox col-md-3 pTop5">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="NameLabel" runat="server" Text="Item Name" meta:resourcekey="NameLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 display-flex">
                                                        <acc:AutoCompleteControl ID="StockItemNameTextBox" runat="server" MinimumPrefixLength="2"
                                                            IsCacheEnabled="false" ContextKey="InventoryPlanning.ItemTitleAll"
                                                            AutoPostBack="true" DisplayLoadingStatus="true" FirstRowSelected="false" MaxLength="300"
                                                            ValidateOnTextChanged="false" />
                                                        <asp:ImageButton ID="ItemNameSearchButton" ToolTip="Item Name Search" SkinID="FindImage"
                                                            OnClick="ItemNameSearchButton_Click" runat="server" meta:resourcekey="ItemNameSearchButtonResource1" />
                                                    </div>
                                                </div>
                                                <div class="outerBox col-md-3 pTop5" runat="server" visible="false">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="RequestedQtyLabel" runat="server" Text="Requested Qty" meta:resourcekey="RequestedQtyLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="RequestedQtyTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                            onKeypress="javascript:return MaskDecimal(event,10,2)" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" Style="text-align: right;" meta:resourcekey="RequestedQtyTextBoxResource1"></asp:TextBox>
                                                    </div>
                                                </div>

                                                <div class="outerBox col-md-3 pTop5 ">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ResetQtyLabel" SkinID="mandatoryLabel" runat="server" Text="Reset Qty"
                                                            meta:resourcekey="ResetQtyLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft">
                                                        <asp:TextBox ID="ResetQtyTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                            onKeypress="javascript:return MaskDecimal(event,10,2)" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" Style="text-align: right;" meta:resourcekey="ResetQtyTextBoxResource1"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox col-md-3 pTop5 ">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="Label1" SkinID="mandatoryLabel" runat="server" Text="Unit Cost"
                                                            meta:resourcekey="ResetQtyLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft">
                                                        <asp:TextBox ID="ResetValueTextBox" runat="server" MaxLength="23" onblur="javascript:return fnValidateDecimal(this,16,6)"
                                                            onKeypress="javascript:return MaskDecimal(event,16,6)" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" Style="text-align: right;"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="cBoth">
                                                </div>
                                                <div class="outerBox col-md-3 pTop5 ">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="BatchLabel" SkinID="mandatoryLabel" runat="server" Text="Batch" Visible="false"
                                                            meta:resourcekey="ResetQtyLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft">
                                                        <asp:TextBox ID="BatchTextBox" runat="server" MaxLength="23" Visible="false"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox col-md-3 pTop5 ">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ExpiryLabel" SkinID="mandatoryLabel" runat="server" Text="Expiry date" Visible="false"
                                                            meta:resourcekey="InwardQtyLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft">
                                                        <DPC:DatePickerControl ID="ExpiryDateDatePickerControl" runat="server" DisplayDatePicker="true" Visible="false"
                                                            class="datepick" style="display: initial !important; width: 80% !important;" />
                                                    </div>
                                                </div>
                                                <div class="col-md-12"></div>
                                                <div class="outerBox col-md-3 pTop5 " runat="server" visible="false">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="RemarksLabel" runat="server" Text="Remarks" meta:resourcekey="RemarksLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="RemarksTextBox" runat="server" CssClass="remark-text"
                                                            TextMode="MultiLine"
                                                            MaxLength="300" onKeypress="javascript:return fnMaxLength(this, 300)" onblur="javascript:return CheckLength(this, 300)"
                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="RemarksTextBoxResource1"></asp:TextBox>
                                                    </div>
                                                </div>

                                                <div runat="server" visible="false">
                                                    <div class="controlLabelWidth outerBox pTop15 col-md-3">
                                                        <a href="javascript:;" onclick="OpenFileUpload();">
                                                            <i class="fas fa-upload" aria-hidden="true"></i>Browse</a>
                                                        <asp:FileUpload ID="flUpload" onChange="readURL(this);" ClientIDMode="Static" runat="server" Style="display: none;" />
                                                    </div>
                                                    <div class="controlLabelWidth pTop5" style="padding-left: 10px">
                                                        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="pointer" NavigateUrl="~/ContentTemplates/Template/StockReset.xls"><i class="fas fa-angle-double-right"></i>  Stock Reset Template</asp:HyperLink>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class=" alignCenter col-md-12 pTop5" id="ButtonDiv" runat="server">
                                        <asp:Button ID="AddToListButton" runat="server" CssClass="fas btn btn-add mt7" Text="&#xf067; Add"
                                            OnClick="AddToListButton_Click" meta:resourcekey="AddToListButtonResource1" Visible="false" SkinID="0" />
                                        <asp:Button ID="ClearDetailButton" runat="server" Text="&#xf12d; Clear" SkinID="0" class="fas btn btn-clear mt7" OnClick="ClearDetail_Click" meta:resourcekey="ClearButtonResource1" Visible="false" />
                                        <asp:Button ID="ImportButton" Text="&#xf019; Import Detail" CssClass="fas btn btn-examcommon mt7 m-b-10" runat="server" SkinID="CustomWidthButton"
                                            OnClick="ImportButton_Click" meta:resourcekey="AddToListButtonResource1" Visible="false" />
                                        <asp:Button ID="btnValidate" Text="&#xf00c; Validate" runat="server"
                                            SkinID="0"
                                            CssClass="fas btn btn-validate m-b-10" OnClick="btnValidate_Click" meta:resourcekey="AddToListButtonResource1" />
                                        <div runat="server" visible="false">
                                            <asp:Button ID="btnResetforBoowser" Text="&#xf019;  Import Detail" runat="server" SkinID="0" CssClass="fas btn btn-examcommon mt7 m-b-10 "
                                                OnClick="btnResetforBoowser_Click" meta:resourcekey="AddToListButtonResource1" Visible="false" />
                                        </div>
                                    </div>

                                    <div class="himsBoxContent width-100">
                                        <asp:GridView ID="gdvImportData" runat="server" EmptyDataText="No Records Found" CssClass="table table-bordered table-striped" Visible="false" OnRowDataBound="gdvImportData_Grid" AutoGenerateColumns="false">
                                            <Columns>
                                                <asp:BoundField DataField="StockItemCode" HeaderText="Item Code"
                                                    SortExpression="StockItemCode" />
                                                <asp:BoundField DataField="StockItemName" HeaderText="Item Name"
                                                    SortExpression="StockItemName" />
                                                <asp:BoundField DataField="ExpiryDate" HeaderText="Expiry Date"
                                                    SortExpression="ExpiryDate" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="BatchNo" HeaderText="Batch"
                                                    SortExpression="BatchNo" />
                                                <asp:BoundField DataField="ResetQuantity" HeaderText="Reset Quantity"
                                                    SortExpression="ResetQuantity" DataFormatString="{0:0.00}" />
                                                <asp:BoundField DataField="UnitCost" HeaderText="Unit Cost"
                                                    SortExpression="UnitCost" DataFormatString="{0:0.00}" />
                                                <asp:TemplateField HeaderText="Error Message" ShowHeader="True">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblError" runat="server" CausesValidation="false" CommandName="lblError" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                    <div id="StockResetDetailDiv" class="col-md-12" runat="server">
                                        <div class="spacer">
                                            <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image14Resource1" />
                                        </div>
                                        <div class="himsBoxHeader card-head inner" id="PatientRelationDiv" runat="server">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="fRight mt-27">
                                                    <uc1:GridViewPager ID="StockResetDetailGridView_GridViewPager" runat="server" OnFirstRecordClick="StockResetDetailGridView_GridViewPager_FirstRecordClick"
                                                        OnLastRecordClick="StockResetDetailGridView_GridViewPager_LastRecordClick" OnNextRecordClick="StockResetDetailGridView_GridViewPager_NextRecordClick"
                                                        OnPrevRecordClick="StockResetDetailGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="StockResetDetailGridView_GridViewPager_TextBoxValueChange"
                                                        ParentGridView="StockResetDetailGridView" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="himsBoxContent width-100">
                                            <asp:GridView ID="StockResetDetailGridView" runat="server" Width="100%" AutoGenerateColumns="False" CssClass="table table-bordered table-striped"
                                                OnRowDataBound="StockResetDetailGridView_RowDataBound" OnPageIndexChanging="StockResetDetailGridView_PageIndexChanging"
                                                AllowPaging="True" PageSize="1000" OnDataBinding="StockResetDetailGridView_DataBinding"
                                                ShowHeader="true" DataKeyNames="StockItemId,IsBatchWiseTracking,ResetQuantity" EmptyDataText="No Records Found"
                                                meta:resourcekey="StockResetDetailGridViewResource1">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Item Code" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="StockItemCodeLinkButton" runat="server" Text='<%# Bind("StockItemCode") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Left" Width="15%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Item Name" meta:resourcekey="TemplateFieldResource2" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label CssClass="boxEllips" ToolTip='<%# Bind("StockItemName") %>' ID="NameLabel"
                                                                runat="server" Text='<%# Bind("StockItemName") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="20%" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderStyle-HorizontalAlign="Left" DataField="UOM" HeaderText="UOM" meta:resourcekey="BoundFieldResource1">
                                                        <ItemStyle Width="10%" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="Batch">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="BatchGridTextbox"
                                                                runat="server" Text='<%#Eval("BatchNo")%>' OnTextChanged="BatchGridTextbox_TextChanged"></asp:TextBox>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Right" Width="8%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Expiry Date">
                                                        <ItemTemplate>
                                                            <%--   <DPC:DatePickerControl ID="ExpiryDateGridTextbox" runat="server" DisplayDatePicker="true"
                                                            class="datepick"  style="display: initial !important; width: 80% !important;" Text='<%#Eval("ExpiryDate","{0:dd/MM/yyyy}")%>' />--%>
                                                            <asp:TextBox ID="ExpiryDateGridTextbox"
                                                                runat="server" Text='<%#Eval("ExpiryDate","{0:dd/MM/yyyy}")%>' OnTextChanged="ExpiryDateGridTextbox_TextChanged"></asp:TextBox>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Right" Width="14%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Requested Qty">
                                                        <ItemTemplate>
                                                            <asp:Label ID="RequestedLabel" runat="server" Text='<%#Eval("RequestedQuantity") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Right" Width="8%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Right" HeaderText="Reset Qty" meta:resourcekey="TemplateFieldResource3">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="ResetQuantityTextBoxGrid"
                                                                runat="server" Text='<%# String.Format("{0:F}", Eval("ResetQuantity")) %>'
                                                                MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Style="text-align: right;"
                                                                OnTextChanged="ResetQuantityTextBoxGrid_TextChanged"></asp:TextBox>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Right" HeaderText="Unit Cost" meta:resourcekey="TemplateFieldResource3">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="ResetUnitPriceTextBoxGrid" runat="server" Text='<%# String.Format("{0:F}", Eval("UnitCost")) %>'
                                                                MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Style="text-align: right;"
                                                                OnTextChanged="ResetNetUnitPriceTextBoxGrid_TextChanged"></asp:TextBox>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Delete" meta:resourcekey="TemplateFieldResource4">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="DeleteImageButton" runat="server" CommandName="Delete" CommandArgument='<%# Eval("StockItemId") %>'
                                                                OnClick="DeleteImageButton_Click" SkinID="DeleteImage" ToolTip="Delete"
                                                                meta:resourcekey="DeleteImageButtonResource1" />
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                    <BUC:BatchUserControl ID="BatchUpdationCtrl" runat="server" />
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Panel ID="Panel2" runat="server" meta:resourcekey="Panel1Resource1" Visible="false">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-search"></i>Search
                                    </header>
                                </div>
                                <div class="fRight mt-27">
                                    <asp:Button ID="Button" runat="server" SkinID="0" CssClass="fal btn Reset Qty btn-back" Text="&#xf30a; Back" OnClick="BacButton_Click" />
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="outerBox col-md-3 pTop5 ">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="Label2" runat="server" Text="Reset No" meta:resourcekey="ResetdByLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="ReqNoCompleteControl" runat="server" Text="*"></asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox col-md-3 pTop5 ">
                                <asp:Label ID="FromDateLable" runat="server" Text="From Date"></asp:Label>
                                <DPC:DatePickerControl DisplayDatePicker="true" ID="FromDatePickerControl"
                                    Visible="True" runat="Server"></DPC:DatePickerControl>
                            </div>
                            <div class="outerBox col-md-3 pTop5 ">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ToDateLabel" runat="server" Text="To Date"></asp:Label>
                                </div>
                                <DPC:DatePickerControl DisplayDatePicker="true" ID="ToDateDatePickerControl"
                                    Visible="True" runat="Server"></DPC:DatePickerControl>
                            </div>

                            <div class="alignCenter pTop5 pb5 col-md-12">
                                <asp:Button ID="Search_Button" Text="&#xf002; Search" runat="Server" OnClick="Search_Button_Click" SkinID="0" CssClass="fas btn btn-search" />
                                <asp:Button ID="ResetButton" runat="server" Text="&#xf12d; Clear" SkinID="0" class="fas btn btn-clear" OnClick="ResetButton_Click" />
                            </div>

                            <div class="himsBoxContent width-100">
                                <%--<div class="card-head inner">
                                    <div class="headerText">
                                        <header>
                                            <asp:Label ID="ListLabel" runat="server" Text="List" CssClass="fLeft"></asp:Label>
                                        </header>
                                    </div>
                                </div>--%>

                                <div align="right" class="fRight mt-27">
                                    <uc1:GridViewPager ID="StockIssueGridView_GridViewPager" runat="server" OnFirstRecordClick="StockIssueGridView_GridViewPager_FirstRecordClick"
                                        OnLastRecordClick="StockIssueGridView_GridViewPager_LastRecordClick" OnNextRecordClick="StockIssueGridView_GridViewPager_NextRecordClick"
                                        OnPrevRecordClick="StockIssueGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="StockIssueGridView_GridViewPager_TextBoxValueChange"
                                        ParentGridView="StockIssueGridView" Visible="false" />
                                </div>
                                <div class="himsBoxContent col-md-12">
                                    <asp:GridView ID="StockIssueGridView" runat="server" CssClass="table table-bordered table-striped"
                                        AutoGenerateColumns="False" ShowHeader="true" DataKeyNames="Id,Number,ResetByName,ResetDate" AllowPaging="true"
                                        OnRowDataBound="StockIssueGridView_RowDataBound" EmptyDataText="No Records Found" PageSize="25">
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemStyle Width="1%" />
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="EditLinkButton" runat="server" Enabled="true" OnClick="LinkButton_Click"
                                                        Text="Select"></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Reset Number" meta:resourcekey="TemplateFieldResource1">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%#Eval("Number") %>' ID="ItemCodeLabel"
                                                        runat="server" meta:resourcekey="ItemCodeLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="15%" />
                                                <ItemStyle Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Reset Date" meta:resourcekey="TemplateFieldResource1">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "ResetDate","{0:dd/MM/yyyy}") %>'  ID="ResetDateLabel"
                                                        runat="server" meta:resourcekey="ItemCodeLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="15%" />
                                                <ItemStyle Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Reset By" meta:resourcekey="TemplateFieldResource2" HeaderStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%#Eval("ResetByName") %>' ID="ToStoreLocationCodeLabel"
                                                        runat="server" meta:resourcekey="ItemNameLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="15%" />
                                                <ItemStyle Width="15%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <PagerSettings Visible="False" />
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                    </div>

                </asp:Panel>
                <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
                <ACS:AlphabetSearchCommonControl ID="AlphabetCommonSearch" runat="server" Visible="false" />
            </ContentTemplate>
        </asp:UpdatePanel>


        <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
        <script type="text/javascript">
            function FormatIt(obj) {
                if (obj.value.length == 2) // Day
                    obj.value = obj.value + "/";
                if (obj.value.length == 5) // month
                    obj.value = obj.value + "/";
            }
        </script>
        <script type="text/javascript">
            window.onload = function () {
                document.getElementById("<%=txtCopied.ClientID %>").onpaste = function () {
                    var txt = this;
                    setTimeout(function () {
                        __doPostBack(txt.name, '');
                    }, 100);
                }
            };
        </script>
</asp:Content>
