<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CapienzaOrdiniSella.aspx.cs" Inherits="OlympiaIntranet.CapienzaOrdiniSella" %>

<%@ Register Assembly="DevExpress.Web.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <dx:ASPxFormLayout ID="ASPxFormLayout1" runat="server" EnableTheming="True" Theme="Office2010Blue" Width="500px">
                <Items>
                    <dx:LayoutItem Caption="" ColSpan="1">
                        <LayoutItemNestedControlCollection>
                            <dx:LayoutItemNestedControlContainer runat="server">
                                <dx:ASPxRadioButtonList ID="rblFiltraNegativi" runat="server" RepeatDirection="Horizontal" OnValueChanged="rblFiltraNegativi_ValueChanged">
                                    <Items>
                                        <dx:ListEditItem Text="Mostra tutti" Value="0" />
                                        <dx:ListEditItem Text="Mostra solo saldo residuo negativo" Value="1" />
                                    </Items>
                                </dx:ASPxRadioButtonList>
                            </dx:LayoutItemNestedControlContainer>
                        </LayoutItemNestedControlCollection>
                    </dx:LayoutItem>
                    <dx:LayoutGroup Caption="Filtri Selezione" ColCount="6" ColSpan="1" ColumnCount="6">
                        <Items>
                            <dx:LayoutItem Caption="Gestore" ColSpan="1">
                                <LayoutItemNestedControlCollection>
                                    <dx:LayoutItemNestedControlContainer runat="server">
                                        <dx:ASPxGridLookup ID="gridLookupGestore" runat="server" Theme="Aqua" DataSourceID="SqlDSGestori" DropDownStyle="DropDownList" EnableTheming="True" KeyFieldName="Gestore" TextFormatString="{0}" OnValueChanged="gridLookupGestore_ValueChanged">
                                            <%--<ClientSideEvents EndCallback="OnFirstEndCallback" />--%>
                                            <GridViewProperties>
                                                <SettingsBehavior AllowFocusedRow="True" AllowSelectSingleRowOnly="True" EnableRowHotTrack="True" />
                                                <SettingsPager Mode="ShowAllRecords">
                                                </SettingsPager>

                                                <SettingsPopup>
                                                    <FilterControl AutoUpdatePosition="False"></FilterControl>
                                                </SettingsPopup>
                                            </GridViewProperties>
                                        </dx:ASPxGridLookup>
                                    </dx:LayoutItemNestedControlContainer>
                                </LayoutItemNestedControlCollection>
                            </dx:LayoutItem>
                            <dx:LayoutItem Caption="" ColSpan="1">
                                <LayoutItemNestedControlCollection>
                                    <dx:LayoutItemNestedControlContainer runat="server">
                                        <dx:ASPxButton ID="buttonCaricaDati" runat="server" OnClick="buttonCaricaDati_Click" Theme="Aqua" ToolTip="Carica dati dal db">
                                            <Image IconID="actions_refresh_16x16">
                                            </Image>
                                        </dx:ASPxButton>
                                    </dx:LayoutItemNestedControlContainer>
                                </LayoutItemNestedControlCollection>
                            </dx:LayoutItem>
                            <dx:LayoutItem Caption="" ColSpan="1">
                                <LayoutItemNestedControlCollection>
                                    <dx:LayoutItemNestedControlContainer runat="server">
                                        <dx:ASPxButton ID="buttonEsportaExcel" runat="server" OnClick="buttonEsportaExcel_Click" Theme="Aqua" ToolTip="Esporta dati in excel" AutoPostBack="False">
                                            <Image IconID="export_exporttoxlsx_16x16">
                                            </Image>
                                        </dx:ASPxButton>
                                    </dx:LayoutItemNestedControlContainer>
                                </LayoutItemNestedControlCollection>
                            </dx:LayoutItem>
                        </Items>
                    </dx:LayoutGroup>
                </Items>
            </dx:ASPxFormLayout>
            <dx:ASPxGridView ID="gvCapienzaOrdiniSella" runat="server" DataSourceID="SqlDSCapienzaOrdiniSella" Theme="Office2010Blue" Width="500px" AutoGenerateColumns="True" KeyFieldName="Portafoglio">
                <SettingsAdaptivity>
                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                </SettingsAdaptivity>
                <SettingsPager PageSize="15" Mode="ShowAllRecords">
                </SettingsPager>
                <Settings ShowFilterRow="True" ShowHeaderFilterButton="True" ShowTitlePanel="True" ShowFooter="true" />
                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
            </dx:ASPxGridView>
        </div>
        <asp:SqlDataSource ID="SqlDSGestori" runat="server" ConnectionString="Data Source=26.69.45.60;Initial Catalog=FirstSolutionDB;Persist Security Info=True;User ID=sa;Password=Skyline72" SelectCommand="GDN_GetGestore" SelectCommandType="StoredProcedure">
            <SelectParameters>

                <asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDSCapienzaOrdiniSella" runat="server" ConnectionString="Data Source=26.69.45.60;Initial Catalog=FirstSolutionDB;Persist Security Info=True;User ID=sa;Password=Skyline72" SelectCommand="GDN_CapienzaOrdiniSella" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:SessionParameter Name="cod_ges" SessionField="cod_ges" />
                <asp:SessionParameter Name="filtra_negativi" SessionField="filtra_negativi" />
                <asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvCapienzaOrdiniSella"></dx:ASPxGridViewExporter>
    </form>
</body>
</html>
