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

<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/MaterialManagement/PurchaseUom/MultiplePurchaseUom.ascx" TagPrefix="cc1" TagName="UomUserControl" %>
<%@ Register Src="~/UserControls/MaterialManagement/MultiPleBin/MultiPleBin.ascx" TagPrefix="cc2" TagName="MultiPleBinUserControl" %>
<%@ 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/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="Common" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/Stock/StockDetailBoxControl.ascx" TagName="StockControl" TagPrefix="Stock" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/AlphabetSearchCommonControl.ascx" TagName="AlphabetSearchCommonControl" TagPrefix="ACS" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ServiceItemUpdatePanel" runat="server">
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
            <ACS:AlphabetSearchCommonControl ID="AlphabetCommonSearch" runat="server" Visible="false" />
            <cc1:UomUserControl ID="UomUpdationCtrl" runat="server" />
            <%--<cc2:MultiPleBinUserControl ID="BinUserControl" runat="server" />--%>
            <div id="divContentPage" class="divcontentpagemargin">
                <!-- ContentPlaceHolder Box Starts -->
                <div 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>
                </div>
                <div class="whiteboxpaddingleft row">
                    <Stock:StockControl ID="StockUserControl" runat="server" Visible="true" />
                    <!-- Sub Container2 Box Start -->
                    <div class="himssuHeader2WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <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">
                                        <header>
                                            <i class="fal fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search" meta:resourcekey="Label3Resource1">                                                       
                                            </asp:Label>
                                        </header>
                                        <div class="pull-right mt-27">
                                            <asp:Button ID="AddNewButtonID" OnClick="AddNewButton_Click" runat="server" SkinID="0" CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="server"
                                meta:resourcekey="DetailPanelResource1">
                                <div class="himsBoxContent">
                                    <div class="contentHolder">
                                        <asp:Panel ID="SearchCriteriaPanel" runat="server"
                                            meta:resourcekey="SearchCriteriaPanelResource1">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label1" Text="Defect No" runat="server"
                                                        meta:resourcekey="Label1Resource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox ID="SearchDefectNoTextBox" SkinID="CustomWidthTextBox"
                                                        runat="server" meta:resourcekey="SearchDefectNoTextBoxResource1" MaxLength="100"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3" id="SearchItemCodeDiv" runat="server">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchItemCodeLable" runat="server"
                                                        Text="Item Code" meta:resourcekey="ItemCodeLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft display-flex">
                                                    <acc:AutoCompleteControl ID="SearchItemCodeAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                        IsCacheEnabled="false" ContextKey="Common.ItemTitleAll"
                                                        AutoPostBack="true" DisplayLoadingStatus="true"
                                                        FirstRowSelected="false" MaxLength="20" ValidateOnTextChanged="false" />
                                                    <asp:ImageButton ID="SearchiIemCodeImageButton" ToolTip="Item Code Search" SkinID="FindImage"
                                                        OnClick="SearchItemCodeImageButton_Click" runat="server"
                                                        meta:resourcekey="ItemCodeSearchButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3" id="SearchItemNameDiv" runat="server">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchItemNameLable" runat="server" Text="Item Name"
                                                        meta:resourcekey="NameLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5 display-flex">
                                                    <acc:AutoCompleteControl ID="SearchItemNameAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                        IsCacheEnabled="false"
                                                        ContextKey="InventoryPlanning.ItemTitleAll" AutoPostBack="true"
                                                        DisplayLoadingStatus="true" FirstRowSelected="false" MaxLength="300"
                                                        ValidateOnTextChanged="false" />
                                                    <asp:ImageButton ID="SearchItemNameImageButton" ToolTip="Item Name Search" SkinID="FindImage"
                                                        OnClick="SearchItemNameImageButton_Click" runat="server"
                                                        meta:resourcekey="ItemNameSearchButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="InwardNoLabel" runat="server" Text="Inward No" meta:resourcekey="InwardNoLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft display-flex">
                                                    <acc:AutoCompleteControl ID="InwardNoTextBox" runat="server" MinimumPrefixLength="2"
                                                        ContextKey="Procurement.StockInwardNumber" AutoPostBack="true"
                                                        DisplayLoadingStatus="true" FirstRowSelected="false" ValidateOnTextChanged="false" />
                                                    <asp:ImageButton ID="InwardNoSearchImageButton" ToolTip="Inward No. Search" SkinID="FindImage"
                                                        OnClick="InwardNoSearchImageButton_Click" runat="server" meta:resourcekey="InwardNoSearchImageButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="InwardDateLabel" runat="server" Text="Inward Ref Date" meta:resourcekey="InwardDateLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <DPC:DatePickerControl DisplayDatePicker="true" ID="InwardDatePickerControl" runat="Server"></DPC:DatePickerControl>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop15 col-md-12">
                                                <div class="searchBoxBtn alignCenter">
                                                    <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="server"
                                                        OnClick="SearchButton_Click" SkinID="0" CssClass="fas btn btn-search" />
                                                    <asp:Button ID="ResetButton" runat="server" Text="&#xf12d; Clear" CssClass="btn btn-clear fas" onblur="fnClearTabIndexChange()"
                                                        OnClick="ResetButton_Click" SkinID="0" meta:resourcekey="ResetButtonResource1" />
                                                    <%--mantis: 44495--%>
                                                    <asp:Button ID="ExportButton" Enabled="false" SkinID="0" CssClass="btn-examcommon btn fas"
                                                        Text="&#xf093; Export" runat="Server" OnClick="ExportButton_Click" />
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div id="StockItemMasterDetailDiv" visible="False" runat="server">
                                            <div class="himssuHeader7WireBox col-md-12" id="PatientRelationDiv" runat="server" style="width: 100%">
                                                <div class="himsBoxHeader" id="ListDiv" runat="server" visible="True">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle" style="width: 99%">
                                                        <div class="headerText">
                                                            <div class="fLeft">
                                                            </div>
                                                        </div>
                                                        <div class="fRight" style="margin-top: 0px;">
                                                            <uc1:GridViewPager ID="StockDefectiveItemMasterGridView_GridViewPager" runat="server" OnFirstRecordClick="StockDefectiveItemMasterGridView_GridViewPager_FirstRecordClick"
                                                                OnLastRecordClick="StockDefectiveItemMasterGridView_GridViewPager_LastRecordClick" OnNextRecordClick="StockDefectiveItemMasterGridView_GridViewPager_NextRecordClick"
                                                                OnPrevRecordClick="StockDefectiveItemMasterGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="StockDefectiveItemMasterGridView_GridViewPager_TextBoxValueChange"
                                                                ParentGridView="StockDefectiveItemMasterGridView" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <asp:HiddenField ID="StockItemPlanningHiddenField" runat="server" />
                                                <div class="himsBoxContent">
                                                    <div id="Div2" runat="server" class="table-responsive pTop10">
                                                        <asp:GridView ID="StockDefectiveItemMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            OnRowDataBound="StockDefectiveItemMasterGridView_RowDataBound" OnPageIndexChanging="StockDefectiveItemMasterGridView_PageIndexChanging"
                                                            PageSize="10" ShowHeader="True" AllowPaging="True"
                                                            DataKeyNames="TotalRecords"
                                                            meta:resourcekey="StockItemMasterGridViewResource1"
                                                            CssClass="table table-striped table-bordered table-hover">
                                                            <Columns>
                                                                <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="EditLinkButton" runat="server" OnClick="LinkButton_Click" Text="Select" CausesValidation="False" CommandName="Select" meta:resourcekey="EditLinkButtonResource1">
                                                                        </asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Id" SortExpression="Id" Visible="False" meta:resourcekey="TemplateFieldResource2">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>' meta:resourcekey="IdLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Defect Number" SortExpression="StockDefectiveItemNumber" HeaderStyle-HorizontalAlign="Left" meta:resourcekey="TemplateFieldResource3">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockDefectiveItemNumberLabel" runat="server" Text='<%# Bind("StockDefectiveItemNumber") %>' meta:resourcekey="StockDefectiveItemNumberResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Stock Item Code" SortExpression="StockItemCode" HeaderStyle-HorizontalAlign="Left" meta:resourcekey="TemplateFieldResource4">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockItemCodeLabel" runat="server" Text='<%# Bind("StockItemCode") %>' meta:resourcekey="NameLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Stock Item Title" SortExpression="StockItemTitle" HeaderStyle-HorizontalAlign="Left" meta:resourcekey="TemplateFieldResource4">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockItemTitleLabel" runat="server" Text='<%# Bind("StockItemTitle") %>' meta:resourcekey="NameLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Stock Inward No" SortExpression="StockInwardCode" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource4">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockInwardCodeLabel" runat="server" Text='<%# Bind("StockInwardCode") %>' meta:resourcekey="NameLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Inward Ref Date" SortExpression="StockInwardDate" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StockInwardDateLabel" runat="server" Text='<%#Convert.ToDateTime(Eval("StockInwardDate")).ToString("dd/MM/yyyy") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <asp:HiddenField ID="TaxGroupIdHiddenField" runat="server" />
                    <div class="tableContainer card card-box" id="DetailDiv" runat="server">
                        <div class="card-head">
                            <div id="NumberOfRecordDiv" runat="server" class="fRight mt-27 pagination display-flex" visible="false">
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page" ID="FirstRecordImageButton" runat="server" OnClick="FirstRecordImageButton_Click">
                                    <i class="fa fa-fast-backward"></i>
                                </asp:LinkButton>
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page" ID="PreviousImageButton" runat="server" OnClick="PreviousImageButton_Click">
                                    <i class="fa fa-play fa-rotate-180"></i>
                                </asp:LinkButton>
                                &nbsp;
                                <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                <asp:Label ID="ofLabel" Text="of" runat="server" />
                                <asp:Label ID="TotalRecord" runat="server" />
                                &nbsp;
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page" ID="NextImageButtom" runat="server" OnClick="NextImageButton_Click">
                                    <i class="fa fa-play"></i>
                                </asp:LinkButton>
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page" ID="LastRecordImageButton" runat="server" OnClick="LastRecordImageButton_Click">
                                    <i class="fa fa-fast-forward"></i>
                                </asp:LinkButton>
                                &nbsp;&nbsp;&nbsp;&nbsp; 
                            </div>
                            <div class="fRight">
                                <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a; Back" />
                            </div>
                        </div>

                        <!-- Create/Update Start -->
                        <div class="contentHolder">
                            <div class="himssuHeader1WireBox pTop15">
                                <div class="himsBoxHeader" id="Div4" runat="server" visible="True">
                                    <div class="leftdiv">
                                    </div>
                                </div>
                                <div class="himsBoxContent card-body">
                                    <div class="contentHolder">
                                        <div class="outerBox pTop5 col-md-3" id="DefectNumberDiv" runat="server">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label4" runat="server" Text="Defect No." SkinID="MandatoryLabel"
                                                    meta:resourcekey="Label4Resource1"></asp:Label>
                                            </div>
                                            <div class="fLeft">
                                                <asp:TextBox ID="DefectNumberTextBox" SkinID="CustomWidthTextBox" runat="server" disabled="true"
                                                    MaxLength="100" AutoPostBack="True" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" meta:resourcekey="CodeTextBoxResource2"></asp:TextBox>
                                                <asp:HiddenField ID="IdHiddenField" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <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" 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 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="NameLabel" runat="server" Text="Item Name" meta:resourcekey="NameLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft 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="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StockItemRemarkLabel" runat="server" Text="Stock Item Remark" meta:resourcekey="StockItemRemarkLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="StockItemRemarkTextBox" runat="server"
                                                    TextMode="MultiLine" CssClass="remark-text"
                                                    MaxLength="500" onKeypress="javascript:return fnMaxLength(this, 500)" onblur="javascript:return CheckLength(this, 500)"
                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="StockItemRemarkTextBoxResource1"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="cBoth"></div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label2" runat="server" Text="Inward No" meta:resourcekey="InwardNoLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft display-flex">
                                                <acc:AutoCompleteControl ID="InwardNoAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                    ContextKey="Procurement.StockInwardNumber" AutoPostBack="true"
                                                    DisplayLoadingStatus="true" FirstRowSelected="false" ValidateOnTextChanged="false" />
                                                <asp:ImageButton ID="InwardNoSearchImageButton1" ToolTip="Inward No. Search" SkinID="FindImage"
                                                    OnClick="InwardNoSearchImageButton_Click1" runat="server" meta:resourcekey="InwardNoSearchImageButtonResource1" />
                                            </div>
                                        </div>
                                        <div class="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StockInwardRemarkLabel" runat="server" Text="Stock Inward Remark" meta:resourcekey="StockInwardRemarkLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="StockInwardRemarkTextBox" runat="server"
                                                    TextMode="MultiLine" CssClass="remark-text"
                                                    MaxLength="500" onKeypress="javascript:return fnMaxLength(this, 500)" onblur="javascript:return CheckLength(this, 500)"
                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="StockInwardRemarkTextBoxResource1"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- Create/Update Ends -->
                    </div>
                </div>
                <%--HEDP History Ends Here--%>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stock-item-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>

