Torna al Thread

<table width="100%"> <tr> <td><asp:Label CssClass="titolo_main" runat="server" ID="LblFamigliaGruppo"></asp:Label></td> <td align="right"><a href="/users/carrello.aspx"><img alt="carrello" src="images/cart.gif" /></a>&nbsp;<asp:Label runat="server" ID="LblNCart" Text="" Font-Bold="true" CssClass="testo_bianco"/>&nbsp;<asp:Label runat="server" ID="LblCart" Text="articolo/i" CssClass="testo_bianco" /></td> </tr> </table> <%Dim StrSelectCommand As String = "" Dim StrSql As String = "" Dim WC As String = System.Configuration.ConfigurationManager.AppSettings("WC").ToString Dim cf As String = Request("cf") Dim gm As String = Request("gm") Dim ca As String = Request("ca") Dim ma As String = Request("ma") Dim CodMar As String Dim CodLis As String = Session("CODLIS") Dim CodSco As String = Session("CODSCO") Dim CodMag As String = Session("PWCODMAG") Dim AnCodice As String = Session("ANCODICE") Dim modalita As String = Session("MOD") Dim BitModal As String = Left(modalita, 2) Dim BitVisual As String = Right(modalita, 2) 'Dim PrimoGiro As Boolean = True Dim ProgrElem As Integer = 0 Dim chiave As String = "" Dim NGiro As Integer = 0 Dim cnn, cnnArt As SqlConnection Dim cmd, cmdArt As SqlCommand cnn = New SqlConnection() cnn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("Conn").ToString cnn.Open() Session("OrderBy") = "ArticoliWeb.ARCODART" 'query esterna delle marche If cf <> "" Then StrSelectCommand = "Select ARCODMAR, MADESCRI From tb_" & WC & "_web_Articoli " & _ "Where ARCODFAM = '" & cf & "' Group By ARCODMAR, MADESCRI Order By MADESCRI" ElseIf gm <> "" Then StrSelectCommand = "Select ARCODMAR, MADESCRI From tb_" & WC & "_web_Articoli " & _ "Where ARGRUMER = '" & gm & "' " If ma <> "" Then StrSelectCommand &= "And ARCODMAR = '" & ma & "' " End If StrSelectCommand &= "Group By ARCODMAR, MADESCRI Order By MADESCRI" End If cmd = New SqlCommand(StrSelectCommand, cnn) Dim rdr As SqlDataReader = cmd.ExecuteReader() 'ciclo delle marche, per ogni marca visualizza l'elenco dei prodotti While rdr.Read Response.Write("<div style='background-color:#ff7800; width:765px' class='titolo_main'>") Response.Write(rdr("MADESCRI").ToString()) Response.Write("</div>") CodMar = rdr("ARCODMAR") 'query per estrarre i dati degli articoli per marca If CodSco = "" Then ' cliente con griglia sconti non associata If Trim(CodLis) <> "BASE" Then ' se non ha listino base vengono visualizzate le offerte StrSql = "query per estrarre gli articoli" Else ' se l'utente non ha griglia sconti ed ha il listino BASE non deve visualizzare le offerte in corso StrSql = "query per estrarre gli articoli" End If Else ' cliente con griglia sconti associata StrSql = "query per estrarre gli articoli" End If cnnArt = New SqlConnection() cnnArt.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("Conn").ToString cnnArt.Open() cmdArt = New SqlCommand(StrSql, cnnArt) Dim rdrArt As SqlDataReader = cmdArt.ExecuteReader() 'variabile per sapere a che ciclo sono e far vedere le righe alternate e l'itestazione della tabella interna NGiro = 0 'PrimoGiro = True While rdrArt.Read If NGiro = 0 Then Response.Write("<table CellPadding='1' CellSpacing='0' style='width:765px'>") 'titolo Response.Write("<tr>") Response.Write("<td style='background-color:#dddddd;width:40px' valign='top' class='titolo_arancio'>Codice</td>") Response.Write("<td style='background-color:#dddddd;width:503px' valign='top' class='titolo_arancio'>Descrizione</td>") Response.Write("<td style='background-color:#dddddd;width:16px' valign='top' class='titolo_arancio'>&nbsp;</td>") Response.Write("<td style='background-color:#dddddd;width:30px' valign='top' align='right' class='titolo_arancio'>Disp. " & Trim(CodMag) & "</td>") Response.Write("<td style='background-color:#dddddd;width:30px' valign='top' align='right' class='titolo_arancio'>Sede</td>") Response.Write("<td style='background-color:#dddddd;width:30px' valign='top' align='right' class='titolo_arancio'>In Arr.</td>") Response.Write("<td style='background-color:#dddddd;width:50px' valign='top' align='right' class='titolo_arancio'>Prezzo</td>") Response.Write("<td style='background-color:#dddddd;width:50px' valign='top' align='right' class='titolo_arancio'>Q.ta</td>") Response.Write("<td style='background-color:#dddddd;width:16px' valign='top' class='titolo_arancio'> &nbsp;</td>") Response.Write("</tr>") 'PrimoGiro = False End If Response.Write("<tr>") If NGiro Mod 2 = 0 Then Response.Write("<td class='row_prod'>" & RTrim(rdrArt("ARCODART")) & "</td>") Response.Write("<td class='row_prod'>" & RTrim(rdrArt("ARDESSUP")) & "</td>") Response.Write("<td class='row_prod' align='center'><a href='detprod.aspx?id=" & Trim(rdrArt("ARCODART")) & "'><img src='../images/lentet.gif' alt='Vedi dettaglio'/></a></td>") Response.Write("<td class='row_prod' align='right'>" & Format(CInt(rdrArt("DISPFIL")), "d") & "</td>") Response.Write("<td class='row_prod' align='right'>" & Format(CInt(rdrArt("DISP00")), "d") & "</td>") Response.Write("<td class='row_prod' align='right'><a class='link_arancio' href='inarrivo.aspx?ca=" & Trim(rdrArt("ARCODART")) & "' dir='ltr'>" & Format(CInt(rdrArt("SLQTOPER")), "d") & "</a></td>") Response.Write("<td class='row_prod' align='right'>" & Format(rdrArt("PRZNET"), "F") & "</td>") Response.Write("<td class='row_prod' align='right'><input type='text' style='width:30px' name='Qnt" & Trim(rdrArt("ARCODART")) & "' /></td>") Response.Write("<td class='row_prod'><a href='#' onclick=''><img src='../images/carrello.jpg' /></a></td>") Else Response.Write("<td class='altrow_prod'>" & RTrim(rdrArt("ARCODART")) & "</td>") Response.Write("<td class='altrow_prod'>" & RTrim(rdrArt("ARDESSUP")) & "</td>") Response.Write("<td class='altrow_prod' align='center'><a href='detprod.aspx?id=" & Trim(rdrArt("ARCODART")) & "'><img src='../images/lentet.gif' alt='Vedi dettaglio'/></a></td>") Response.Write("<td class='altrow_prod' align='right'>" & Format(CInt(rdrArt("DISPFIL")), "d") & "</td>") Response.Write("<td class='altrow_prod' align='right'>" & Format(CInt(rdrArt("DISP00")), "d") & "</td>") Response.Write("<td class='altrow_prod' align='right'><a class='link_arancio' href='inarrivo.aspx?ca=" & Trim(rdrArt("ARCODART")) & "' dir='ltr'>" & Format(CInt(rdrArt("SLQTOPER")), "d") & "</a></td>") Response.Write("<td class='altrow_prod' align='right'>" & Format(rdrArt("PRZNET"), "F") & "</td>") Response.Write("<td class='altrow_prod' align='right'><input type='text' style='width:30px' name='Qnt" & Trim(rdrArt("ARCODART")) & "' /></td>") Response.Write("<td class='row_prod'><a href='#' onclick=''><img src='../images/carrello.jpg' /></a></td>") End If NGiro += 1 ProgrElem += 1 Response.Write("</tr>") End While rdrArt.Close() cnnArt.Close() Response.Write("</table>") End While Response.Write("<input type='text' style='width:30px' name='TxtAppoggio' />") rdr.Close() cnn.Close() %> <br /><br />
Copyright © dotNetHell.it 2002-2023
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5