<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_searchRes.ascx.cs" Inherits="GMW_Term.WebUserControls.mod_searchRes" %>
<%@ Register Src="mod_detail_UDC.ascx" TagName="mod_detail_UDC" TagPrefix="uc1" %>
<% if (false)
   { %>
<link href="../Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="clearAll" style="text-align: center; margin: auto; height: 32px; vertical-align: bottom;">
    <asp:ImageButton ID="btnLeft" runat="server" ImageUrl="../Images/ArrowLeft.png" OnClick="btnLeft_Click" Width="32px" Height="32px" />
    &nbsp;
    <asp:ImageButton ID="btnUp" runat="server" ImageUrl="../Images/ArrowUp.png" OnClick="btnUp_Click" Width="32px" Height="32px" />
    &nbsp;
    <%--<asp:Button ID="btnButtonsHome" runat="server" OnClick="btnButtonsHome_Click" CssClass="btnHome" Text="Ricerca [6]" AccessKey="6" Height="32px" />--%>
    <asp:ImageButton ID="btnDown" runat="server" ImageUrl="../Images/ArrowDown.png" OnClick="btnDown_Click" Width="32px" Height="32px" />
    &nbsp;
    <asp:ImageButton ID="btnRight" runat="server" ImageUrl="../Images/ArrowRight.png" OnClick="btnRight_Click" Width="32px" Height="32px" />
</div>
<asp:Panel runat="server" ID="pnlBlocchi" CssClass="clearAll">
    <div style="padding: 2px; font-size: 8pt;">
        <asp:GridView ID="grViewMag" runat="server" DataSourceID="ods" EnableModelValidation="True" DataKeyNames="IdxBlocco" AutoGenerateColumns="False" PageSize="3" AllowPaging="True" OnSelectedIndexChanged="grViewMag_SelectedIndexChanged" Width="100%">
            <RowStyle CssClass="btnGrigioHalf" />
            <SelectedRowStyle CssClass="btnAzzurroHalf" />
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbBlocco" CommandArgument='<%# Eval("IdxBlocco") %>' CommandName="Select">
                            <asp:Label runat="server" ID="lblCodBlocco" Font-Bold="true" Text='<%# Eval("CodBlocco") %>' />&nbsp;-&nbsp;
                            <asp:Label runat="server" ID="lblDescBlocco" Font-Bold="true" Text='<%# Eval("DescBlocco") %>' />
                            <br />
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("NumUDC","{0} UDC") %>' />
                            &nbsp;/&nbsp;
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("QtaTotPz","{0:0} pz") %>' />
                        </asp:LinkButton></ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_magazzinoTableAdapters.stp_MagFifoByParticolareTableAdapter">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="TK" Name="CodCS" SessionField="CodCS" Type="String" />
                <asp:SessionParameter DefaultValue="*" Name="Particolare" SessionField="Particolare_sel" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlUdc" CssClass="clearAll">
    <div style="padding: 2px; font-size: 8pt;">
        <asp:GridView ID="grViewUdc" runat="server" DataSourceID="odsUdc" EnableModelValidation="True" DataKeyNames="UDC" AutoGenerateColumns="False" PageSize="3" AllowPaging="True" Width="100%" OnSelectedIndexChanged="grViewUdc_SelectedIndexChanged">
            <RowStyle CssClass="btnGrigioHalf" />
            <SelectedRowStyle CssClass="btnAzzurroHalf" />
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbBlocco" CommandArgument='<%# Eval("UDC") %>' CommandName="Select">
                            <div class="divSx">
                                <asp:Label runat="server" ID="lblUDC" Text='<%# Eval("UDC") %>' />
                                &nbsp;
                                <asp:Label runat="server" ID="lblPos" Font-Bold="true" Text='<%# Eval("CodCella") %>' />
                            </div>
                            <div class="divDx">
                                <asp:Label runat="server" ID="Label3" Text='<%# Eval("Qta","({0:0}p.)") %>' />
                            </div>
                        </asp:LinkButton></ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsUdc" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_magazzinoTableAdapters.stp_UDC_FifoByParticolareBloccoTableAdapter">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="TK" Name="CodCS" SessionField="CodCS" Type="String" />
                <asp:SessionParameter DefaultValue="*" Name="Particolare" SessionField="Particolare_sel" Type="String" />
                <asp:SessionParameter DefaultValue="*" Name="idxBlocco" SessionField="idxBlocco_sel" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Panel>
<div class="clearAll" style="float: none; clear: both;">
    <div id="1" class="quadro1">
        <asp:Button ID="btn1" runat="server" CssClass="btnAzzurroSmall" OnClick="btn1_Click" />
    </div>
    <div id="2" class="quadro2">
        <asp:Button ID="btn2" runat="server" CssClass="btnArancioSmall" OnClick="btn2_Click" />
    </div>
    <div id="3" class="quadro3">
        <asp:Button ID="btn3" runat="server" CssClass="btnAzzurroSmall" OnClick="btn3_Click" />
    </div>
    
</div>
<asp:Panel runat="server" ID="pnlDetailUdc" CssClass="clearAll">
    <uc1:mod_detail_UDC ID="mod_detail_UDC1" runat="server" />
</asp:Panel>
