<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_MaterialManagement_InventoryPlanning_StockItemTypeMaster, App_Web_b150320m" 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/CommonSearch.ascx" TagName="CommonSearchUserControl"
TagPrefix="Common" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="StockItemTypeMasterUpdatePanel" runat="server">
        <ContentTemplate>
        <Common:CommonSearchUserControl ID="CommonSearchControl" runat ="server" Visible="false"/>
            <!-- Sub Container2 Box 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="Search" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                                <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="DetailPanel"
                                    ExpandControlID="Image2" CollapseControlID="Image2" TextLabelID="Label3" Collapsed="True"
                                    ImageControlID="Image2" ExpandedImage="~/images/buttonCollapse.gif" 
                                    CollapsedImage="~/images/buttonExpand.gif" Enabled="True" />
                            </div>
                        </div>
                    </asp:Panel>
                </div>
                <div class="himsBoxContent">
                    <asp:Panel ID="DetailPanel" runat="server" 
                        meta:resourcekey="DetailPanelResource1">
                        <div class="contentHolder">
                            <asp:Panel ID="SearchCriteriaPanel" runat="server" 
                                meta:resourcekey="SearchCriteriaPanelResource1">
                                <div class="outerBox pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="Label1" Text="Code" runat="server" 
                                            meta:resourcekey="Label1Resource1"></asp:Label>
                                    </div>
                                    <div class="fLeft">
                                        <asp:TextBox ID="SearchCodeTextbox" SkinID="CustomWidthTextBox" Width="100px" runat="server"
                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" 
                                            meta:resourcekey="SearchCodeTextboxResource1"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBoxPreBtn pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="Label2" Text="Name" runat="server" 
                                            meta:resourcekey="Label2Resource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="SearchNameTextBox" SkinID="CustomWidthTextBox" Width="150px" runat="server"
                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" 
                                            meta:resourcekey="SearchNameTextBoxResource1"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5">
                                    <div class="searchBoxBtn">
                                        <asp:Button ID="SearchButton" Text="Search" runat="server" 
                                            OnClick="SearchButton_Click" SkinID="0" CssClass="PrimaryButton"/>
                                        <asp:Button ID="ResetButton" runat="server" Text="Clear" onblur="fnClearTabIndexChange()"
                                            OnClick="ResetButton_Click" meta:resourcekey="ResetButtonResource1" />
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                            </asp:Panel>
                            <div id="StockItemTypeMasterDetailDiv" visible="False" runat="server">
                                <div id="Div1" class="himssuHeader1WireBox" runat="server" style="width: 100%; margin-right: 5px;">
                                    <div class="spacer">
                                        <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" 
                                            meta:resourcekey="Image3Resource1" />
                                    </div>
                                    <div class="himsBoxHeader" id="StockItemTypeMasterDiv" runat="server">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle" style="width: 99%">
                                            <div class="headerText">
                                                <div class="fLeft">
                                                    <asp:Label ID="GridViewLabel" Text="List" runat="server" Font-Bold="True" 
                                                        meta:resourcekey="GridViewLabelResource1" />
                                                </div>
                                            </div>
                                            <div align="right" class="fRight" style="margin-top: -3px;">
                                                <uc1:GridViewPager ID="StockItemTypeMasterGridView_GridViewPager" runat="server"
                                                    OnFirstRecordClick="StockItemTypeMasterGridView_GridViewPager_FirstRecordClick"
                                                    OnLastRecordClick="StockItemTypeMasterGridView_GridViewPager_LastRecordClick"
                                                    OnNextRecordClick="StockItemTypeMasterGridView_GridViewPager_NextRecordClick"
                                                    OnPrevRecordClick="StockItemTypeMasterGridView_GridViewPager_PrevRecordClick"
                                                    OnTextBoxValueChange="StockItemTypeMasterGridView_GridViewPager_TextBoxValueChange"
                                                    ParentGridView="StockItemTypeMasterGridView" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <div id="DivHeader" style="vertical-align: top; width: 100%;">
                                            <asp:Table ID="StockItemTypeMasterGridViewTable" runat="server" CellPadding="0" CellSpacing="0"
                                                BackColor="#E8E8E8" ForeColor="Black" Width="100%" GridLines="Both" 
                                                CssClass="GridViewTableRow" 
                                                meta:resourcekey="StockItemTypeMasterGridViewTableResource1">
                                            </asp:Table>
                                        </div>
                                        <div class="himsBoxContentMsg" id="GridMessageDiv" runat="server" 
                                            visible="False">
                                        </div>
                                        <div id="DivData" class="Container" style="vertical-align: top; height: 100px; width: 99.6%;">
                                            <asp:GridView ID="StockItemTypeMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                OnRowDataBound="StockItemTypeMasterGridView_RowDataBound" OnPageIndexChanging="StockItemTypeMasterGridView_PageIndexChanging"
                                                AllowPaging="True" PageSize="5" ShowHeader="False" 
                                                meta:resourcekey="StockItemTypeMasterGridViewResource1">
                                                <Columns>
                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="EditLinkButton" runat="server" OnClick="LinkButton_Click" Text="Select"
                                                                CausesValidation="False" CssClass="SelectLink" CommandName="Select" 
                                                                meta:resourcekey="EditLinkButtonResource1"></asp:LinkButton>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="5%" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </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>
                                                        <HeaderStyle Width="0%" />
                                                        <ItemStyle Width="0%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Code" SortExpression="Code" 
                                                        meta:resourcekey="TemplateFieldResource3">
                                                        <ItemTemplate>
                                                            <asp:Label ID="CodeLabel" runat="server" Text='<%# Bind("Code") %>' 
                                                                meta:resourcekey="CodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="10%" />
                                                        <ItemStyle Width="10%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Name" SortExpression="Name" 
                                                        meta:resourcekey="TemplateFieldResource4">
                                                        <ItemTemplate>
                                                            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Title") %>' 
                                                                meta:resourcekey="NameLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="10%" />
                                                        <ItemStyle Width="10%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Accrual A/C" SortExpression="AccrualAccountCode" 
                                                        meta:resourcekey="TemplateFieldResource5">
                                                        <ItemTemplate>
                                                            <asp:Label ID="AAccrualAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("AccrualAccountCode") %>' 
                                                                meta:resourcekey="AAccrualAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="10%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="10%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Cogs A/C" SortExpression="CogsAccountCode" 
                                                        meta:resourcekey="TemplateFieldResource6">
                                                        <ItemTemplate>
                                                            <asp:Label ID="CogsAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("CogsAccountCode") %>' 
                                                                meta:resourcekey="CogsAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="9%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Consump A/C" 
                                                        SortExpression="ConsumptionAccountCode" 
                                                        meta:resourcekey="TemplateFieldResource7">
                                                        <ItemTemplate>
                                                            <asp:Label ID="ConsumptionAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("ConsumptionAccountCode") %>' 
                                                                meta:resourcekey="ConsumptionAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="10%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="10%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Inventory A/C" 
                                                        SortExpression="InventoryAccountCode" meta:resourcekey="TemplateFieldResource8">
                                                        <ItemTemplate>
                                                            <asp:Label ID="InventoryAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("InventoryAccountCode") %>' 
                                                                meta:resourcekey="InventoryAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="9%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="PriceAdj A/C" 
                                                        SortExpression="PriceAdjustmentAccountCode" 
                                                        meta:resourcekey="TemplateFieldResource9">
                                                        <ItemTemplate>
                                                            <asp:Label ID="PriceAdjustmentAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("PriceAdjustmentAccountCode") %>' 
                                                                meta:resourcekey="PriceAdjustmentAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="9%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="WriteOff A/C" 
                                                        SortExpression="WriteOffAccountCode" meta:resourcekey="TemplateFieldResource10">
                                                        <ItemTemplate>
                                                            <asp:Label ID="WriteOffAccountCodeLabel" runat="server" 
                                                                Text='<%# Bind("WriteOffAccountCode") %>' 
                                                                meta:resourcekey="WriteOffAccountCodeLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Right" Width="9%" />
                                                        <ItemStyle HorizontalAlign="Right" Width="9%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="InActive" SortExpression="IsObsolete" 
                                                        meta:resourcekey="TemplateFieldResource11">
                                                        <ItemTemplate>
                                                            <asp:Label ID="ObsoleteLabel" runat="server" 
                                                                Text='<%# DataBinder.Eval(Container.DataItem,"IsObsolete").ToString().ToUpper()=="TRUE"?"Y":"N" %>' 
                                                                meta:resourcekey="ObsoleteLabelResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                        <ItemStyle HorizontalAlign="Center" Width="15%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </div>
            </div>
            <!-- Sub Container2 Box Ends -->
            <div class="spacer">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" 
                    meta:resourcekey="Image1Resource1" />
            </div>
            <!-- Sub Container1 Box Start -->
            <div class="himssuHeader1WireBox">
                <div class="himsBoxHeader">
                    <div class="leftdiv">
                    </div>
                    <div class="himsBoxTitle">
                        <div class="headerText">
                            <asp:Label ID="StockItemTypeMasterDetailLabel" runat="server" 
                                Text="Maintenance" meta:resourcekey="StockItemTypeMasterDetailLabelResource1"></asp:Label>
                        </div>
                    </div>
                </div>
                <div class="himsBoxContent">
                    <div class="contentHolder">
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="CodeLabel" runat="server" Text="Code" SkinID="MandatoryLabel" 
                                    meta:resourcekey="CodeLabelResource2"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <asp:TextBox ID="CodeTextBox" SkinID="CustomWidthTextBox" Width="150px" runat="server"
                                    MaxLength="10" AutoPostBack="True" OnTextChanged="CodeTextBox_TextChanged" onkeypress="return fnKeyPressForCodeField(event)"
                                    onblur="return fnonTextChangeCodeField(this)" 
                                    meta:resourcekey="CodeTextBoxResource1"></asp:TextBox>
                                <asp:HiddenField ID="IdHiddenField" runat="server" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="AccrualAccountAccountLabel" runat="server" Text="Accrual Account"
                                    SkinID="MandatoryLabel" 
                                    meta:resourcekey="AccrualAccountAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <acc:AutoCompleteControl ID="AccrualAccountAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                  IsCacheEnabled="false"   FirstRowSelected="true" ContextKey="Accounting.AccountCode" AutoPostBack="false"
                                    Width="150px" DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="AccrualAccountSearchImageButton" SkinID="FindImage" OnClick="AccrualAccountSearchImageButton_Click"
                                    ToolTip="Accrual Account Search" runat="server" 
                                    meta:resourcekey="AccrualAccountSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="NameLabel" runat="server" Text="Name" SkinID="MandatoryLabel" 
                                    meta:resourcekey="NameLabelResource2"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox ID="NameTextBox" SkinID="CustomWidthTextBox" Width="150px" runat="server"
                                    MaxLength="50" onkeypress="return fnKeyPressForNameField(event)"
                                    onblur="return fnonTextChangeNameField(this)" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" meta:resourcekey="NameTextBoxResource2"></asp:TextBox>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="ConsumptionAccountLabel" runat="server" Text="Consumption Account"
                                    SkinID="MandatoryLabel" Width="110px" 
                                    meta:resourcekey="ConsumptionAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <acc:AutoCompleteControl ID="ConsumptionAccountAutoCompleteControl" runat="server"
                                  IsCacheEnabled="false"  MinimumPrefixLength="2" FirstRowSelected="true" ContextKey="Accounting.AccountCode"
                                    Width="150px" AutoPostBack="false" DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="ConsumptionAccountSearchImageButton" SkinID="FindImage" OnClick="ConsumptionAccountSearchImageButton_Click"
                                    ToolTip="Consumption Account Search" runat="server" 
                                    meta:resourcekey="ConsumptionAccountSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="InventoryAccountLabel" Width="100px" runat="server" Text="Inventory Account"
                                    SkinID="MandatoryLabel" meta:resourcekey="InventoryAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <acc:AutoCompleteControl ID="InventoryAccountAutoCompleteControl" runat="server"
                                   IsCacheEnabled="false" MinimumPrefixLength="2" FirstRowSelected="true" ContextKey="Accounting.AccountCode"
                                    Width="150px" AutoPostBack="false" DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="InventoryAccountSearchImageButton" SkinID="FindImage" OnClick="InventoryAccountSearchImageButton_Click"
                                    ToolTip="Inventory Account Search" runat="server" 
                                    meta:resourcekey="InventoryAccountSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="WriteOffAccountLabel" Width="100px" runat="server" Text="Write Off Account"
                                    SkinID="MandatoryLabel" meta:resourcekey="WriteOffAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <acc:AutoCompleteControl ID="WriteOffAccountAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                   IsCacheEnabled="false" FirstRowSelected="true" ContextKey="Accounting.AccountCode" AutoPostBack="false"
                                    Width="150px" DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="WriteOffAccountSearchImageButton" SkinID="FindImage" OnClick="WriteOffAccountSearchImageButton_Click"
                                    ToolTip="Write Off Account Search" runat="server" 
                                    meta:resourcekey="WriteOffAccountSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="COGSAccountLabel" runat="server" Text="COGS Account" 
                                    SkinID="MandatoryLabel" meta:resourcekey="COGSAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <acc:AutoCompleteControl ID="COGSAccountCodeAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                  IsCacheEnabled="false"  FirstRowSelected="true" ContextKey="Accounting.AccountCode" Width="150px" AutoPostBack="false"
                                    DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="COGSAccountCodeAutoCompleteControlSearchImageButton" SkinID="FindImage"
                                    OnClick="COGSAccountCodeAutoCompleteControlSearchImageButton_Click" ToolTip="COGS Account Search"
                                    runat="server" 
                                    meta:resourcekey="COGSAccountCodeAutoCompleteControlSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="PriceAdjustmentAccountLabel" Width="135px" runat="server" Text="Price Adjustment Account"
                                    SkinID="MandatoryLabel" 
                                    meta:resourcekey="PriceAdjustmentAccountLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <acc:AutoCompleteControl ID="PriceAdjustmentAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                  IsCacheEnabled="false"  FirstRowSelected="true" ContextKey="Accounting.AccountCode" AutoPostBack="false"
                                    Width="150px" DisplayLoadingStatus="true" />
                                <asp:ImageButton ID="PriceAdjustmentSearchImageButton" SkinID="FindImage" OnClick="PriceAdjustmentSearchImageButton_Click"
                                    ToolTip="Price Adjustment Account Search" runat="server" 
                                    meta:resourcekey="PriceAdjustmentSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5" id="ToHideInActive" runat="server">
                            <div class="fLeft">
                                <asp:CheckBox ID="ObsoleteCheckBox" runat="server" 
                                    meta:resourcekey="ObsoleteCheckBoxResource1" />
                            </div>
                            <div class="fLeft pLeft5 pTop5">
                                <asp:Label ID="ObsoleteLabel" runat="server" Text="InActive" 
                                    meta:resourcekey="ObsoleteLabelResource2"></asp:Label>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                    </div>
                </div>
            </div>
            <!-- Sub Container1 Box Ends -->
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/encrypt/stockitem-typemaster-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stockitem-typemaster")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>    
</asp:Content>