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

<%@ 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">
        <div>
<%--            <mc:menuControl ID="menu" runat="server" GridID="CERTIFICATESPAGE" Visible="True" />--%>
            <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="3" EnableTheming="True" Theme="MetropolisBlue" OnActiveTabChanged="ASPxPageControl1_ActiveTabChanged">
                <TabPages>
                    <dx:TabPage Text="Anagrafica Clienti">
                        <ContentCollection>
                            <dx:ContentControl runat="server">
                                <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" HeaderText="" ShowCollapseButton="True" Theme="MetropolisBlue" View="GroupBox" Width="200px">
                                    <PanelCollection>
                                        <dx:PanelContent runat="server">
                                            <dx:ASPxGridView ID="ASPxGVClienti" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDSClienti" EnableTheming="True" KeyFieldName="IDClienti" Theme="MetropolisBlue">
                                                <SettingsAdaptivity>
                                                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                                                </SettingsAdaptivity>

                                                <SettingsPager Mode="ShowAllRecords" Visible="False">
                                                </SettingsPager>
                                                <Settings ShowFilterRow="True" />
                                                <SettingsBehavior ConfirmDelete="True" />

                                                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowClearFilterButton="True" ShowEditButton="True" ShowInCustomizationForm="True" ShowNewButtonInHeader="True" VisibleIndex="0" ShowDeleteButton="True">
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn FieldName="IDClienti" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="1">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Nome" ShowInCustomizationForm="True" VisibleIndex="2">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="NumRapporto" ShowInCustomizationForm="True" VisibleIndex="3">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataComboBoxColumn FieldName="DivisaRapporto" ShowInCustomizationForm="True" VisibleIndex="5">
                                                        <PropertiesComboBox>
                                                            <Items>
                                                                <dx:ListEditItem Text="CHF" Value="CHF" />
                                                                <dx:ListEditItem Text="EUR" Value="EUR" />
                                                                <dx:ListEditItem Text="GBP" Value="GBP" />
                                                                <dx:ListEditItem Text="USD" Value="USD" />
                                                            </Items>
                                                        </PropertiesComboBox>
                                                    </dx:GridViewDataComboBoxColumn>
                                                    <dx:GridViewDataComboBoxColumn FieldName="Gruppo" ShowInCustomizationForm="True" VisibleIndex="6">
                                                        <PropertiesComboBox>
                                                            <Items>
                                                                <dx:ListEditItem Text="ANNA_BIL" Value="ANNA_BIL" />
                                                                <dx:ListEditItem Text="ANNA_UBS" Value="ANNA_UBS" />
                                                                <dx:ListEditItem Text="ANNA_UBS_CH" Value="ANNA_UBS_CH" />
<%--                                                            <dx:ListEditItem Text="CALD" Value="CALD" />
                                                                <dx:ListEditItem Text="FEDE" Value="FEDE" />
                                                                <dx:ListEditItem Text="ROMA" Value="ROMA" />--%>                                                                                                                             
                                                            </Items>
                                                        </PropertiesComboBox>
                                                    </dx:GridViewDataComboBoxColumn>
                                                    <dx:GridViewDataComboBoxColumn FieldName="Banca" ShowInCustomizationForm="True" VisibleIndex="4">
                                                        <PropertiesComboBox>
                                                            <Items>
                                                                <dx:ListEditItem Text="BANCA SELLA" Value="BS" />
                                                                <dx:ListEditItem Text="BILLUX" Value="BILLUX" />
                                                                <dx:ListEditItem Text="UBSI" Value="UBSI" />
                                                                <dx:ListEditItem Text="UBSLUG" Value="UBSLUG" />
                                                            </Items>
                                                        </PropertiesComboBox>
                                                    </dx:GridViewDataComboBoxColumn>
                                                </Columns>
                                            </dx:ASPxGridView>
                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxRoundPanel>
                            </dx:ContentControl>
                        </ContentCollection>
                    </dx:TabPage>
                    <dx:TabPage Text="Anagrafica Mercati" Visible="False">
                        <ContentCollection>
                            <dx:ContentControl runat="server">
                                <dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server" HeaderText="" ShowCollapseButton="True" Theme="MetropolisBlue" View="GroupBox" Width="200px">
                                    <PanelCollection>
                                        <dx:PanelContent runat="server">
                                            <dx:ASPxGridView ID="ASPxGVMercati" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDSMercati" EnableTheming="True" KeyFieldName="IDMercati" Theme="MetropolisBlue">
                                                <ClientSideEvents EndCallback="function(s, e) {
	comboboxMercati.PerformCallback();
}" />

                                                <SettingsAdaptivity>
                                                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                                                </SettingsAdaptivity>

                                                <SettingsPager Mode="ShowAllRecords" Visible="False">
                                                </SettingsPager>
                                                <Settings ShowFilterRow="True" />
                                                <SettingsDataSecurity AllowDelete="False" />

                                                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowEditButton="True" ShowInCustomizationForm="True" ShowNewButtonInHeader="True" VisibleIndex="0">
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn FieldName="IDMercati" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="1">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Codice" ShowInCustomizationForm="True" VisibleIndex="2">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Descrizione" ShowInCustomizationForm="True" VisibleIndex="3">
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                            </dx:ASPxGridView>
                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxRoundPanel>
                            </dx:ContentControl>
                        </ContentCollection>
                    </dx:TabPage>
                    <dx:TabPage Text="Inserimento Ordini">
                        <ContentCollection>
                            <dx:ContentControl runat="server">
                                <dx:ASPxFormLayout ID="ASPxFLTitoli" runat="server" EnableTheming="True" Theme="MetropolisBlue">
                                    <Items>
                                        <dx:LayoutGroup Caption="">
                                            <Items>
                                                <dx:LayoutGroup Caption=" " ColCount="2">
                                                    <Items>
                                                        <dx:LayoutItem Caption="Codice Titolo">
                                                            <LayoutItemNestedControlCollection>
                                                                <dx:LayoutItemNestedControlContainer runat="server">
                                                                    <dx:ASPxTextBox ID="ASPxCodiceTitolo" runat="server" Theme="MetropolisBlue">
                                                                    </dx:ASPxTextBox>
                                                                </dx:LayoutItemNestedControlContainer>
                                                            </LayoutItemNestedControlCollection>
                                                        </dx:LayoutItem>
                                                        <dx:LayoutItem Caption="">
                                                            <LayoutItemNestedControlCollection>
                                                                <dx:LayoutItemNestedControlContainer runat="server">
                                                                    <dx:ASPxRadioButtonList ID="ASPxRBLTipoTitolo" runat="server" OnSelectedIndexChanged="ASPxRBLTipoTitolo_SelectedIndexChanged" RepeatDirection="Horizontal" ClientInstanceName="rblTipoTitolo">
                                                                        <Items>
                                                                            <dx:ListEditItem Text="ISIN" Value="0" />
                                                                            <dx:ListEditItem Text="Ticker BBG" Value="1" />
                                                                        </Items>
                                                                    </dx:ASPxRadioButtonList>
                                                                </dx:LayoutItemNestedControlContainer>
                                                            </LayoutItemNestedControlCollection>
                                                        </dx:LayoutItem>
                                                    </Items>
                                                </dx:LayoutGroup>
                                                <dx:LayoutItem Caption="Strumento">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxComboBox ID="ASPxStrumento" runat="server" Theme="MetropolisBlue" ClientInstanceName="comboboxStrumento">
                                                                <Items>
                                                                    <dx:ListEditItem Text="Azioni" Value="Azioni" />
                                                                    <dx:ListEditItem Text="Certificates" Value="Certificates" />
                                                                    <dx:ListEditItem Text="ETF" Value="ETF" />
                                                                    <dx:ListEditItem Text="Fondi" Value="Fondi" />
                                                                    <dx:ListEditItem Text="Obbligazioni" Value="Obbligazioni" />
                                                                </Items>
                                                            </dx:ASPxComboBox>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="Mercato" Visible="False">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxComboBox ID="ASPxMercato" runat="server" ClientInstanceName="comboboxMercati" DataSourceID="SqlDSMercati" TextField="Descrizione" Theme="MetropolisBlue" ValueField="IDMercati" OnCallback="ASPxMercato_Callback" ValueType="System.Int32">
                                                            </dx:ASPxComboBox>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="PCS (Solo Obbligazioni)" Visible="False">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxComboBox ID="ASPxPCSObbligazioni" runat="server" Theme="MetropolisBlue">
                                                                <Items>
                                                                    <dx:ListEditItem Text="GERM" Value="GERM" />
                                                                    <dx:ListEditItem Text="MILA" Value="MILA" />
                                                                </Items>
                                                            </dx:ASPxComboBox>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="PCS (Solo Obbligazioni)">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxTextBox ID="ASPxPCS" runat="server">
                                                            </dx:ASPxTextBox>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutGroup Caption="Rileva dati da BBG">
                                                    <Items>
                                                        <dx:LayoutGroup Caption="">
                                                            <Items>
                                                                <dx:LayoutItem Caption="ISIN">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelISIN" runat="server">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                                <dx:LayoutItem Caption="Descrizione">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelDescrizioneBBG" runat="server">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                                <dx:LayoutItem Caption="Prezzo" Name="ASPxLayoutItemPrezzo">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelPrezzoBBG" runat="server">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                                <dx:LayoutItem Caption="Data Prezzo">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelDataPrezzoBBG" runat="server">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                                <dx:LayoutItem Caption="Divisa Titolo">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelDivisaTitoloBBG" runat="server">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                                <dx:LayoutItem Caption="Query Status ">
                                                                    <LayoutItemNestedControlCollection>
                                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                                            <dx:ASPxLabel ID="ASPxLabelQueryStatus" runat="server" Font-Bold="True">
                                                                            </dx:ASPxLabel>
                                                                        </dx:LayoutItemNestedControlContainer>
                                                                    </LayoutItemNestedControlCollection>
                                                                </dx:LayoutItem>
                                                            </Items>
                                                        </dx:LayoutGroup>
                                                        <dx:LayoutItem Caption="">
                                                            <LayoutItemNestedControlCollection>
                                                                <dx:LayoutItemNestedControlContainer runat="server">
                                                                    <dx:ASPxButton ID="ASPxButtonQueryBBG" runat="server" OnClick="ASPxButtonQueryBBG_Click" Text="Query BBG" Theme="MetropolisBlue">
                                                                        <Image IconID="miscellaneous_viewonweb_16x16">
                                                                        </Image>
                                                                    </dx:ASPxButton>
                                                                </dx:LayoutItemNestedControlContainer>
                                                            </LayoutItemNestedControlCollection>
                                                        </dx:LayoutItem>
                                                    </Items>
                                                </dx:LayoutGroup>
                                            </Items>
                                        </dx:LayoutGroup>
                                    </Items>
                                </dx:ASPxFormLayout>
                                <dx:ASPxRoundPanel ID="ASPxRoundPanel3" runat="server" ShowCollapseButton="true" Width="200px" HeaderText="Inserimento Ordini" Theme="MetropolisBlue" View="GroupBox">
                                    <PanelCollection>
                                        <dx:PanelContent runat="server">
                                            <table>
                                                <tr>
                                                    <td>
                                                        <dx:ASPxCheckBoxList ID="ASPxCBLGruppi" runat="server" RepeatColumns="7" Theme="MetropolisBlue" SelectedIndex="0">
                                                            <Items>
                                                                <dx:ListEditItem Text="ANNA_BIL" Value="ANNA_BIL" />
                                                                <dx:ListEditItem Text="ANNA_UBS" Value="ANNA_UBS" />
                                                                <dx:ListEditItem Text="ANNA_UBS_CH" Value="ANNA_UBS_CH" />
<%--                                                                <dx:ListEditItem Text="CALD" Value="CALD" />
                                                                <dx:ListEditItem Text="FEDE" Value="FEDE" />
                                                                <dx:ListEditItem Text="ROMA" Value="ROMA" />--%>
                                                                <dx:ListEditItem Text="STE ITA" Value="STE ITA" />
                                                                <dx:ListEditItem Text="STE EST" Value="STE EST" />
                                                            </Items>
                                                        </dx:ASPxCheckBoxList>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxButtonCaricaOrdini" runat="server" Theme="MetropolisBlue" OnClick="ASPxButtonCaricaClienti_Click">
                                                            <Image IconID="actions_refresh_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxButtonCancellaOrdini" runat="server" Theme="MetropolisBlue" OnClick="ASPxButtonCancellaOrdini_Click">
                                                            <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('Cancellare ordini per titolo selezionato?');
}" />
                                                            <Image IconID="actions_clear_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Modifica Prezzo" Theme="MetropolisBlue"></dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="ASPxTextBoxModificaPrezzo" runat="server" Width="170px"></dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxButtonSavePrezzo" runat="server" OnClick="ASPxButtonSavePrezzo_Click">
                                                            <Image IconID="save_save_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Modifica Data Validità" Theme="MetropolisBlue"></dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxDateEdit ID="ASPxDateDataValidita" runat="server" Theme="MetropolisBlue"></dx:ASPxDateEdit>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxButtonSaveDataValidita" runat="server" OnClick="ASPxButtonSaveDataValidita_Click">
                                                            <Image IconID="save_save_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxCancellaDataValidita" runat="server" Theme="MetropolisBlue" OnClick="ASPxCancellaDataValidita_Click">
                                                            <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('Azzerare data validita per titolo selezionato?');
}" />
                                                            <Image IconID="actions_clear_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Modifica Tipo Operazione" Theme="MetropolisBlue"></dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxRadioButtonList ID="ASPxRBLTipoOp" runat="server" ValueType="System.String" EnableTheming="True" RepeatDirection="Horizontal" SelectedIndex="1" Theme="MetropolisBlue">
                                                            <Items>
                                                                <dx:ListEditItem Text="BUY" Value="B" />
                                                                <dx:ListEditItem Selected="True" Text="SELL" Value="S" />
                                                            </Items>
                                                        </dx:ASPxRadioButtonList>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxButtonSaveTipoOp" runat="server" OnClick="ASPxButtonSaveTipoOp_Click">
                                                            <Image IconID="save_save_16x16">
                                                            </Image>
                                                        </dx:ASPxButton>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="ASPxImportaQty" runat="server" Text="Importa Quantità" OnClick="ASPxImportaQty_Click" Theme="MetropolisBlue"></dx:ASPxButton>
                                                    </td>
                                                </tr>
                                            </table>
                                            <dx:ASPxGridView ID="ASPxGVOrdini" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDSOrdini" EnableTheming="True" KeyFieldName="IDOrdini" Theme="MetropolisBlue" OnBeforePerformDataSelect="ASPxGVOrdini_BeforePerformDataSelect" OnRowUpdated="ASPxGVOrdini_RowUpdated" OnHtmlDataCellPrepared="ASPxGVOrdini_HtmlDataCellPrepared">
                                                <SettingsAdaptivity>
                                                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                                                </SettingsAdaptivity>

                                                <SettingsPager Mode="ShowAllRecords" Visible="False">
                                                </SettingsPager>
                                                <Settings ShowFilterRow="True" />
                                                <SettingsDataSecurity AllowDelete="False" AllowInsert="False" />

                                                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowEditButton="True" ShowInCustomizationForm="True" VisibleIndex="0">
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn FieldName="IDOrdini" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="1">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Titolo" ShowInCustomizationForm="True" VisibleIndex="2">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Cliente" ShowInCustomizationForm="True" VisibleIndex="5">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Gruppo" ShowInCustomizationForm="True" VisibleIndex="6">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Quantita" ShowInCustomizationForm="True" VisibleIndex="7">
                                                        <PropertiesTextEdit DisplayFormatString="F2">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Prezzo" ShowInCustomizationForm="True" VisibleIndex="8">
                                                        <PropertiesTextEdit DisplayFormatString="n2">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="DivisaTitolo" ShowInCustomizationForm="True" VisibleIndex="11">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ControvaloreDT" ShowInCustomizationForm="True" VisibleIndex="12">
                                                        <PropertiesTextEdit DisplayFormatString="n2">
                                                        </PropertiesTextEdit>
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="DivisaRapporto" ShowInCustomizationForm="True" VisibleIndex="13">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ControvaloreDR" ShowInCustomizationForm="True" VisibleIndex="14">
                                                        <PropertiesTextEdit DisplayFormatString="n2">
                                                        </PropertiesTextEdit>
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Cambio" ShowInCustomizationForm="True" VisibleIndex="15">
                                                        <PropertiesTextEdit DisplayFormatString="n4">
                                                        </PropertiesTextEdit>
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataDateColumn FieldName="DataValidita" ShowInCustomizationForm="True" VisibleIndex="9">
                                                        <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                        </PropertiesDateEdit>
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataComboBoxColumn FieldName="TipoOperazione" ShowInCustomizationForm="True" VisibleIndex="10">
                                                        <PropertiesComboBox>
                                                            <Items>
                                                                <dx:ListEditItem Text="B" Value="B" />
                                                                <dx:ListEditItem Text="S" Value="S" />
                                                            </Items>
                                                        </PropertiesComboBox>
                                                    </dx:GridViewDataComboBoxColumn>
                                                    <dx:GridViewDataTextColumn FieldName="Descrizione" ShowInCustomizationForm="True" VisibleIndex="3">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataDateColumn FieldName="DataUltimaModifica" ShowInCustomizationForm="True" VisibleIndex="16">
                                                        <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                        </PropertiesDateEdit>
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataTextColumn FieldName="QtaInPtf" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="17">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Cash In Ptf" FieldName="CashPtf" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="19">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="DivisaRegolamento" ShowInCustomizationForm="True" VisibleIndex="18">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="N. Conto" FieldName="NumRapporto" ShowInCustomizationForm="True" VisibleIndex="4">
                                                        <EditFormSettings Visible="False" />
                                                        <CellStyle BackColor="#F2F2F2">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                            </dx:ASPxGridView>
                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxRoundPanel>
                            </dx:ContentControl>
                        </ContentCollection>
                    </dx:TabPage>
                    <dx:TabPage Text="Crea Excel">
                        <ContentCollection>
                            <dx:ContentControl runat="server">
                                <dx:ASPxFormLayout runat="server" EnableTheming="True" Theme="MetropolisBlue">
                                    <Items>
                                        <dx:LayoutGroup Caption="" ColCount="2">
                                            <Items>
                                                <dx:LayoutItem Caption="Gruppi">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxCheckBoxList ID="ASPxCBLGruppiExcel" runat="server" RepeatColumns="7">
                                                            </dx:ASPxCheckBoxList>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:EmptyLayoutItem>
                                                </dx:EmptyLayoutItem>
                                                <dx:LayoutItem Caption="Mostra ordini a partire da">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxDateEdit ID="ASPxDataUltimaModifica" runat="server" DisplayFormatString="dd/MM/yyyy" Theme="MetropolisBlue" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                            </dx:ASPxDateEdit>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxButton ID="ASPxButtonCaricaOrdiniExcel" runat="server" OnClick="ASPxButtonCaricaOrdiniExcel_Click">
                                                                <Image IconID="actions_refresh_16x16">
                                                                </Image>
                                                            </dx:ASPxButton>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="Data Invio Excel">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxDateEdit ID="ASPxDataInvio" runat="server" DisplayFormatString="dd/MM/yyyy" Theme="MetropolisBlue" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                            </dx:ASPxDateEdit>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                                <dx:LayoutItem Caption="">
                                                    <LayoutItemNestedControlCollection>
                                                        <dx:LayoutItemNestedControlContainer runat="server">
                                                            <dx:ASPxButton ID="ASPxButtonExportOrdiniExcel" runat="server" OnClick="ASPxButtonExportOrdiniExcel_Click">
                                                                <Image IconID="export_exporttoxls_16x16">
                                                                </Image>
                                                            </dx:ASPxButton>
                                                        </dx:LayoutItemNestedControlContainer>
                                                    </LayoutItemNestedControlCollection>
                                                </dx:LayoutItem>
                                            </Items>
                                        </dx:LayoutGroup>
                                    </Items>
                                </dx:ASPxFormLayout>
                                <dx:ASPxRoundPanel ID="ASPxRoundPanel4" runat="server" ShowCollapseButton="true" Width="200px" HeaderText="Ordini per Excel" Theme="MetropolisBlue" View="GroupBox">
                                    <PanelCollection>
                                        <dx:PanelContent runat="server">
                                            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" ExportedRowType="All" GridViewID="ASPxOrdiniPerExcel" ExportSelectedRowsOnly="true" OnRenderBrick="ASPxGridViewExporter1_RenderBrick">
                                            </dx:ASPxGridViewExporter>
                                            <dx:ASPxGridView ID="ASPxOrdiniPerExcel" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDSOrdiniPerExcel" EnableTheming="True" Theme="MetropolisBlue" KeyFieldName="IDOrdini" OnBeforePerformDataSelect="ASPxOrdiniPerExcel_BeforePerformDataSelect">
                                                <SettingsAdaptivity>
                                                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                                                </SettingsAdaptivity>

                                                <SettingsPager Mode="ShowAllRecords" Visible="False">
                                                </SettingsPager>
                                                <SettingsBehavior ProcessSelectionChangedOnServer="True" />

                                                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                                                <Columns>
                                                    <dx:GridViewDataTextColumn FieldName="prog" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="2">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="rif" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="3">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="simulazione" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="4">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="spuntato" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="5">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="storicizzato" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="6">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="storno" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="7">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="annullato" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="8">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ora_ope" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="11">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataDateColumn FieldName="data_val" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="12">
                                                        <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                        </PropertiesDateEdit>
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_ope" ShowInCustomizationForm="True" VisibleIndex="13">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_rap" ShowInCustomizationForm="True" VisibleIndex="14">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_tit" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="15">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_div_tit" ShowInCustomizationForm="True" VisibleIndex="16">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_isin" ShowInCustomizationForm="True" VisibleIndex="17">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_bloomberg" ShowInCustomizationForm="True" VisibleIndex="18">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_esterno" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="19">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="qta" ShowInCustomizationForm="True" VisibleIndex="20">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="prezzo" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="21">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="rateo" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="22">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cambiom" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="23">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cambiod" ShowInCustomizationForm="True" VisibleIndex="24">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_ctp" ShowInCustomizationForm="True" VisibleIndex="25">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_dep_tit" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="26">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_dep_liq" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="27">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_dep_liq2" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="28">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_div_reg" ShowInCustomizationForm="True" VisibleIndex="29">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_tit_dn" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="30">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_rat_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="31">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="comp_dep_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="32">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coma_dep_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="33">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="comp_alt_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="34">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coma_alt_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="35">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="spese_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="36">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="imposte_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="37">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_tot_dn" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="38">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="margini_dn" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="39">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_tit_dr" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="40">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_rat_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="41">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="comp_dep_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="42">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coma_dep_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="43">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="comp_alt_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="44">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coma_alt_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="45">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="spese_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="46">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="imposte_dr" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="47">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_tot_dr" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="48">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="des_mov" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="49">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="rif_est" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="50">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coordinate1" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="51">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="coordinate2" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="52">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="data_sto" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="53">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="progr_sto" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="54">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="prezzo_car" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="55">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_div_ds" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="56">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cambiom_ds" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="57">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cambiod_ds" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="58">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ctv_tot_ds" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="59">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cod_mer" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="60">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="param_prezzo" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="61">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="param_tempo" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="62">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="cash" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="63">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="des_tit" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="64">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="divisore" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="65">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="moltiplicatore" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="66">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="leva" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="67">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewCommandColumn SelectAllCheckboxMode="AllPages" ShowInCustomizationForm="True" ShowSelectCheckbox="True" VisibleIndex="0">
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn FieldName="IDOrdini" ReadOnly="True" ShowInCustomizationForm="True" Visible="False" VisibleIndex="1">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataDateColumn FieldName="data_ope" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="10">
                                                        <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                        </PropertiesDateEdit>
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataDateColumn FieldName="data_ins" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="9">
                                                        <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy" EditFormat="Custom" EditFormatString="dd/MM/yyyy">
                                                        </PropertiesDateEdit>
                                                    </dx:GridViewDataDateColumn>
                                                </Columns>
                                            </dx:ASPxGridView>
                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxRoundPanel>
                            </dx:ContentControl>
                        </ContentCollection>
                    </dx:TabPage>
                </TabPages>
            </dx:ASPxPageControl>
        </div>
        <asp:SqlDataSource ID="SqlDSOrdini" runat="server" ConnectionString="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection %>" SelectCommand="GDN_LoadOrdini_v3" UpdateCommand="dbo.GDN_OrdiniUPD_v1" SelectCommandType="StoredProcedure" UpdateCommandType="StoredProcedure" ProviderName="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection.ProviderName %>">
            <SelectParameters>
                <asp:SessionParameter Name="ISIN" SessionField="ISIN" Type="String" />
                <asp:Parameter Name="Gruppi" Type="String" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="IDOrdini" Type="Int32" />
                <asp:Parameter Name="Quantita" Type="Double" />
                <asp:Parameter Name="Prezzo" Type="Double" />
                <asp:Parameter Name="TipoOperazione" Type="String" />
                <asp:Parameter Name="Cambio" Type="Double" />
                <asp:Parameter Name="DataValidita" DbType="Date" />
                <asp:Parameter Name="DivisaRegolamento" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDSClienti" runat="server" ConnectionString="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection %>" SelectCommand="SELECT IDClienti,Nome,NumRapporto,Banca,DivisaRapporto,Gruppo FROM ClientiGDN
WHERE (Deleted = 0 or Deleted is null)"
            InsertCommand="INSERT INTO ClientiGDN(Nome, NumRapporto, Banca, DivisaRapporto, Gruppo) VALUES (@Nome, @NumRapporto, @Banca, @DivisaRapporto, @Gruppo)" UpdateCommand="UPDATE ClientiGDN SET Nome = @Nome, NumRapporto = @NumRapporto, Banca = @Banca, DivisaRapporto = @DivisaRapporto, Gruppo = @Gruppo WHERE (IDClienti = @IDClienti)" DeleteCommand="UPDATE ClientiGDN
SET Deleted = 1
WHERE IDClienti = @IDClienti"
            ProviderName="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection.ProviderName %>">
            <DeleteParameters>
                <asp:Parameter Name="IDClienti" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Nome" />
                <asp:Parameter Name="NumRapporto" />
                <asp:Parameter Name="Banca" />
                <asp:Parameter Name="DivisaRapporto" />
                <asp:Parameter Name="Gruppo" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDSMercati" runat="server" ConnectionString="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection %>" SelectCommand="SELECT IDMercati,Codice,Descrizione FROM MercatiGDN ORDER BY Descrizione" ProviderName="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection.ProviderName %>" InsertCommand="INSERT INTO MercatiGDN(Codice, Descrizione) VALUES (@Codice, @Descrizione)" UpdateCommand="UPDATE MercatiGDN SET Descrizione = @Descrizione, Codice = @Codice WHERE (IDMercati = @IDMercati)">
            <InsertParameters>
                <asp:Parameter Name="Codice" />
                <asp:Parameter Name="Descrizione" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Descrizione" />
                <asp:Parameter Name="Codice" />
                <asp:Parameter Name="IDMercati" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDSTitoli" runat="server" ConnectionString="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection %>" ProviderName="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection.ProviderName %>" SelectCommand="SELECT * FROM TitoliGDN"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDSOrdiniPerExcel" runat="server" ConnectionString="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection %>" SelectCommand="GDN_LoadExcelOrdini_v3" SelectCommandType="StoredProcedure" ProviderName="<%$ ConnectionStrings:OlympiaIntranet.Properties.Settings.SqlConnection.ProviderName %>">
            <SelectParameters>
                <asp:SessionParameter DbType="Date" Name="fromDate" SessionField="fromDate" />
                <asp:SessionParameter DbType="String" Name="Gruppi" SessionField="Gruppi" />
            </SelectParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
