<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_nuovaListaPrelievo.ascx.cs" Inherits="GMW.WebUserControls.mod_nuovaListaPrelievo" %>

<table>
    <tr style="font-size: 7pt;">
        <td>
            <asp:Label ID="lblTipo" runat="server" />
        </td>
        <td>
            <asp:Label ID="lblParticolare" runat="server" />
        </td>
        <td>
            <asp:Label ID="lblEsponente" runat="server" />
        </td>
        <td>
            <asp:Label ID="lblFigura" runat="server" />
        </td>
        <td>
            <asp:Label ID="lblQta" runat="server" />
        </td>
        <td>
            <asp:Label ID="lblImballo" runat="server" />
        </td>
    </tr>
    <tr>
        <td>
            <asp:DropDownList ID="ddlTipoLista" runat="server" DataSourceID="odsTipoLista" DataTextField="label"
                DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlTipoLista_SelectedIndexChanged" OnDataBound="ddlTipoLista_SelectedIndexChanged" CssClass="btn btn-default btn-sm">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="odsTipoLista" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selTipoListaTableAdapter"></asp:ObjectDataSource>
        </td>
        <td>
            <asp:TextBox ID="txtParticolare" runat="server" OnTextChanged="txtParticolare_TextChanged" AutoPostBack="True" />
        </td>
        <td>
            <asp:DropDownList ID="ddlEsponente" runat="server" DataSourceID="odsEsponente" DataTextField="Esponente"
                DataValueField="Esponente" AutoPostBack="True" OnSelectedIndexChanged="ddlEsponente_SelectedIndexChanged" CssClass="btn btn-default btn-sm">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="odsEsponente" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="getEspByPart" TypeName="GMW_data.DS_magazzinoTableAdapters.v_particolariEsponenteFiguraTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtParticolare" DefaultValue="*" Name="Particolare"
                        PropertyName="text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
        <td>
            <asp:DropDownList ID="ddlFigura" runat="server" DataSourceID="odsFigura" DataTextField="Figura"
                DataValueField="Figura" AutoPostBack="True" OnSelectedIndexChanged="ddlFigura_SelectedIndexChanged" CssClass="btn btn-default btn-sm">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="odsFigura" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="getFigByPart" TypeName="GMW_data.DS_magazzinoTableAdapters.v_particolariEsponenteFiguraTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtParticolare" DefaultValue="*" Name="Particolare"
                        PropertyName="text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
        <td>
            <asp:TextBox ID="txtQta" runat="server" />
            <%--<asp:RequiredFieldValidator ID="rfvQta" runat="server" ErrorMessage="!!!" ControlToValidate="txtQta"
                Display="Dynamic" />--%>
        </td>
        <td>
            <asp:DropDownList ID="ddlImballo" runat="server" DataSourceID="odsImballo" DataTextField="CodImballo"
                DataValueField="CodImballo" AutoPostBack="True" OnSelectedIndexChanged="ddlImballo_SelectedIndexChanged" CssClass="btn btn-default btn-sm">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="odsImballo" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="getImbByPart" TypeName="GMW_data.DS_magazzinoTableAdapters.v_particolariEsponenteFiguraTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtParticolare" DefaultValue="*" Name="Particolare" PropertyName="text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
    </tr>
    <tr>
        <td colspan="6">
            <div style="float: left;">
                <asp:Label ID="lblDestinatario" runat="server" Font-Size="7pt" />
                <asp:DropDownList runat="server" ID="ddlDestin" Visible="false" DataTextField="label" DataValueField="value" CssClass="btn btn-default btn-sm" DataSourceID="odsDestinatario" />
                <asp:ObjectDataSource ID="odsDestinatario" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="getByConditio" TypeName="GMW_data.DS_UtilityTableAdapters.v_selDestinatariListePrelievoTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddlTipoLista" Name="conditio" PropertyName="SelectedValue"
                            DefaultValue="*" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </div>
            <div style="float: right;">
                <asp:Label runat="server" ID="lblTotPz" />
                <asp:Button ID="btnCreaNuova" runat="server" OnClick="btnCreaNuova_Click" Visible="false" CssClass="btn btn-primary btn-sm" />
            </div>
        </td>
    </tr>
</table>



