<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PostProveMecc.ascx.cs" Inherits="GMW.WebUserControls.mod_PostProveMecc" %>
<div class="row">
  <div class="col-sm-4">
    <div class="card bg-success small">
      <div class="card-header">
        <b><%: traduci("ProveMeccDelib") %></b>
      </div>
      <div class="card-body bg-light text-dark">
        <div class="bg-primary text-light">
          <asp:Label runat="server" ID="lblNtDelib" />
          <asp:LinkButton runat="server" ID="lbtnResetPM" CssClass="btn btn-primary btn-sm" OnClick="lbtnResetPM_Click"><%:traduci("Reset") %></asp:LinkButton>
        </div>
        <asp:GridView ID="grViewDPM" runat="server" AllowSorting="True" AutoGenerateColumns="False"
          DataKeyNames="Trattamento" DataSourceID="odsDPM" Width="100%" OnSelectedIndexChanged="grViewDPM_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">
              <ItemTemplate>
                <asp:LinkButton ID="lbSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class="fa fa-pencil btn-lg"></i></asp:LinkButton>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Trattamento" SortExpression="Trattamento">
              <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Trattamento") %>'></asp:Label>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="AL" SortExpression="AL">
              <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("AL") %>'></asp:Label>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dur" SortExpression="Durezza">
              <ItemTemplate>
                <asp:CheckBox Enabled="false" runat="server" ID="chkDur" Checked='<%# Convert.ToBoolean(Eval("Durezza")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="PM" SortExpression="ProveMecc">
              <ItemTemplate>
                <asp:CheckBox Enabled="false" runat="server" ID="chkPM" Checked='<%# Convert.ToBoolean(Eval("ProveMecc")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
          </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsDPM" runat="server" OldValuesParameterFormatString="original_{0}"
          SelectMethod="getByPeriodo" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoTrattamentiTableAdapter">
          <SelectParameters>
            <asp:SessionParameter Name="DataStart" SessionField="_inizio" Type="DateTime" />
            <asp:SessionParameter Name="DataEnd" SessionField="_fine" Type="DateTime" />
            <asp:ControlParameter Name="Trattamento" ControlID="lblNtDelib" DefaultValue="*" Type="String" />
            <asp:Parameter DefaultValue="1" Name="HasPM" Type="Int32" />
          </SelectParameters>
        </asp:ObjectDataSource>
      </div>
    </div>
  </div>
  <div class="col-sm-4">
    <div id="divBarcode" runat="server">
      <div>
        <div>
          <asp:Label runat="server" ID="lblBarcode" AssociatedControlID="txtBarcode"><%: traduci("lblBarcode") %></asp:Label>
        </div>
        <asp:TextBox runat="server" ID="txtBarcode" Height="56px" Width="100%" Font-Size="32pt" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
      </div>
    </div>
    <div id="divEsitoPM" runat="server" class="card bg-primary text-light small">
      <div class="card-header">
        <b><%: traduci("EsitoPM") %></b>(AL)
      </div>
      <div class="card-body bg-light text-dark">
        <div class="btn-group" style="width: 100%;">
          <label id="lblChec" runat="server" class="btn btn-danger" style="width: 100%;">
            <asp:CheckBox runat="server" ID="chkPrMecc" AutoPostBack="true" OnCheckedChanged="chkPrMecc_CheckedChanged" Text="KO" Width="100%" />
          </label>
        </div>
      </div>
    </div>
    <div id="divDelibera" runat="server">
      <asp:LinkButton runat="server" ID="lbtDeliberaPM" Width="100%" CssClass="btn btn-warning btn-lg" OnClick="lbtDeliberaPM_Click"><i aria-hidden='true' class='fa fa-check fa-2x'></i> <%: traduci("lbtDeliberaPM") %></asp:LinkButton>
    </div>
  </div>
  <div class="col-sm-4">
    <div class="card bg-primary text-light small">
      <div class="card-header">
        <b><%: traduci("TrattNoProveMecc") %></b>
      </div>
      <div class="card-body bg-light text-dark">
        <div class="bg-primary text-light">
          <asp:Label runat="server" ID="lblNtNoDelib" />
          <asp:LinkButton runat="server" ID="lbtnResetNoPM" CssClass="btn btn-primary btn-sm" OnClick="lbtnResetNoPM_Click"><%:traduci("Reset") %></asp:LinkButton>
        </div>
        <asp:GridView ID="grViewTT" runat="server" AllowSorting="True" AutoGenerateColumns="False"
          DataKeyNames="Trattamento" DataSourceID="odsTratt" Width="100%" OnSelectedIndexChanged="grViewTT_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">
              <ItemTemplate>
                <asp:LinkButton ID="lbSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class="fa fa-pencil btn-lg"></i></asp:LinkButton>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Trattamento" SortExpression="Trattamento">
              <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Trattamento") %>'></asp:Label>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="AL" SortExpression="AL">
              <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("AL") %>'></asp:Label>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dur" SortExpression="Durezza">
              <ItemTemplate>
                <asp:CheckBox Enabled="false" runat="server" ID="chkDur" Checked='<%# Convert.ToBoolean(Eval("Durezza")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="PM" SortExpression="ProveMecc">
              <ItemTemplate>
                <asp:CheckBox Enabled="false" runat="server" ID="chkPM" Checked='<%# Convert.ToBoolean(Eval("ProveMecc")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
          </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsTratt" runat="server" OldValuesParameterFormatString="original_{0}"
          SelectMethod="getByPeriodo" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoTrattamentiTableAdapter">
          <SelectParameters>
            <asp:SessionParameter Name="DataStart" SessionField="_inizio" Type="DateTime" />
            <asp:SessionParameter Name="DataEnd" SessionField="_fine" Type="DateTime" />
            <asp:ControlParameter Name="Trattamento" ControlID="lblNtNoDelib" DefaultValue="*" Type="String" />
            <asp:Parameter DefaultValue="0" Name="HasPM" Type="Int32" />
          </SelectParameters>
        </asp:ObjectDataSource>
      </div>
    </div>
  </div>
</div>
