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

<%@ 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>
    <style type="text/css">
        .height,
        height * {
            height: 28px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table>
                <tr>
                    <td>
                        <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Portafoglio" Theme="DevEx">
                        </dx:ASPxLabel>
                    </td>
                    <td>
                        <dx:ASPxPanel ID="ASPxPanel29" runat="server" Width="10px"></dx:ASPxPanel>
                    </td>
                    <td>
                        <dx:ASPxTextBox ID="txtPortafoglio" runat="server" Theme="DevEx" Width="170px" CssClass="height">
                        </dx:ASPxTextBox>
                    </td>
                    <td>
                        <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="10px"></dx:ASPxPanel>
                    </td>
                    <td>
                        <dx:ASPxButton ID="btnCaricaDati" runat="server" Theme="DevEx" OnClick="btnCaricaDati_Click" CssClass="height" >
                            <%--<ClientSideEvents Click="function(s, e) {
if (clientEsposizioneTitoli.GetVisibleRowsOnPage() == 0) { alert('Consultare la posizione in Guardian e ripetere la richiesta!'); }
}" />--%>
                            <Image IconID="arrows_next_16x16">
                            </Image>
                        </dx:ASPxButton>
                    </td>
                    <td>
                        <dx:ASPxPanel ID="ASPxPanel2" runat="server" Width="10px"></dx:ASPxPanel>
                    </td>
                    <td>
                    <dx:ASPxButton ID="btnEsportaExcel" runat="server" Theme="DevEx" CssClass="height" OnClick="btnEsportaExcel_Click">
                        <Image IconID="export_exporttoxlsx_16x16">
                        </Image>
                    </dx:ASPxButton>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <dx:ASPxGridView ID="gvLimitiUcits" runat="server" Theme="DevEx" AutoGenerateColumns="False" DataSourceID="SqlDSEsposizioneTitoli" OnHtmlRowPrepared="gvLimitiUcits_HtmlRowPrepared" ClientInstanceName="clientEsposizioneTitoli" OnCustomErrorText="gvLimitiUcits_CustomErrorText" OnHtmlDataCellPrepared="gvLimitiUcits_HtmlDataCellPrepared">
                <SettingsAdaptivity>
                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                </SettingsAdaptivity>
                <SettingsPager AlwaysShowPager="True" PageSize="30">
                    <PageSizeItemSettings Visible="True">
                    </PageSizeItemSettings>
                </SettingsPager>
                <Settings ShowFilterRow="True" ShowFooter="True" />
                <TotalSummary>
                    <dx:ASPxSummaryItem FieldName="5%-40% (OLY)" SummaryType="Sum" />
                    <dx:ASPxSummaryItem FieldName="10% (OLY)" SummaryType="Sum" />
                    <dx:ASPxSummaryItem FieldName="5%-40% (C4F)" SummaryType="Sum" />
                    <dx:ASPxSummaryItem FieldName="10% (C4F)" SummaryType="Sum" />
                </TotalSummary>
                <SettingsDataSecurity AllowDelete="False" AllowEdit="False" AllowInsert="False" />
                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                <Columns>
                    <dx:GridViewDataTextColumn FieldName="ISIN" ReadOnly="True" VisibleIndex="0">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Descrizione" ReadOnly="True" VisibleIndex="1">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Emittente" ReadOnly="True" VisibleIndex="2">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Country" ReadOnly="True" VisibleIndex="3">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Sector" ReadOnly="True" VisibleIndex="4">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewBandColumn Caption="Olympia" Name="Olympia" VisibleIndex="5" Visible="False">
                        <HeaderStyle HorizontalAlign="Center" />
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="CTV" FieldName="CTV_OLY" ReadOnly="True" VisibleIndex="0">
                                <PropertiesTextEdit DisplayFormatString="F2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Esposizione" FieldName="Esp_OLY" ReadOnly="True" VisibleIndex="1">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="5%-40%" FieldName="5%-40% (OLY)" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="2">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="10%" FieldName="10% (OLY)" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="3">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                    </dx:GridViewBandColumn>
                    <dx:GridViewBandColumn Caption="Casa for Funds" Name="Casa for Funds" VisibleIndex="7">
                        <HeaderStyle HorizontalAlign="Center" />
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="CTV" FieldName="CTV_C4F" ReadOnly="True" VisibleIndex="0">
                                <PropertiesTextEdit DisplayFormatString="F2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Esposizione" FieldName="Esp_C4F" ReadOnly="True" VisibleIndex="1">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="5%-40%" FieldName="5%-40% (C4F)" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="2">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="10%" FieldName="10% (C4F)" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="3">
                                <PropertiesTextEdit DisplayFormatString="P2">
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                    </dx:GridViewBandColumn>
                </Columns>
            </dx:ASPxGridView>
        </div>
        <asp:SqlDataSource ID="SqlDSEsposizioneTitoli" runat="server" ConnectionString="Data Source=26.69.45.60;Initial Catalog=FirstSolutionDB;Persist Security Info=True;User ID=sa;Password=Skyline72" SelectCommand="GDN_LimitiUCITS" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:SessionParameter Name="cod_rap" SessionField="cod_rap" />
                <asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvLimitiUcits">
        </dx:ASPxGridViewExporter>
    </form>
</body>
</html>
