<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_delibera.ascx.cs"
    Inherits="GMW.WebUserControls.mod_delibera" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_detailUDC.ascx" TagName="mod_detailUDC" TagPrefix="uc3" %>

<div class="divSx filtro_1" style="width: 100%;">
    <div class="divSx">
        <uc1:mod_filtro ID="mod_filtroDelibera" runat="server" changeCheckVisible="false"
            changeCheckEnabled="false" />
        <asp:ObjectDataSource ID="odsFiltroDelibera" runat="server" OldValuesParameterFormatString="Original_{0}"
            SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selTipoDeliberaTableAdapter"></asp:ObjectDataSource>
    </div>
    <div class="divSx">
        <uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" />
    </div>
</div>
<div style="font-size: 8pt;">
    <table>
        <tr>
            <td valign="top">
                <asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                    OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
                    DataKeyNames="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" />
                    <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 ShowHeader="False">
                            <HeaderTemplate>
                                <asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
                                    Visible="true" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
                                    ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
                            </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="RagSociale" SortExpression="RagSociale">
                            <ItemTemplate>
                                <asp:Label ID="lblRagSociale" runat="server" Text='<%# Eval("RagSociale") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
                            <ItemTemplate>
                                <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DisegnoGrezzo" SortExpression="DisegnoGrezzo">
                            <ItemTemplate>
                                <asp:Label ID="lblDisegnoGrezzo" runat="server" Text='<%# Eval("DisegnoGrezzo") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Esponente" SortExpression="Esponente">
                            <ItemTemplate>
                                <asp:Label ID="lblEsponente" runat="server" Text='<%# Eval("Esponente") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="CodStato" SortExpression="CodStato">
                            <ItemTemplate>
                                <asp:Label ID="lblCodStato" runat="server" Text='<%# Eval("CodStato") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DataFus" SortExpression="DataFus">
                            <ItemTemplate>
                                <asp:Label ID="lblDataFus" runat="server" Text='<%# Eval("DataFus","{0:dd/MM/yyyy}") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="TurnoShort" SortExpression="TurnoFus">
                            <ItemTemplate>
                                <asp:Label ID="lblTurnoFus" runat="server" Text='<%# Eval("TurnoFus") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetByTipoDelibera" FilterExpression="UDC LIKE '%{0}%' OR RagSociale LIKE '%{0}%' OR Particolare LIKE '%{0}%' "
                    TypeName="GMW_data.DS_MagazzinoTableAdapters.ElencoCartelliniTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="mod_filtroDelibera" Name="CodTipoDelibera" PropertyName="valore"
                            Type="String" />
                        <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>
                <asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />&nbsp;&nbsp;
                <asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
            </td>
            <td valign="top">
                <uc3:mod_detailUDC ID="mod_detailUDC1" runat="server" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button runat="server" ID="btnDelibera" Width="200px" OnClick="btnDelibera_Click" />
                <asp:ConfirmButtonExtender ID="cbeBtnDelibera" runat="server" TargetControlID="btnDelibera">
                </asp:ConfirmButtonExtender>
            </td>
        </tr>
    </table>
</div>
