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

<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="uc1" %> 
    <%@ Register Src="~/UserControls/Common/CommonSearch/AlphabetSearchCommonControl.ascx" TagName="AlphabetSearchCommonControl"
TagPrefix="ACS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
      
    <asp:UpdatePanel ID="StockTransferRequestUpnl" runat="server">
        <ContentTemplate>
         <uc1:CommonSearchUserControl ID="CommonSearchControl" Visible ="false" runat="server" />
         <ACS:AlphabetSearchCommonControl ID="AlphabetCommonSearch" runat="server" Visible="false" />
            <div class="himssuHeader1WireBox">
                <div class="himsBoxHeader">
                    <div class="leftdiv">
                    </div>
                    <div class="himsBoxTitle">
                        <div class="headerText">
                            Request</div>
                    </div>
                </div>
                <div class="himsBoxContent">
                    <div class="contentHolder">
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="RequestNumberLabel" runat="server" Text="Request No" 
                                    meta:resourcekey="RequestNumberLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <acc:AutoCompleteControl ID="RequestNumberTextBox" runat="server" MinimumPrefixLength="2"
                                    Width="150px" ContextKey="sProcurement.tStockTransferRequest" AutoPostBack="true"
                                    TabIndex="1" DisplayLoadingStatus="true" FirstRowSelected="false" MaxLength="20"
                                    ValidateOnTextChanged="false" 
                                    OnTextChanged="RequestNumberTextBox_TextChanged" />
                                <asp:ImageButton ID="RequestNumberSearchButton" runat="server" SkinID="FindImage"
                                    ToolTip="Request Number Search" TabIndex="2" 
                                    OnClick="RequestNumberSearchButton_OnClick" 
                                    meta:resourcekey="RequestNumberSearchButtonResource1" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="RequestedDateLabel" runat="server" Text="Requested Date" 
                                    meta:resourcekey="RequestedDateLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox SkinID="CustomWidthDisabledTextbox" ReadOnly="True" ID="RequestedDateDisplayLabel"
                                    runat="server" Width="150px" 
                                    meta:resourcekey="RequestedDateDisplayLabelResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="FromLocationLabel" runat="server" Text="From Location" 
                                    CssClass="mandatory" meta:resourcekey="FromLocationLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <asp:DropDownList ID="FromLocationDropDownList" runat="server" AutoPostBack="True"
                                    Width="154px" SkinID="CustomWidthDropDownList" TabIndex="3" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" 
                                    OnSelectedIndexChanged="FromLocationDropDownList_SelectedIndexChanged" 
                                    meta:resourcekey="FromLocationDropDownListResource1">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="ToLocationLabel" runat="server" Text="To Location" 
                                    CssClass="mandatory" meta:resourcekey="ToLocationLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList ID="ToLocationDropDownList" runat="server" AutoPostBack="True"
                                    Width="154px" SkinID="CustomWidthDropDownList" TabIndex="4" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" 
                                    OnSelectedIndexChanged="ToLocationDropDownList_SelectedIndexChanged" 
                                    meta:resourcekey="ToLocationDropDownListResource1">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="RequestedByLabel" runat="server" Text="Requested By" 
                                    CssClass="mandatory" meta:resourcekey="RequestedByLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox ID="RequestedByTextBox" runat="server" Width="150px" SkinID="CustomWidthTextbox"
                                    AutoPostBack="True" MaxLength="100" TabIndex="5" 
                                    AutoCompleteType="Disabled" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" 
                                    meta:resourcekey="RequestedByTextBoxResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                    </div>
                </div>
            </div>
            <!-- Sub Container Box Ends -->
            <div class="spacer">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" 
                    meta:resourcekey="Image1Resource1" /></div>
            <!-- Sub Container Box Start -->
            <div class="himssuHeader1WireBox">
                <div class="himsBoxHeader">
                    <div class="leftdiv">
                    </div>
                    <div class="himsBoxTitle">
                        <div class="headerText">
                            Request Details</div>
                    </div>
                </div>
                <div class="himsBoxContent">
                    <div class="contentHolder">
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="ItemCodeLabel" runat="server" Text="Item Code" 
                                    CssClass="mandatory" meta:resourcekey="ItemCodeLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <acc:AutoCompleteControl ID="ItemCodeTextBox" runat="server" OnTextChanged="ItemCodeTextBox_TextChanged"
                                   IsCacheEnabled="false"   AutoPostBack="true" MinimumPrefixLength="2" ContextKey="Ip.StockItemMasterCode"
                                    TabIndex="6" FirstRowSelected="false" DisplayLoadingStatus="true" ValidateOnTextChanged="false"
                                    Width="150px" />
                                <asp:ImageButton ID="ItemCodeSearchButton" runat="server" SkinID="FindImage" ToolTip="Item Code Search"
                                    TabIndex="7" OnClick="ItemCodeSearchButton_OnClick" 
                                    meta:resourcekey="ItemCodeSearchButtonResource1" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="ItemNameLabel" runat="server" Text="Item Name"  CssClass="mandatory"
                                    meta:resourcekey="ItemNameLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <acc:AutoCompleteControl ID="ItemNameTextBox" runat="server" OnTextChanged="ItemNameTextBox_TextChanged"
                                  IsCacheEnabled="false"  AutoPostBack="true" MinimumPrefixLength="2" ContextKey="InventoryPlanning.ItemTitleAll"
                                    TabIndex="8" FirstRowSelected="false" DisplayLoadingStatus="true" ValidateOnTextChanged="false"
                                    MaxLength="50" Width="150px" />
                                <asp:ImageButton ID="ItemNameSearchImageButton" runat="server" SkinID="FindImage"
                                    ToolTip="Item Name Search" TabIndex="9" 
                                    OnClick="ItemNameSearchButton_OnClick" 
                                    meta:resourcekey="ItemNameSearchImageButtonResource1" />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="UOMLabel" runat="server" Text="UOM" 
                                    meta:resourcekey="UOMLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox ID="UOMDisplayLabel" runat="server" SkinID="DisabledTextBox" 
                                    ReadOnly="True" meta:resourcekey="UOMDisplayLabelResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="RequestedQtyLabel" runat="server" Text="Requested Qty" 
                                    CssClass="mandatory" meta:resourcekey="RequestedQtyLabelResource1"></asp:Label>
                            </div>
                            <div class="fLeft">
                                <asp:TextBox ID="RequestedQtyTextBox" runat="server" Width="150px" SkinID="CustomWidthTextbox"
                                    AutoPostBack="True" MaxLength="13" AutoCompleteType="Disabled" TabIndex="10"
                                    Style="text-align: right;" OnTextChanged="RequestedQtyTextBox_TexChange" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                    onBlur="javascript:return fnValidateDecimal(this,10,2)" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" 
                                    meta:resourcekey="RequestedQtyTextBoxResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <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" SkinID="MultiLineTextbox" Width="390px"
                                    MaxLength="300" TextMode="MultiLine" Height="44px" onkeypress="return textboxMultilineMaxNumber(this,300)"
                                    onchange="return textboxmultilinetextchangeMaxNumber(this,300)" TabIndex="11"
                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" 
                                    meta:resourcekey="RemarksTextBoxResource1"></asp:TextBox>
                            </div>
                        </div>
                         <div class="cBoth">
                        </div>
                    </div>
                    <div class="alignCenter pTop5">
                        <asp:Button ID="AddButton" runat="server" Width="60px" Text="Add" TabIndex="12" 
                            OnClick="AddButton_Click" meta:resourcekey="AddButtonResource1" />
                        <asp:Button ID="ClearDetailButton" runat="server" class="buttonLBlue" Text="Clear" Width="60px" 
                                    OnClick="ClearDetail_Click" 
                            meta:resourcekey="ClearButtonResource1" />
                    </div>
                    <div class="cBoth">
                    </div>
                </div>
                <div class="himssuHeader1WireBox">
                    <!--Grid starts-->
                    <div class="spacer">
                        <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/spacer.gif" 
                            meta:resourcekey="Image14Resource1" />
                    </div>
                    <asp:Panel ID="grviewPanel" runat="server" 
                        meta:resourcekey="grviewPanelResource1">
                        <div class="himssuHeader1WireBox">
                            <div class="himsBoxHeader">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <div class="fLeft">
                                            Item List
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="himsBoxContent">
                                <div id="DivHeader" style="vertical-align: top; width: 100%;">
                                    <asp:Table ID="StockTransferRequestDetailsGridViewTable" runat="server" CellPadding="0"
                                        CellSpacing="0" BackColor="#E8E8E8" ForeColor="Black" Width="100%" CssClass="GridViewTableRow"
                                        GridLines="Both" 
                                        meta:resourcekey="StockTransferRequestDetailsGridViewTableResource1">
                                    </asp:Table>
                                </div>
                                <div id="DivData" class="Container" style="vertical-align: top; height: 150px; width: 99.6%;
                                    overflow: auto" runat="server">
                                    <asp:GridView ID="StockTransferRequestDetailsGridView" runat="server" SkinID="FixedHeaderGridView"
                                        AutoGenerateColumns="False" Width="100%" ShowHeader="False" DataKeyNames="Id"
                                        OnRowDataBound="StockTransferRequestDetailsGridView_RowDataBound" OnDataBound="StockTransferRequestDetailsGridView_DataBound"
                                        EmptyDataText="No Records Found" 
                                        meta:resourcekey="StockTransferRequestDetailsGridViewResource1">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Item Code" 
                                                meta:resourcekey="TemplateFieldResource1">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "ItemCode") %>' ID="ItemCodeLabel"
                                                        runat="server" meta:resourcekey="ItemCodeLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="30%" />
                                                <ItemStyle Width="30%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Item Name" 
                                                meta:resourcekey="TemplateFieldResource2">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "ItemTitle") %>' ID="ItemNameLabel"
                                                        runat="server" meta:resourcekey="ItemNameLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="30%" />
                                                <ItemStyle Width="30%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="UOM" meta:resourcekey="TemplateFieldResource3">
                                                <ItemTemplate>
                                                    <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "UomTitle") %>' ID="UomLabel"
                                                        runat="server" meta:resourcekey="UomLabelResource2"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="20%" />
                                                <ItemStyle Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Requested Qty" 
                                                meta:resourcekey="TemplateFieldResource4">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="RequestedQtyLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "RequestedQuantity") %>'
                                                        Style="text-align: Left; border-style: none; background-color: Transparent;"
                                                        ReadOnly="True" meta:resourcekey="RequestedQtyLabelResource2"></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Left" Width="15%" />
                                                <ItemStyle HorizontalAlign="Left" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Delete" 
                                                meta:resourcekey="TemplateFieldResource5">
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" />
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="DeleteImageButton" SkinID="DeleteImage" ToolTip="Delete" runat="server"
                                                        OnClick="DeleteImageButton_OnClick" 
                                                        meta:resourcekey="DeleteImageButtonResource1"></asp:ImageButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                    <!--Grid Ends-->
                </div>
            </div>              
        </ContentTemplate>        
    </asp:UpdatePanel>  
     <script data-main="../../../JavaScript/rjs/encrypt/stocktransfer-request-encrypt" src="../../../JavaScript/rjs/require.js"></script> 
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stocktransfer-request")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>    
</asp:Content>
