Torna al Thread

<%@ Page CodeBehind="clienti.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="Gest.Administrator.Admin.Clienti" %> <%@ Register TagPrefix="uc4" TagName="Footer" Src="../Controls/Footer.ascx" %> <%@ Register TagPrefix="uc3" TagName="MenuAdmin" Src="../Controls/Menu_Admin.ascx" %> <%@ Register TagPrefix="uc2" TagName="Header" Src="../Controls/Header.ascx" %> <%@ Register TagPrefix="uc1" TagName="Intestazione" Src="../Controls/Intestazione.ascx" %> <uc1:Intestazione ID="myIntestazione" runat="server" /> <body bgcolor="#cccccc"> <div align="center"> <div style="WIDTH:950px; BACKGROUND-COLOR:#ffffff" align="left"> <uc2:Header ID="myHeader" runat="server" /> <!--MENU PRINCIPALE AMMINISTRAZIONE--> <uc3:MenuAdmin ID="myMenuAdmin" runat="server" /> <!--FINE MENU PRINCIPALE AMMINISTRAZIONE--> <!--BODY--> <div style="BACKGROUND-COLOR:#e4e4e4"> <!--TABELLA CLIENTI GENERALE--> <div style="FLOAT:left; WIDTH:950px; BACKGROUND-COLOR:#e4e4e4"> <br > <br > <table width="900" border="0" cellspacing="1" cellpadding="1" align="center"> <tbody id="tbClienti"> <tr> <td width="400" height="30" align="center" bgcolor="#0096d1" class="testo_white"><div style="FLOAT:left; WIDTH:360px"> <div align="center" style="PADDING-TOP:8px">Cliente</div> </div> <div style="FLOAT:right" id="dvOrdAZcliente" runat="server"> <a href="Clienti.aspx?c=nome&o=DESC"> <img src="../img/arrow_up.jpg" alt="ordina decrescente" > </a> </div> <div style="FLOAT:right; display:none;" id="dvOrdZAcliente" runat="server"> <a href="Clienti.aspx?c=nome&o=ASC"> <img src="../img/arrow.jpg" alt="ordina crescente" > </a> </div></td> <td width="400" align="center" bgcolor="#0096d1" class="testo_white"><div style="FLOAT:left; WIDTH:360px"> <div align="center" style="PADDING-TOP:8px">Azienda</div> </div> <div style="FLOAT:right" id="dvOrdAZazienda" runat="server"> <a href="Clienti.aspx?c=azienda&o=DESC"> <img src="../img/arrow_up.jpg" alt="ordina decrescente" > </a> </div> <div style="FLOAT:right; display:none;" id="dvOrdZAazienda" runat="server"> <a href="Clienti.aspx?c=azienda&o=ASC"> <img src="../img/arrow.jpg" alt="ordina crescente" > </a> </div></td> <td width="48" align="center" bgcolor="#0096d1" class="testo_white">Modifica</td> <td width="48" align="center" bgcolor="#0096d1" class="testo_white">Elimina</td> </tr> <asp:Repeater ID="rptClienti" runat="server"> <itemtemplate> <tr id="trCliente<%# ((strClienti)Container.DataItem).codice_cliente %>"> <td bgcolor="#FFFFFF"><div class="testo" style="padding-left:20px"><%# ((strClienti)Container.DataItem).nome %></div></td> <td bgcolor="#FFFFFF"><div class="testo" style="padding-left:20px"><%# ((strClienti)Container.DataItem).azienda %></div></td> <td bgcolor="#FFFFFF" align="center"><a href="Cliente.aspx?id=<%# ((strClienti)Container.DataItem).codice_cliente %>"> <img src="../img/edit.jpg" alt="modifica" width="24" height="24" /> </a> </td> <td bgcolor="#FFFFFF" align="center"><a href="javascript:;" onClick="Elimina('<%# ((strClienti)Container.DataItem).codice_cliente %>','<%# ((strClienti)Container.DataItem).codice_user %>')"> <img src="../img/trash.jpg" alt="cancella" width="24" height="24" /> </a> </td> </tr> </itemtemplate> </asp:Repeater> </tbody> </table> </div> <!--FINE TABELLA CLIENTI GENERALE--> <br > <div class="hiddentext" style="FLOAT:left; WIDTH:950px; HEIGHT:30px; BACKGROUND-COLOR:#e4e4e4">ccc</div> <div style="FLOAT:left; WIDTH:950px; BACKGROUND-COLOR:#e4e4e4"> <div align="center" style="WIDTH:300px; HEIGHT:30px"> <div style="FLOAT:left; MARGIN-LEFT:20px; HEIGHT:30px; width:30px"> <a href="Cliente.aspx"> <img src="../img/insert.jpg" alt="add" > </a> </div> <div style="FLOAT:left; width:200px; HEIGHT:30px; text-align:left;"> <a href="Cliente.aspx" class="testo_bold"> <span class="testo_bold">Inserisci Nuovo Cliente</span> </a> </div> </div> </div> <div class="hiddentext" style="FLOAT:left; WIDTH:950px; HEIGHT:30px; BACKGROUND-COLOR:#e4e4e4">ccc</div> </div> <!--FINE BODY--> <uc4:Footer ID="myFooter" runat="server" /> </div> </div> <script language="javascript"> function Elimina(id, id_user) { var risp risp = confirm("Cancellare il cliente selezionato?"); if (risp == true) Clienti.EliminaCliente(id, id_user, Elimina_CallBack); } function Elimina_CallBack(response) { if (response.error != null) { alert("Errore durante la cancellazione:" + response.error); return; } if (response.value=="-1") { alert("Cliente cancellato!"); EliminaVoce("trCliente" + id); } else alert("Problemi durante la cancellazione. Cliente non cancellato!"); } function EliminaVoce(oggetto) { //var dv = document.getElementById(oggetto) //if (dv!=null) dv.style.display="none" var riga = document.getElementById(oggetto) var tbl=document.getElementById('tbClienti') tbl.removeChild(riga); } </script> </body>
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5