<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="archivioDocumenti.aspx.cs"
    Inherits="archivioDocumenti" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Archivio Documenti</title>
    <link href="CSS/tv.css" type="text/css" rel="stylesheet" />
    <link href="CSS/Pagina.css" rel="stylesheet" type="text/css" />
    <link type="text/css" rel="stylesheet" href="CSS/webtoolkit.contextmenu.css" />
    <script type="text/javascript" src="CSS/webtoolkit.contextmenu.js"></script>
    <script type="text/javascript">
        var ns = (document.layers) ? true : false;
        var ie = (document.getElementById) ? true : false;
        var dgIndiceRiga = -1;
        var dgIdPDF = -1;
        var dgPdfC6 = -1;
        var rete = "";
        var codicefiscale = "";
        //deselezionato
        var de_style = "";
        //selezionato 
        var sel_style = "#fefecc";
        //*************************************************************
        // Descrizione: recupera la posizione sullo schermo della modale.
        // Input:
        //      dimensioneSchermo:              Altezza o Larghezza dello schermo
        //      dimensioneFinestra:             Altezza o Larghezza della finestra
        //      Visibile:               se false la finestra viene visualizzata fuori dallo scherno
        // Restituisce:         la coordinata(left o top)della finestra sullo schermo
        function Posizione(dimensioneSchermo, dimensioneFinestra, visibile) {
            var posizione;
            if ((visibile != null) && (visibile)) {
                posizione = (dimensioneSchermo / 2) - (dimensioneFinestra / 2);
                if (posizione < 0)
                    posizione = 0;
            }
            else
                posizione = 10000;

            return posizione;
        }

        function ShowContextMenu(indiceRiga, idPdf, pdfC6, r, cf) {
            indiceRiga += 2;
            if (indiceRiga >= 2) {

                if (indiceRiga != dgIndiceRiga) {
                    SelezionaRiga(indiceRiga, dgIndiceRiga);
                    // SelezionaRiga    
                    dgIndiceRiga = indiceRiga;
                    dgIdPDF = idPdf;
                    dgPdfC6 = pdfC6;
                    rete = r;
                    codicefiscale = cf;
                }
            }
        }

        function SelezionaRiga(newindiceRiga, oldindiceRiga) {
            var riga = dg.rows(newindiceRiga);

            var appoggio_old_Style = riga.style.backgroundColor;
            riga.style.backgroundColor = sel_style;
            if (oldindiceRiga > 1) {
                dg.rows(oldindiceRiga).style.backgroundColor = de_style;
                de_style = appoggio_old_Style;
            }
        }

        function shohModaleOkAnnulla() {
            var visibile = true;
            //var altezza = 226;
            //var larghezza = 502;
            var altezza = 265;
            var larghezza = 508;
            var sopra = Posizione(window.screen.availHeight, altezza, visibile);
            var sinistra = Posizione(window.screen.availWidth, larghezza, visibile);
            var aspetto = "dialogHeight: " + altezza + "px; dialogWidth: " + larghezza + "px; dialogLeft: " + sinistra + "px; edge: Raised; center:yes; help:no; resizable:no; status:no;";
            var url = "PopUpSintesi.aspx?pdfId=";
            url += '' + dgIdPDF + '';

            var ret = window.showModalDialog(url, '', aspetto);
            return ret;
        }

        function Ristampa() {
            showPdf(dgIdPDF, dgPdfC6);
        }

        function ProduzioneLetteraRistampa() {
            var ret = shohModaleOkAnnulla();
            if (ret == 1) {
                showPdfLetteraRistampa(dgIdPDF);
            }

        }

        function showPdfLetteraRistampa(dgIdPDF) {
            var url = "showPdfLetteraRistampa.aspx?pdfId=";
            url += '' + dgIdPDF + '';
            url += "&pdfC6=";
            url += '' + dgPdfC6 + '';
            url += "&Rete=";
            url += '' + rete + '';
            url += "&CodiceFiscale=";
            url += '' + codicefiscale + '';
            window.open(url, "tip", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=600");
        }

        function RistampaESelecta() {
            var ret = shohModaleOkAnnulla();
            if (ret == 1) {
                var url = "ReinvioASelecta.aspx?pdfId=";
                url += '' + dgIdPDF + '';
                url += "&pdfC6=";
                url += '' + dgPdfC6 + '';
                url += "&Rete=";
                url += '' + rete + '';
                url += "&CodiceFiscale=";
                url += '' + codicefiscale + '';
                ReinvioASelecta.navigate(url);
            }
        }
    </script>
    <script language="javascript" type="text/javascript">


        function updateTop() {
            //parent.TOP.lblNavPath.innerText = "Gestione stampe > Documenti";
            parent.frames['TOP'].document.getElementById('lblNavPath').innerHTML = "Gestione stampe > Documenti";
        }

        function showPdf(pdfId, pdfC6, codiceFiscale) {
            var url = "showStoredPDF.aspx?pdfId=";
            url += '' + pdfId + '';
            url += "&pdfC6=";
            url += '' + pdfC6 + '';
            url += "&codiceFiscale=";
            url += '' + codiceFiscale + '';

            window.open(url, "tip", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=600");
        } 
    </script>
    <style type="text/css">
        .style1
        {
            width: 171px;
        }
    </style>
</head>
<body bgcolor="white" link="#31657B" alink="#31657B" onload="updateTop()">
    <form id="Form1" method="post" runat="server">
    <table border="1" style="width: 690px">
        <tr>
            <td style="width: 13px">
                <asp:Label ID="lblTitle" Style="z-index: 100; left: 32px; top: 6px" runat="server"
                    Height="16px" Width="695px" ForeColor="White" Font-Bold="True" CssClass="stateTitle">Archivio Documenti</asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <asp:Label ID="lbl_Message" Style="z-index: 101; left: 0px; top: 35px" runat="server"
                    Height="18px" Width="695px" Font-Bold="True" CssClass="lblMessage" Font-Underline="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <table style="width: 100%" nowrap>
                    <tr>
                        <td style="height: 28px">
                            <asp:Label ID="Label9" runat="server" CssClass="lblSchede" Text="Codice Rete" Width="70px"></asp:Label>
                        </td>
                        <td style="height: 28px">
                            <asp:TextBox ID="txb_Rete" runat="server" CssClass="lblSchede"></asp:TextBox>
                        </td>
                        <td style="width: 40px; height: 28px">
                            <asp:Label ID="Label10" runat="server" CssClass="lblSchede" Text="Codice PB" Width="60px"></asp:Label>
                        </td>
                        <td style="height: 28px">
                            <asp:TextBox ID="txb_CodicePB" runat="server" CssClass="lblSchede"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 13px; height: 75px;">
                <table style="width: 100%">
                    <tr>
                        <td colspan="6">
                            <asp:Label ID="Label2" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="94px" Font-Size="10pt">Cliente</asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label3" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="57px">Cognome</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txb_ClienteCognome" runat="server" CssClass="lblSchede" Height="17px"
                                MaxLength="50" TabIndex="1" Width="110px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label ID="Label4" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="41px">Nome</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txb_ClienteNome" runat="server" CssClass="lblSchede" Height="17px"
                                MaxLength="50" TabIndex="1" Width="120px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label5" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="78px">Codice fiscale</asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txb_ClienteCF" runat="server" CssClass="lblSchede" Height="20px"
                                MaxLength="16" TabIndex="1" Width="152px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label ID="Label12" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="100px">Codice Contratto</asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txt_contratto" runat="server" CssClass="lblSchede" Height="20px"
                                MaxLength="16" TabIndex="1" Width="152px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 13px; height: 14px;">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="Label1" runat="server" Height="20px" Width="72px" Font-Bold="True"
                                CssClass="lblSchede" Font-Size="10pt">Tipologia</asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddl_Modello" runat="server" Width="282px" CssClass="lblSchede">
                                <%--<asp:ListItem Value="0" Text=""></asp:ListItem>
                                <asp:ListItem Value="1">Report di Diagnosi</asp:ListItem>
                                <asp:ListItem Value="2">Report di Pianificazione</asp:ListItem>
                                <asp:ListItem Value="3">Report di Proposta</asp:ListItem>
                                <asp:ListItem Value="4">Report di Monitoraggio</asp:ListItem>
                                <asp:ListItem Value="5">Report Direct Marketing</asp:ListItem>
                                <asp:ListItem Value="6">Report di Proposta validata</asp:ListItem> --%>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <table>
                    <tr>
                        <td>
                            <asp:CheckBox ID="chk_RicercaStampeDefinitive" runat="server" CssClass="lblSchedeIndent"
                                TabIndex="3" Text="Ricerca solo stampe definitive" Width="192px" OnCheckedChanged="chk_RicercaStampeDefinitive_CheckedChanged"
                                AutoPostBack="True" />
                        </td>
                        <td>
                            <asp:Image ID="Image1" runat="server" BorderColor="Navy" BorderStyle="Solid" BorderWidth="1px"
                                EnableTheming="False" Height="24px" ImageUrl="~/Images/LucchettoClosed.png" Width="18px" />
                        </td>
                        <td>
                            <asp:CheckBox ID="chk_RicercaStampeProvvisorie" runat="server" CssClass="lblSchedeIndent"
                                TabIndex="3" Text="Ricerca solo stampe provvisorie" Width="202px" OnCheckedChanged="chk_RicercaStampeProvvisorie_CheckedChanged"
                                AutoPostBack="True" />
                        </td>
                        <td>
                            <asp:Image ID="Image2" runat="server" BorderColor="Navy" BorderStyle="Solid" BorderWidth="1px"
                                EnableTheming="False" Height="24px" ImageUrl="~/Images/LucchettoOpen.png" Width="24px" />
                        </td>
                        <td>
                            <asp:CheckBox ID="chk_RicercaStampedaRichiedere" runat="server" CssClass="lblSchedeIndent"
                                TabIndex="3" Text="Ricerca stampe da Richiedere" Width="202px" OnCheckedChanged="chk_RicercaStampedaRichiedere_CheckedChanged"
                                AutoPostBack="True" />
                        </td>
                        <td>
                            <asp:Image ID="Image3" runat="server" BorderColor="Navy" BorderStyle="Solid" BorderWidth="1px"
                                EnableTheming="False" Height="24px" ImageUrl="~/Images/icon-Richiesta_scalata.jpg"
                                Width="24px" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <asp:Label ID="Label6" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                    Width="94px" Font-Size="10pt">Data</asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="Label7" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="59px">Dal</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txb_da" runat="server" CssClass="lblSchede" Height="17px" MaxLength="12"
                                TabIndex="1" Width="82px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:ImageButton ID="imgCalendar_Da" runat="server" BorderWidth="1px" Height="24px"
                                ImageUrl="~/Images/dlcalendar_2.gif" OnClick="imgCalendar_Da_Click" Width="24px" />
                            <asp:Calendar ID="cldSF_da" runat="server" BorderColor="#FFBB33" BorderStyle="Groove"
                                BorderWidth="2px" FirstDayOfWeek="Monday" Font-Names="Tahoma" Font-Size="XX-Small"
                                ForeColor="Black" Height="5px" NextPrevFormat="FullMonth" OnSelectionChanged="cldSF_da_SelectionChanged"
                                ShowGridLines="true" Visible="False" Width="1px">
                                <SelectedDayStyle BackColor="Azure" ForeColor="Navy" />
                                <SelectorStyle BorderStyle="Solid" />
                                <DayStyle BackColor="White" />
                                <DayHeaderStyle BackColor="LightGray" BorderColor="#404040" BorderStyle="Solid" />
                                <TitleStyle BackColor="WhiteSmoke" BorderStyle="Solid" ForeColor="Black" />
                            </asp:Calendar>
                        </td>
                        <td>
                            <asp:Label ID="Label8" runat="server" CssClass="lblSchede" Font-Bold="True" Height="20px"
                                Width="59px">Al</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txb_a" runat="server" CssClass="lblSchede" Height="17px" MaxLength="12"
                                TabIndex="1" Width="82px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:ImageButton ID="imgCalendar_a" runat="server" BorderWidth="1px" Height="24px"
                                ImageUrl="~/Images/dlcalendar_2.gif" OnClick="imgCalendar_a_Click" Width="24px" />
                            <asp:Calendar ID="cldSF_a" runat="server" BackColor="DarkSeaGreen" BorderColor="#FFBB33"
                                BorderStyle="Groove" BorderWidth="2px" FirstDayOfWeek="Monday" Font-Names="Tahoma"
                                Font-Size="XX-Small" ForeColor="Black" Height="5px" NextPrevFormat="FullMonth"
                                OnSelectionChanged="cldSF_a_SelectionChanged" ShowGridLines="true" Visible="False"
                                Width="1px">
                                <SelectedDayStyle BackColor="Azure" ForeColor="Navy" />
                                <SelectorStyle BorderStyle="Solid" />
                                <DayStyle BackColor="White" />
                                <DayHeaderStyle BackColor="LightGray" BorderColor="#404040" BorderStyle="Solid" />
                            </asp:Calendar>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 13px">
                <table>
                    <tr>
                        <td>
                            <asp:Button ID="btn_Azzera" runat="server" Font-Names="Tahoma" Font-Size="10pt" Height="24px"
                                Text="Azzera" Width="133px" OnClick="btn_Azzera_Click" ToolTip="Click per resettare i campi di ricerca" />
                        </td>
                        <td>
                            <asp:Button ID="btn_Ricerca" runat="server" Font-Names="Tahoma" Font-Size="10pt"
                                Height="24px" Text="Ricerca" Width="133px" OnClick="btn_Ricerca_Click" ToolTip="Click per ricercare un documento con i criteri di ricerca" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <ul id="CM1" class="SimpleContextMenu">
                    <%-- <li><a href="javascript:Ristampa()">Ristampa</a></li> --%>
                    <li><a href="javascript:ProduzioneLetteraRistampa()">Produzione lettera di accompagnamento
                        ristampa</a></li>
                    <li><a href="javascript:RistampaESelecta()">Reinvio a Selecta</a></li>
                </ul>
                <div class="container">
                    <asp:DataGrid ID="dg" TabIndex="7" runat="server" BackColor="#EEEEEE" AutoGenerateColumns="False"
                        AllowPaging="True" AllowSorting="True" BorderColor="#EEEEEE" Height="8px" Width="695px"
                        PageSize="30" OnPageIndexChanged="dg_PageIndex" BorderStyle="Groove" BorderWidth="1px"
                        CssClass="lblSchede" Font-Size="10pt">
                        <FooterStyle BorderWidth="2px" CssClass="stateTitle" Font-Size="9pt"></FooterStyle>
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" BorderStyle="None" CssClass="stateTitle"
                            Font-Size="9pt" ForeColor="White"></HeaderStyle>
                        <Columns>
                            <asp:TemplateColumn>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chk" runat="server" Visible="true" Checked="false"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="Note" Visible="False">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="stato" Visible="False">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="IdCliente" HeaderText="idCliente" Visible="False">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="Identificativo" Visible="False" HeaderText="pdfDocumentId">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:BoundColumn HeaderText="CodicePB" SortExpression="CodicePB" DataField="CodicePB">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" />
                            </asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Cliente" SortExpression="Nominativo" DataField="Nominativo">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" />
                            </asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Tipologia report" SortExpression="TipologiaReport" DataField="TipologiaReport">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <HeaderStyle Width="150px" />
                            </asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Data" SortExpression="DtCreazione" DataField="DtCreazione"
                                DataFormatString="{0:d}">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Ora" DataField="DtCreazione" DataFormatString="{0:HH:mm:ss}">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                    Font-Underline="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundColumn>
                            <asp:TemplateColumn HeaderText="Stato">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                <ItemTemplate>
                                    <%#((DataBinder.Eval(Container.DataItem, "storico").ToString()=="1") ? "<img src='Images/icon-Richiesta_scalata.jpg' width='18' height='24' id='Img0'/>" : (Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "stato").ToString())) ? "<img src='Images/LucchettoClosed.png' width='18' height='24' id='Img0'/>" : "<img src='Images/LucchettoOpen.png' width='24' height='24' id='Img3'/>")%>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="Note">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                <ItemTemplate>
                                    <%#((DataBinder.Eval(Container.DataItem, "Note").ToString() == "") ? "" : "<a href='showNotes.aspx?pathNav=archivioDocumenti.aspx&noteId=" + DataBinder.Eval(Container.DataItem, "Identificativo") + "&pdfC6=" + DataBinder.Eval(Container.DataItem, "pdfC6") + "&TipologiaReport=" + DataBinder.Eval(Container.DataItem, "TipologiaReport") + "&tipoRete=" + codiceRete + "&codPB=" + codicePB + "&codclienteReport=" + DataBinder.Eval(Container.DataItem, "codFiscale") + "&codcliente=" + DataBinder.Eval(Container.DataItem, "codFiscale") + "&tpReport=" + ddl_Modello.SelectedValue + "&indicePagina=" + dg.CurrentPageIndex + "&dayDa=" + txb_da.Text + "&dayA=" + txb_a.Text + "&rsd=" + this.chk_RicercaStampeDefinitive.Checked.ToString() + "&rsp=" + chk_RicercaStampeProvvisorie.Checked.ToString() + "&nominativoCliente=" + DataBinder.Eval(Container.DataItem, "Nominativo").ToString().Replace("'", "%27") + "&cognome=" + txb_ClienteCognome.Text + "&nome=" + txb_ClienteNome.Text + "'><img src='Images/text.gif' width='19' height='23' border='0' alt='Click per vedere le note'/></a>")%>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="Log">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                <ItemTemplate>
                                    <%#("<a href='showLogs.aspx?pathNav=archivioDocumenti.aspx&noteId=" + DataBinder.Eval(Container.DataItem, "Identificativo") + "&pdfC6=" + DataBinder.Eval(Container.DataItem, "pdfC6") + "&TipologiaReport=" + DataBinder.Eval(Container.DataItem, "TipologiaReport") + "&tipoRete=" + codiceRete + "&codPB=" + codicePB + "&codclienteReport=" + DataBinder.Eval(Container.DataItem, "codFiscale") + "&codcliente=" + DataBinder.Eval(Container.DataItem, "codFiscale") + "&tpReport=" + ddl_Modello.SelectedValue + "&indicePagina=" + dg.CurrentPageIndex + "&dayDa=" + txb_da.Text + "&dayA=" + txb_a.Text + "&rsd=" + this.chk_RicercaStampeDefinitive.Checked.ToString() + "&rsp=" + chk_RicercaStampeProvvisorie.Checked.ToString() + "&nominativoCliente=" + DataBinder.Eval(Container.DataItem, "Nominativo").ToString().Replace("'", "%27") + "&cognome=" + txb_ClienteCognome.Text + "&nome=" + txb_ClienteNome.Text + "'><img src='Images/log.png' width='21' height='25' border='0' alt='Click per vedere il log'/></a>")%>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="Pdf">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                <ItemTemplate>
                                    <a id="linkDocumento" runat="server">
                                        <img id="imgLinkDocumento" border="0" width="20" height="24" runat="server" />
                                    </a>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="CodFiscale" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Storico" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="pdfc6" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="rete" Visible="False"></asp:BoundColumn>
                        </Columns>
                        <PagerStyle Position="TopAndBottom" PageButtonCount="35" CssClass="stateTitle" Font-Size="9pt">
                        </PagerStyle>
                        <AlternatingItemStyle BackColor="WhiteSmoke" BorderStyle="None" />
                    </asp:DataGrid>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Button ID="HomePage" runat="server" Font-Names="Tahoma" Font-Size="10pt" Height="24px"
                    OnClick="HomePage_Click" Text="Ritorna a maschera iniziale" Width="160px" />
                <asp:Button ID="btn_EliminaSelezionati" runat="server" Font-Names="Tahoma" Font-Size="10pt"
                    Height="24px" OnClick="btn_EliminaSelezionati_Click" Text="Elimina selezionati"
                    Width="147px" OnClientClick="return confirm('Sei sicuro di volere eliminare definitivamente i documenti selezionati?');" />
                <asp:Button ID="btn_Archivia" runat="server" Font-Names="Tahoma" Font-Size="10pt"
                    Height="24px" OnClick="btn_Archivia_Click" Width="147px" Text="Archivia definitivamente"
                    OnClientClick="return confirm('Sei sicuro di volere archiviare definitivamente i documenti selezionati?');" />
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <iframe id="ReinvioASelecta" src="blank.aspx" scrolling="no" frameborder="0" style="display: none"
        noresize></iframe>
    </form>
</body>
</html>