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


<div class="container-fluid" style="background-color: #cdcdcd; padding-top: 2px; padding-bottom: 2px;">
  <div class="container-flow">
    <div class="row">
      <div class="col-sm-3 text-left">
        <asp:Button runat="server" ID="btnReloadDataRQL" OnClick="btnReloadDataRQL_Click" CssClass="btn btn-default btn-sm" />
      </div>
      <div class="col-sm-6 text-center">
        <asp:Label runat="server" ID="lblBarcodeConsumoUdcMP" />
        <br />
        <asp:TextBox runat="server" ID="txtBarcode" AutoPostBack="true" CssClass="BarcodeInput" Width="80%" OnTextChanged="txtBarcode_TextChanged" />
      </div>
      <div class="col-sm-3 text-right">
        <asp:Button runat="server" ID="btnSendAs400" OnClick="btnSendAs400_Click" CssClass="btn btn-default btn-sm" />
        <br />
        <asp:Label runat="server" ID="lblLastUpdateAs400" CssClass="didascalia" AssociatedControlID="btnSendAs400" />
      </div>
    </div>
  </div>
</div>
<div class="container-fluid table-success" style="padding-top: 2px; padding-bottom: 2px;">
  <div class="container-flow">
    <div class="row">          
      <div class="col-sm-6 text-left">
        <uc2:mod_selPeriodo ID="mod_selPeriodo1" runat="server" />
      </div>
      <div class="col-sm-6 text-right small">
        <div class="row">
          <div class="col-sm-5">
            <asp:RadioButtonList ID="rbl" runat="server" RepeatDirection="Horizontal" AutoPostBack="true"
              OnSelectedIndexChanged="rbl_SelectedIndexChanged">
              <asp:ListItem Selected="True" Text="Cons. Int" Value="F01" />
              <asp:ListItem Text="Cons. Ext" Value="T01" />
            </asp:RadioButtonList>
          </div>
          <div class="col-sm-5">
            <asp:DropDownList runat="server" ID="ddlExt" DataTextField="label" DataValueField="value" AutoPostBack="True" DataSourceID="odsDestinatario" CssClass="btn btn-default btn-sm" />
            <asp:ObjectDataSource ID="odsDestinatario" runat="server" OldValuesParameterFormatString="original_{0}"
              SelectMethod="getByConditio" TypeName="GMW_data.DS_UtilityTableAdapters.v_selDestinatariListePrelievoTableAdapter">
              <SelectParameters>
                <asp:Parameter Name="conditio" DefaultValue="03-TerWip" Type="String" />
              </SelectParameters>
            </asp:ObjectDataSource>
          </div>
          <div class="col-sm-2">
            <uc1:mod_righePag ID="mod_righePag1" runat="server" />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="container-fluid" style="padding-top: 2px; padding-bottom: 2px;">
  <div class="container">
    <div class="row" style="font-size: 8pt;">
      <div class="col-sm-9">
        <div style="margin: auto; text-align: center;">
          <asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
          <asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
            OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
            DataKeyNames="nRapQual,UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
            OnSorted="grView_Sorted">
            <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 ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                  <asp:CheckBox ID="chkSelect" runat="server" />
                </ItemTemplate>
                <HeaderTemplate>
                  <asp:CheckBox ID="btnSelAll" runat="server" Checked="false" ToolTip='<%# traduci("btnSelAll") %>'
                    OnCheckedChanged="btnSelAll_Click" CssClass="ctrHeaderPager" AutoPostBack="true"></asp:CheckBox>
                </HeaderTemplate>
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="nRapQual" SortExpression="nRapQual">
                <ItemTemplate>
                  <asp:Label ID="lblnRapQual" runat="server" Text='<%# Eval("nRapQual") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="DataRapQual" SortExpression="DataRapQual">
                <ItemTemplate>
                  <asp:Label ID="lblDataRapQual" runat="server" Text='<%# Eval("DataRapQual","{0:0000/00/00}") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="ProgUDC" SortExpression="ProgUDC">
                <ItemTemplate>
                  <asp:Label ID="lblProgUDC" runat="server" Text='<%# Eval("ProgUDC") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="UDC" SortExpression="UDC">
                <ItemTemplate>
                  <asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="CodFor" SortExpression="CodFor">
                <ItemTemplate>
                  <asp:Label ID="lblCodFor" runat="server" Text='<%# Eval("CodFor") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="CodLega" SortExpression="CodLega">
                <ItemTemplate>
                  <asp:Label ID="lblCodLega" runat="server" Text='<%# Eval("CodLega") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="Qta" SortExpression="Qta">
                <ItemTemplate>
                  <asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta") %>' />
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="BenesQual" SortExpression="BenesQual">
                <ItemTemplate>
                  <asp:Label ID="lblBenesQual" runat="server" Text='<%# Eval("BenesQual") %>' />
                </ItemTemplate>
              </asp:TemplateField>
            </Columns>
          </asp:GridView>
          <asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />&nbsp;&nbsp;
        </div>
        <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
          SelectMethod="getConsumabiliByData" FilterExpression="(CONVERT(nRapQual, 'System.String') LIKE '%{0}%') OR (ProgUDC LIKE '%{0}%') OR (UDC LIKE '%{0}%') OR (CodFor LIKE '%{0}%') OR (CodLega LIKE '%{0}%') "
          TypeName="GMW_data.DS_magazzinoTableAdapters.RapQualTableAdapter">
          <SelectParameters>
            <asp:SessionParameter Name="DataFrom" SessionField="_inizio" Type="DateTime" />
            <asp:SessionParameter Name="DataTo" SessionField="_fine" Type="DateTime" />
          </SelectParameters>
          <FilterParameters>
            <asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
          </FilterParameters>
        </asp:ObjectDataSource>
      </div>
      <div class="col-sm-3">
        <asp:Button runat="server" ID="btnConsumaMP" Width="100%" OnClick="btnConsumaMP_Click" CssClass="btn btn-warning" />
      </div>
    </div>
  </div>
</div>

