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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
      <%@ Register Src="~/UserControls/Common/CommonSearch/AlphabetSearchCommonControl.ascx" TagName="AlphabetSearchCommonControl"
TagPrefix="ACS" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server">
        <ContentTemplate>
          <ACS:AlphabetSearchCommonControl ID="AlphabetCommonSearch" runat="server" Visible="false" /> 
              <div id="divContentPage">
                <!-- ContentPlaceHolder Box Starts -->
                 <div style="width: 100%;padding:2px;margin:2px">
                    <table width="100%" border="0" style="vertical-align: top; margin-top: -1px" cellpadding="0"
                        cellspacing="0">

                        <tr>
                         <td class="dashBoardLeftCont" valign="top">
                                <div class="himssuHeader3WireBox">
                                    <div class="himsBoxHeader">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                            <asp:Label runat="server" ID="ScreenGroupNameLabel"></asp:Label>    
                                            </div>
                                        </div>
                                    </div>
                                    <table width="200px" 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>
                            </td>
                            <td style="vertical-align: top;padding-left:10px" width="99%"> 
                                  <!-- Sub Container Box1 Start -->
            <div class="himssuHeader2WireBox">
                <div class="himsBoxHeader">
                    <asp:Panel ID="Panel1" runat="server" meta:resourcekey="Panel1Resource1">
                        <div class="leftdiv">
                        </div>
                        <div class="himsBoxTitle">
                            <asp:Image ID="Image2" runat="server" class="fLeft" 
                                meta:resourcekey="Image2Resource1" />
                            <div class="headerText">
                                <asp:Label ID="Label3" runat="server" Text="Criteria" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                                <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="ApprovalPanel"
                                    ExpandControlID="Image2" CollapseControlID="Image2" TextLabelID="Label3"
                                    ImageControlID="Image2" ExpandedImage="~/images/buttonCollapse.gif" 
                                    CollapsedImage="~/images/buttonExpand.gif" Enabled="True" />
                            </div>
                        </div>
                    </asp:Panel>
                </div>
                <div class="himsBoxContent">
                    <asp:Panel ID="ApprovalPanel" runat="server" 
                        meta:resourcekey="ApprovalPanelResource1">
                        <div class="contentHolder">
                            <div class="outerBox pTop5" runat="server" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="LocationLabel" runat="server" Text="Location" 
                                        SkinID="MandatoryLabel" meta:resourcekey="LocationLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft">
                                    <asp:DropDownList ID="LocationDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                        Width="120px" onmouseleave="showHideTooltip()" 
                                        onmouseenter="showHideTooltip()" 
                                        meta:resourcekey="LocationDropDownListResource1">
                                    </asp:DropDownList>
                                    <asp:HiddenField ID="IdHiddenField" runat="server" />
                                </div>
                            </div>
                            <div class="outerBox pTop5">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ItemMainCategoryLabel" runat="server" Text="Main Group" 
                                        SkinID="MandatoryLabel" meta:resourcekey="ItemMainCategoryLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="ItemMainCategoryDropDownList" runat="server" 
                                        SkinID="CustomWidthDropDownList" Width="120px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        OnSelectedIndexChanged="ItemMainCategoryDropDownList_SelectedIndexChanged" 
                                        meta:resourcekey="ItemMainCategoryDropDownListResource1">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="SubCategoryLabel" runat="server" Text="Item Name" 
                                        meta:resourcekey="SubCategoryLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <acc:AutoCompleteControl ID="ItemNameTextBox" runat="server" MinimumPrefixLength="2"
                                      IsCacheEnabled="false"  Width="150px" 
                                        ContextKey="InventoryPlanning.ItemTitleAll" AutoPostBack="true"
                                        DisplayLoadingStatus="true" FirstRowSelected="true" 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="cBoth">
                            </div>
                            <div class="alignCenter pTop5">
                                <asp:Button ID="RetrieveButton" Text="Search" runat="server" SkinID="CustomWidthButton"
                                    Width="100px" OnClick="SearchButton_Click" 
                                    meta:resourcekey="RetrieveButtonResource1" />
                                <asp:Button ID="ClearButton" Text="Clear" runat="server" SkinID="CustomWidthButton"
                                    Width="100px" OnClick="ClearButton_Click" 
                                    meta:resourcekey="ClearButtonResource1" />
                            </div>

                            <div class="cBoth">
                            </div>
                                  <div id="StockAuditRetrieveGridViewDiv" class="himssuHeader7WireBox" runat="server"
                    style="width: 100%; margin-right: 5px;">
                    <!--StockAuditRetrieveGridView starts-->
                    <div class="spacer">
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" 
                            meta:resourcekey="Image1Resource1" />
                    </div>
                    <div class="himsBoxHeader" id="Div100" runat="server">
                        <div class="leftdiv">
                        </div>
                        <div class="himsBoxTitle" style="width: 99%">
                            <div class="headerText">
                                <div class="fLeft">
                                    <asp:Label ID="OutstandingBillLabel" runat="server" Text="" 
                                        Font-Bold="True" meta:resourcekey="OutstandingBillLabelResource1"></asp:Label>
                                </div>
                            </div>
                            <div align="right" class="fRight" style="margin-top: -3px;">
                           <%--     <uc1:GridViewPager ID="StockAuditApprovalGridView_GridViewPager" runat="server"  
                                    ParentGridView="StockAuditApprovalGridView" />--%>
                            </div>
                        </div>
                    </div>
                    <div class="himsBoxContent">
                        <!--Grid starts-->
                        <asp:UpdatePanel ID="PatientBillUpdatePanel" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:GridView ID="StockAuditApprovalGridView" runat="server" Width="99%" AutoGenerateColumns="False"
                                    OnRowDataBound="StockAuditApprovalGridView_RowDataBound" OnPageIndexChanging="StockAuditApprovalGridView_PageIndexChanging"
                                     OnDataBinding="StockAuditApprovalGridView_DataBinding" 
                                    DataKeyNames="Id" EmptyDataText="No Records Found" 
                                    meta:resourcekey="StockAuditApprovalGridViewResource1">
                                    <Columns>
                                        <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource1">
                                            <ItemTemplate>
                                                <asp:Label ID="StockVerificationIdLabel" Width="0px" runat="server" Text='<%# Bind("StockVerificationDetailId") %>'
                                                    Visible="False" meta:resourcekey="StockVerificationIdLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="0%" />
                                            <ItemStyle Width="0%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource2">
                                            <ItemTemplate>
                                                <asp:Label ID="StockBatchIdLabel" Width="0px" runat="server" Text='<%# Bind("StockBatchId") %>'
                                                    Visible="False" meta:resourcekey="StockBatchIdLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="0%" />
                                            <ItemStyle Width="0%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource3">
                                            <ItemTemplate>
                                                <asp:Label ID="ItemIdLabel" Width="0px" runat="server" Text='<%# Bind("ItemId") %>'
                                                    Visible="False" meta:resourcekey="ItemIdLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="0%" />
                                            <ItemStyle Width="0%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource4">
                                            <ItemTemplate>
                                                <asp:Label ID="StockItemFreezeIdLabel" Width="0px" runat="server" Text='<%# Bind("StockItemFreezeId") %>'
                                                    Visible="False" meta:resourcekey="StockItemFreezeIdLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="0%" />
                                            <ItemStyle Width="0%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource5">
                                            <ItemTemplate>
                                                <asp:Label ID="IdLabel" Width="0px" runat="server" Text='<%# Bind("Id") %>' 
                                                    Visible="False" meta:resourcekey="IdLabelResource2"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="0%" />
                                            <ItemStyle Width="0%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField meta:resourcekey="TemplateFieldResource6">
                                            <HeaderTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <itemtemplate>
                                        <asp:CheckBox ID="HeaderSelectCheckBox" OnCheckedChanged ="HeaderSelectCheckBox_OnCheckedChanged" runat="server"  AutoPostBack="True"/>
                                             </itemtemplate>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="StockPVCheckBox" runat="server" onclick="EnableTextBox();" AutoPostBack="True"
                                                    OnCheckedChanged="StockPVCheckBox_CheckedChanged" 
                                                    meta:resourcekey="StockPVCheckBoxResource1" />
                                            </ItemTemplate>
                                            <HeaderStyle Width="2%" />
                                            <ItemStyle Width="2%" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Item Code"  HeaderStyle-HorizontalAlign="Left"
                                            meta:resourcekey="TemplateFieldResource7">
                                            <ItemTemplate>
                                                <asp:Label ID="ItemCodeLabel" runat="server" Text='<%# Bind("ItemCode") %>' 
                                                    meta:resourcekey="ItemCodeLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%" />
                                            <ItemStyle Width="10%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Item Type"  HeaderStyle-HorizontalAlign="Left"
                                            meta:resourcekey="TemplateFieldResource8">
                                            <ItemTemplate>
                                                <asp:Label ID="ItemTypeLabel" runat="server" Text='<%# Bind("ItemType") %>' 
                                                    meta:resourcekey="ItemTypeLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="13%" />
                                            <ItemStyle Width="13%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Item Name"  HeaderStyle-HorizontalAlign="Left"
                                            meta:resourcekey="TemplateFieldResource9">
                                            <ItemTemplate>
                                                <asp:Label ID="ItemNameLabel" runat="server" Text='<%# Bind("ItemName")%>'
                                                    ToolTip='<%# Bind("ItemName") %>'></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="13%" />
                                            <ItemStyle Width="13%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="UOM" meta:resourcekey="TemplateFieldResource10"  HeaderStyle-HorizontalAlign="Left">
                                            <ItemTemplate>
                                                <asp:Label ID="UOMLabel" runat="server" Text='<%# Bind("UOM") %>' 
                                                    meta:resourcekey="UOMLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="5%" />
                                            <ItemStyle Width="5%" />
                                        </asp:TemplateField>
                                       <%-- <asp:TemplateField HeaderText="Batch No."  HeaderStyle-HorizontalAlign="Left"
                                            meta:resourcekey="TemplateFieldResource11">
                                            <ItemTemplate>
                                                <asp:Label ID="BatchNoLabel" runat="server" Text='<%# Bind("BatchNo") %>' 
                                                    meta:resourcekey="BatchNoLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%" />
                                            <ItemStyle Width="10%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Expiry Date"  HeaderStyle-HorizontalAlign="Left"
                                            meta:resourcekey="TemplateFieldResource12">
                                            <ItemTemplate>
                                                <asp:Label ID="ExpiryLabel" runat="server" 
                                                    Text='<%# FormatDate(Eval("ExpiryDate")) %>' 
                                                    meta:resourcekey="ExpiryLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%" />
                                            <ItemStyle Width="10%" />
                                        </asp:TemplateField>--%>
                                        <asp:TemplateField HeaderText="System Qty" 
                                            meta:resourcekey="TemplateFieldResource13">
                                            <ItemTemplate>
                                                <asp:Label ID="SystemQtyLabel" runat="server" dir="rtl" 
                                                    Text='<%# Bind("SystemQuantity") %>' meta:resourcekey="SystemQtyLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Right" Width="8%" />
                                            <ItemStyle HorizontalAlign="Right" Width="8%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Physical Qty" 
                                            meta:resourcekey="TemplateFieldResource14">
                                            <ItemTemplate>
                                                <asp:Label ID="PhysicalQtyLabel" runat="server" dir="rtl" 
                                                    Text='<%# Bind("PhysicalQuantity") %>' 
                                                    meta:resourcekey="PhysicalQtyLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Right" Width="8%" />
                                            <ItemStyle HorizontalAlign="Right" Width="8%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Variance" 
                                            meta:resourcekey="TemplateFieldResource15">
                                            <ItemTemplate>
                                                <asp:Label ID="VarianceLabel" runat="server" 
                                                    Text='<%# Bind("VarianceQuantity") %>' 
                                                    meta:resourcekey="VarianceLabelResource1"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Right" Width="8%" />
                                            <ItemStyle HorizontalAlign="Right" Width="8%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Approved Qty" 
                                            meta:resourcekey="TemplateFieldResource16">
                                            <ItemTemplate>
                                                <asp:TextBox ID="ApprovedQtyTextBox" runat="server" Text='<%# Bind("ApprovalQuantity") %>'
                                                    onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                                    Style="text-align: right; width='80%'" 
                                                    meta:resourcekey="ApprovedQtyTextBoxResource1"></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Right" Width="12%" />
                                            <ItemStyle HorizontalAlign="Right" Width="12%" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <!--Grid Ends-->
                    </div>
                </div>

                        </div>
                    </asp:Panel>
                </div>
                <!-- Sub Container Box1 Ends -->
                <!-- Sub Container Box2 Start -->
          
            </div>
                            </td>
                        </tr>
                    </table>
                    <%--HEDP History Ends Here--%>
                </div>
            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div> 
        </ContentTemplate>
    </asp:UpdatePanel>
     <%--<script data-main="../../../JavaScript/rjs/encrypt/stockverification-approval-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>  
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stockverification-approval")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>    
</asp:Content>
