<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_MaterialManagement_Procurement_PurchaseOrderList, 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/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DataPickerControl"
    TagPrefix="HIMS" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server">
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
            <div id="divContentPage" class="divcontentpagemargin">
                <!-- 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="0px" 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;" width="100%">
                                <div class="himssuHeader2WireBox whitebox">
                                    <div class="himsBoxHeader note note1 box box-danger">
                                        <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"
                                                        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="FromDateLabel" Text="From Date" runat="server"
                                                                meta:resourcekey="FromDateLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <HIMS:DataPickerControl ID="FromDateTextBox" AutoCompleteType="Disabled" runat="server"
                                                                Width="100px" AutoPostBack="true" DateTabIndex="1" DisplayDatePicker="true" OnTextChanged="FromDateTextBox_TextChanged" />
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="ToDateLabel" Text="To Date" runat="server"
                                                                meta:resourcekey="ToDateLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5 ">
                                                            <HIMS:DataPickerControl ID="ToDateTextBox" AutoCompleteType="Disabled" runat="server"
                                                                Width="100px" AutoPostBack="true" DateTabIndex="2" DisplayDatePicker="true" OnTextChanged="ToDateTextBox_TextChanged" />
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5" runat="server" visible="false">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="LocationLabel" runat="server" Text="Location"
                                                                meta:resourcekey="LocationLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft ">
                                                            <asp:DropDownList ID="LocationDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                                Width="150px" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()"
                                                                meta:resourcekey="LocationDropDownListResource1">
                                                            </asp:DropDownList>
                                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                                        </div>
                                                    </div>
                                                    <div class="cBoth">
                                                    </div>
                                                    <div class="outerBox pTop5">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="VendorLabel" runat="server" Text="Vendor"
                                                                meta:resourcekey="VendorLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <acc:AutoCompleteControl ID="VendorAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                                Width="100px" FirstRowSelected="true" ContextKey="Procurement.VendorName" AutoPostBack="true"
                                                                DisplayLoadingStatus="true" IsCacheEnabled="false" />
                                                            <asp:ImageButton ID="VendorSearchImageButton" SkinID="FindImage" OnClick="VendorSearchImageButton_Click"
                                                                runat="server" ToolTip="Vendor Search"
                                                                meta:resourcekey="VendorSearchImageButtonResource1" />
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="POStatusLabel" runat="server" Text="PO Status"
                                                                meta:resourcekey="POStatusLabelResource1"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList ID="POStatusDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                                Width="104px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                OnSelectedIndexChanged="POStatusDropDownList_SelectedIndexChanged"
                                                                meta:resourcekey="POStatusDropDownListResource1">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="cBoth">
                                                    </div>
                                                    <div class="alignCenter pTop5">
                                                        <asp:Button ID="SearchButton" Text="Search" runat="server"
                                                            OnClick="SearchButton_Click" SkinID="0" CssClass="PrimaryButton" />
                                                        <asp:Button ID="ResetButton" runat="server" Text="Clear"
                                                            OnClick="ResetButton_Click" meta:resourcekey="ResetButtonResource1" />
                                                    </div>
                                                    <div class="cBoth">
                                                    </div>
                                                </asp:Panel>

                                                <div id="Div1" class="himssuHeader7WireBox box-body box-solid gridviewfont" runat="server">
                                                    <!--Grid Starts-->
                                                    <div id="PurchaseOrderListDetailDiv" visible="False" runat="server">
                                                        <div class="himsBoxHeader" id="PurchaseOrderDiv" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle" style="width: 99%">
                                                                <div class="headerText">
                                                                    <div class="fLeft">
                                                                        <asp:Label ID="GridViewLabel" Text="" runat="server" Font-Bold="True"
                                                                            meta:resourcekey="GridViewLabelResource1" />
                                                                    </div>
                                                                </div>
                                                                <div align="right" class="fRight" style="margin-top: 0px;">
                                                                    <uc1:GridViewPager ID="PurchaseOrderListGridView_GridViewPager" runat="server" OnFirstRecordClick="PurchaseOrderListGridView_GridViewPager_FirstRecordClick"
                                                                        OnLastRecordClick="PurchaseOrderListGridView_GridViewPager_LastRecordClick" OnNextRecordClick="PurchaseOrderListGridView_GridViewPager_NextRecordClick"
                                                                        OnPrevRecordClick="PurchaseOrderListGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="PurchaseOrderListGridView_GridViewPager_TextBoxValueChange"
                                                                        ParentGridView="PurchaseOrderListGridView" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxContent">

                                                            <asp:GridView ID="PurchaseOrderListGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                AllowPaging="True" PageSize="5"
                                                                meta:resourcekey="PurchaseOrderListGridViewResource1"
                                                                CssClass="table table-bordered table-striped">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Id" SortExpression="Id" Visible="False"
                                                                        meta:resourcekey="TemplateFieldResource1">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>'
                                                                                meta:resourcekey="IdLabelResource1"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Draft PO Number" HeaderStyle-HorizontalAlign="Left"
                                                                        meta:resourcekey="TemplateFieldResource2">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="DraftPONumberLinkButton" Text='<%# Bind("DraftPONumber") %>'
                                                                                runat="server" CommandArgument='<%# Bind("Id") %>'
                                                                                OnClick="DraftPONumberLinkButton_Click"
                                                                                meta:resourcekey="DraftPONumberLinkButtonResource1"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Width="15%" />
                                                                        <ItemStyle Width="15%" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="PO Number" HeaderStyle-HorizontalAlign="Left"
                                                                        meta:resourcekey="TemplateFieldResource3">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="PONumberLinkButton" Text='<%# Bind("PONumber") %>' runat="server"
                                                                                CommandArgument='<%# Bind("Id") %>' OnClick="PONumberLinkButton_Click"
                                                                                meta:resourcekey="PONumberLinkButtonResource2"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Width="15%" />
                                                                        <ItemStyle Width="15%" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Date" meta:resourcekey="TemplateFieldResource4" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="DateLabel" runat="server" Text='<%# Bind("CreatedDateTime", "{0:dd/MM/yyyy}") %>'
                                                                                meta:resourcekey="DateLabelResource2"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Width="15%" />
                                                                        <ItemStyle Width="15%" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Status" HeaderStyle-HorizontalAlign="Left"
                                                                        meta:resourcekey="TemplateFieldResource5">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StatusLabel" runat="server" Text='<%# Bind("StatusName") %>'
                                                                                meta:resourcekey="StatusLabelResource2"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Width="15%" />
                                                                        <ItemStyle Width="15%" />
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Rounded Net Amount"
                                                                        meta:resourcekey="TemplateFieldResource7">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="AmountLabel" dir="rtl" runat="server"
                                                                                Text='<%# Bind("Amount") %>' meta:resourcekey="AmountLabelResource1"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle HorizontalAlign="Right" Width="15%" />
                                                                        <ItemStyle HorizontalAlign="Right" Width="15%" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </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/purchase-orderlist-encrypt" src="../../../JavaScript/rjs/require.js"></script>  --%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/purchase-orderlist")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>    
</asp:Content>