<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PostLiq_DT.ascx.cs" Inherits="GMW.WebUserControls.mod_PostLiq_DT" %>
<%if (false)
  { %>
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
<%} %>

<div class="row">
    <div class="col-sm-4">
        <div id="divAL" runat="server" class="card bg-warning small">
            <div class="card-header">
                <b><%: traduci("ContenutoAL") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <div class="bg-primary text-light">
                    <asp:Label runat="server" ID="lblAL" />
                </div>
                <asp:GridView ID="grViewSource" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="UDC" DataSourceID="odsAL" Width="100%">
                    <RowStyle CssClass="ctrRowStyle" />
                    <AlternatingRowStyle CssClass="ctrAltRowStyle" />
                    <EditRowStyle CssClass="ctrEditRowStyle" />
                    <SelectedRowStyle CssClass="ctrSelRowStyle" />
                    <FooterStyle CssClass="ctrFooter" />
                    <PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
                    <EmptyDataRowStyle CssClass="ctrRowStyle" />
                    <EmptyDataTemplate>
                        <asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
                            <ItemTemplate>
                                <b>
                                    <asp:Label ID="lblUdc" runat="server" Text='<%# Eval("UDC") %>' /></b>
                                <br />
                                <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <span style="padding: 0px 4px;">
                                    <b>
                                        <asp:Label ID="lblQtaDtx" runat="server" Text='<%# Eval("QtaDtx","{0:0}") %>' /></b>
                                    /<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:0}") %>' />
                                </span>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsAL" runat="server" OldValuesParameterFormatString="{0}"
                    SelectMethod="getByAL" TypeName="GMW_data.DS_magazzinoTableAdapters.v_A2U2DTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="lblAL" DefaultValue="AL0000" Name="AL" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:LinkButton runat="server" ID="lbtPrendeCaricoAL" Width="100%" CssClass="btn btn-warning btn-sm" OnClick="lbtPrendeCaricoAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-down fa-2x'></i> <%: traduci("lbtPrendeCaricoAL") %></asp:LinkButton>
                <asp:LinkButton runat="server" ID="lbtChiudiAL" Width="100%" CssClass="btn btn-danger btn-sm" OnClick="lbtChiudiAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-up fa-2x'></i> <%: traduci("lbtChiudeAL") %></asp:LinkButton>
            </div>
        </div>
        <div id="div1" runat="server" class="card bg-warning small">
            <div class="card-header">
                <b><%: traduci("ModoRimDtx") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <input runat="server" id="chkDtxMode" type="checkbox" class="bootSwitch" data-size="large" data-on-text="- REM" data-off-text="NORM" data-on-color="danger">
            </div>
        </div>
    </div>
    <div class="col-sm-4">
        <div>
            <asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="32pt" Text="" />
        </div>
        <div>
            <asp:Label runat="server" ID="lblDescrAttivo" Font-Size="2em" Text="" ToolTip="particolare" />
            <br />
            <asp:Label runat="server" ID="lblDisegno" Font-Size="1.8em" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
        </div>
        <div>
            <div id="divBarcode" runat="server">
                <div>
                    <div>
                        <asp:Label runat="server" ID="lblBarcode" AssociatedControlID="txtBarcode"><%: traduci("lblDataMatrix") %></asp:Label>
                    </div>
                    <asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
                </div>
            </div>
            <div id="divNote" runat="server">
                <div>
                    <%: traduci("Note") %>
                </div>
                <div>
                    <asp:TextBox runat="server" ID="txtNote" Height="4em" Width="100%" Font-Size="2em" Style="text-align: center" TextMode="MultiLine" TabIndex="2" />
                </div>
                <div>
                    <asp:LinkButton runat="server" ID="lbtStampaUDC" Width="100%" CssClass="btn btn-warning btn-lg" TabIndex="3" OnClick="lbtStampaUDC_Click"><i aria-hidden='true' class='fa fa-print fa-2x'></i> <%: traduci("lbtGeneraUDC") %></asp:LinkButton>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-4">
        <div class="card bg-primary text-light small">
            <div class="card-header">
                <b><%: traduci("Destinazione") %></b> (UDC)
            </div>
            <div class="card-body bg-light text-dark">
                <div class="bg-primary text-light">
                    <asp:Label runat="server" ID="lblDestAL" />
                </div>
                <asp:GridView ID="grViewDest" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="UDC" DataSourceID="odsDestAL" Width="100%" OnSelectedIndexChanged="grViewDest_SelectedIndexChanged">
                    <RowStyle CssClass="ctrRowStyle" />
                    <AlternatingRowStyle CssClass="ctrAltRowStyle" />
                    <EditRowStyle CssClass="ctrEditRowStyle" />
                    <SelectedRowStyle CssClass="ctrSelRowStyle" />
                    <FooterStyle CssClass="ctrFooter" />
                    <PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
                    <EmptyDataRowStyle CssClass="ctrRowStyle" />
                    <EmptyDataTemplate>
                        <asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:TemplateField ShowHeader="False">
                            <HeaderTemplate>
                                <asp:LinkButton ID="btnReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class='<%# cssGlyphByQty(Eval("QtaDtx"),Eval("Qta"))%>'></i></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
                            <ItemTemplate>
                                <b>
                                    <asp:Label ID="lblUdc" runat="server" Text='<%# Eval("UDC") %>' /></b>
                                <br />
                                <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <span style="padding: 0px 4px;">
                                    <b>
                                        <asp:Label ID="lblQtaDtx" runat="server" Text='<%# Eval("QtaDtx","{0:0}") %>' /></b>
                                    /<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:0}") %>' />
                                </span>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsDestAL" runat="server" OldValuesParameterFormatString="{0}"
                    SelectMethod="getByAL" TypeName="GMW_data.DS_magazzinoTableAdapters.v_A2U2DTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="lblDestAL" DefaultValue="AL0000" Name="AL" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
        <div id="divQta" runat="server" class="card bg-default small">
            <div class="card-header">
                <b><%: traduci("lblQtaPart") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <asp:TextBox runat="server" ID="txtQta" Width="100%" Font-Size="28pt" Style="text-align: center" />
                <asp:LinkButton runat="server" ID="lbtUpdQty" Font-Size="18pt" CssClass="btn btn-success" Width="100%" OnClick="lbtUpdQty_Click"><i aria-hidden='true' class='fa fa-pencil'></i> <%: traduci("updateQty") %></asp:LinkButton>
            </div>
        </div>
        <div id="divImballi" runat="server" class="card bg-primary text-light small">
            <div class="card-header">
                <b><%: traduci("CodImballo") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <asp:Label runat="server" ID="lblPart" />
                <asp:DropDownList runat="server" ID="ddlImballi" DataSourceID="odsImballi" DataTextField="value" DataValueField="value" OnDataBound="ddlImballi_DataBound" Font-Size="2em"></asp:DropDownList>
                <asp:ObjectDataSource runat="server" ID="odsImballi" OldValuesParameterFormatString="original_{0}" SelectMethod="getByPart" TypeName="GMW_data.DS_UtilityTableAdapters.v_selImballiTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="lblPart" DefaultValue="" PropertyName="Text" Name="Particolare" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
    </div>
</div>