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

<%@ Register assembly="DevExpress.Web.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
<%--<%@ Register Src="~/MemberPages/menu.ascx" TagPrefix="mc" TagName="menuControl" %>--%>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>

    <form id="form1" runat="server">
<%--            <mc:menuControl ID="menu" runat="server" GridID="CERTIFICATESPAGE" Visible="True" />--%>
        <dx:ASPxButton ID="ASPxExportXls" runat="server" OnClick="ASPxExportXls_Click" Theme="Office2010Blue" ToolTip="Click to export data to excel..." Height="22px" Width="36px" Text="Esporta in Excel">
            <Image IconID="export_exporttoxlsx_16x16">
            </Image>
            <Paddings Padding="0px" />
        </dx:ASPxButton>
        <dx:ASPxGridView ID="ASPxTitoliGDN" runat="server" EnableTheming="True" Theme="Office2010Blue" AutoGenerateColumns="False" KeyFieldName="CodiceTitolo">
            <SettingsPager AlwaysShowPager="True" PageSize="20">
                <PageSizeItemSettings ShowAllItem="True" Visible="True">
                </PageSizeItemSettings>
            </SettingsPager>
            <Settings ShowFilterRow="True" ShowHeaderFilterButton="True" ShowFilterBar="Visible" />
            <SettingsFilterControl ViewMode="VisualAndText">
            </SettingsFilterControl>
            <Columns>
                <dx:GridViewDataTextColumn FieldName="CodiceTitolo" ReadOnly="True" VisibleIndex="0">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="ISIN" VisibleIndex="1">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="DescrizioneTitolo" VisibleIndex="2">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="DescrizioneTitoloBreve" VisibleIndex="3">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Divisa" VisibleIndex="4">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="SecurityType" VisibleIndex="5">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="TickerBBG" VisibleIndex="6">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="ETF" VisibleIndex="8">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Mercato" VisibleIndex="9">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Divisore" VisibleIndex="10">
                    <PropertiesTextEdit DisplayFormatString="n0">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="TipoTitolo" VisibleIndex="11">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="DescrTipoTitolo" Caption="Descrizione Tipo Titolo" VisibleIndex="12">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="LinkPrezzi" VisibleIndex="14">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="LinkError" VisibleIndex="14">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="NewEntry" VisibleIndex="15">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="InPortafoglio" VisibleIndex="16">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Utilizzato" VisibleIndex="17">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Conflitto" VisibleIndex="18">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="UltimoPrezzo" VisibleIndex="19">
                    <PropertiesTextEdit DisplayFormatString="n6">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn FieldName="DataUltimoPrezzo" VisibleIndex="20">
                    <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy">
                    </PropertiesDateEdit>
                </dx:GridViewDataDateColumn>
                <dx:GridViewDataComboBoxColumn FieldName="Tipo" VisibleIndex="7">
                    <PropertiesComboBox>
                        <Items>
                            <dx:ListEditItem Text="Certificato" Value="Certificato" />
                            <dx:ListEditItem Text="Fondo Azionario" Value="Fondo Azionario" />
                            <dx:ListEditItem Text="Fondo Bilanciato" Value="Fondo Bilanciato" />
                            <dx:ListEditItem Text="Fondo Monetario" Value="Fondo Monetario" />
                            <dx:ListEditItem Text="Fondo Obbligazionario" Value="Fondo Obbligazionario" />
                        </Items>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn FieldName="Bloccato" VisibleIndex="12">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="nobuy" VisibleIndex="13">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Note" VisibleIndex="21">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Coordinate" VisibleIndex="22">
                </dx:GridViewDataTextColumn>
            </Columns>
        </dx:ASPxGridView>
    <div>
    
        <asp:SqlDataSource ID="SqlDSTitoliGDN" runat="server" ConnectionString="server=192.168.125.10;user id=pegasus9x;password=Locarno_4139$;persistsecurityinfo=True;database=olympia" SelectCommand="select cod_tit as CodiceTitolo , cod_isin as ISIN , des_tit as DescrizioneTitolo, des_tit_bre as DescrizioneTitoloBreve, cod_div as Divisa, security_type as SecurityType, cod_bloomberg as TickerBBG,
       CASE WHEN fondo_azi='S' THEN 'Fondo Azionario'
            WHEN fondo_bil='S' THEN 'Fondo Bilanciato'
            WHEN fondo_obb='S' THEN 'Fondo Obbligazionario'
            WHEN fondo_mon='S' THEN 'Fondo Monetario'
            WHEN certificate='S' THEN 'Certificato'
       END as Tipo,
       ETF, cod_mer as Mercato, divisore as Divisore, t.cod_tiptit as TipoTitolo, tt.des_tiptit AS DescrTipoTitolo, bloccato as Bloccato, noacquisti as nobuy, link_prezzi as LinkPrezzi, link_error as LinkError, new_entry as NewEntry, in_portafoglio as InPortafoglio,
       utilizzato as Utilizzato, conflitto as Conflitto, prezzo_ult as UltimoPrezzo, data_ult as DataUltimoPrezzo, note as Note, coordinate from tit t left join tabtiptit tt ON tt.cod_tiptit=t.cod_tiptit where estinto is null" ProviderName="MySqlConnector"></asp:SqlDataSource>
    
        <dx:ASPxGridViewExporter ID="ASPxGridViewExporter" runat="server" GridViewID="ASPxTitoliGDN">
        </dx:ASPxGridViewExporter>

    </div>
    </form>
</body>
</html>
