Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/11/2006, 12:48
MaveriK.j
 
Fecha de Ingreso: noviembre-2006
Mensajes: 5
Antigüedad: 18 años, 5 meses
Puntos: 0
esta es la pagina k donde se compra la anterior es k muestra depsues espero k entre entera
<!--#include file="include.asp" -->
<!--#include file="../inc/Funciones.asp" -->
<%
Response.AddHeader "PRAGMA", "NO-CACHE"
Response.Expires = 0
Response.Buffer = True

dbcod=request.QueryString("dbcodigo")
If dbcod=empty then
dbcod=request.queryString("dbCoCat")
End if
Set rsCategoria=MyBase.Execute("Select CategoriaNombre from Categoria where CategoriaCodigo=" & dbCod)
If not rsCategoria.Eof then
txtCategoriaNombre=rsCategoria("CategoriaNombre")
End If
If not request.Form("txtPrecios") = Empty then
dbcod=Request.Form("dbCodigoCategoria")
Response.redirect("ListaPrecios.asp?dbCodigo="&dbc od)
End If
sw=0
If not Request.Form("txtAgregar")=Empty then
dbCodPro=split(request.form("dbcodigoproducto"),", ")
dbcantidad=split(request.form("Menus"),",")

dbCategoria=Request.Form("dbCodigoCategoria")
For i = LBound(dbcantidad) To UBound(dbcantidad)
If not len(Trim(dbcantidad(i))) = 0 then
If dbcantidad(i) > 0 Then
sw=1
Else
sw=1
End If
End If
Next
If sw = 1 then
txtVolver=1
dbCodPro=join(dbCodPro,",")
dbcantidad=join(dbcantidad,",")
Response.Redirect("agrega.asp?txtVolver="&txtVolve r&"&dbCategoria="&dbCategoria &"&dbcodigoproducto="&dbCodPro&"&dbcantidadele="&d bcantidad &"")
ElseIf sw=2 then
Mensaje="La Cantidad debe ser mayor a 0"
End If
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> SISTEMA DE COTIZACION SCOUT </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var celda_ant;
celda_ant="";
function ilumina(celda){
if (celda_ant=="")
{
celda_ant = celda;
}
celda_ant.style.backgroundColor="";
celda.style.backgroundColor="#F7FBF4";
celda_ant = celda;
}
//-->
</SCRIPT>
</HEAD>
<link href="../inc/Central.css" rel="stylesheet" type="text/css">
<link href="../inc/estilo.css" rel="stylesheet" type="text/css">
<BODY Bgcolor="" BACKGROUND="" alink="#336600" vlink="#0000FF">
<FORM METHOD=POST name="frmFormulario" ACTION="">
<table border="0" align="center" class="TablaBase">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td>
<TABLE width="100%" Border="0" cellpadding="0" cellspacing="0" bordercolor="#158A32">
<tr>
<td width="17" nowrap class="TituloIzq"></td>
<td class="Titulo"><%=txtCategoriaNombre%></td>
<td width="14" nowrap class="TituloDer"></td>
</tr>
</TABLE> </td>
</tr>
<tr>
<td><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="Tabla">
<tr>
<td width="400" valign="middle" class="Titulo2">Producto</td>
<td width="120" valign="middle" class="Titulo2">Valor Unitario</td>
<td width="80" valign="middle" class="Titulo2">Stock</td>
<td width="80" valign="middle" class="Titulo2">Cantidad</td>
<td width="150" valign="middle" class="Titulo2F">Detalle</td>
<td width="150" valign="middle" class="Titulo2F">&nbsp;</td>
</tr>
<%
strSQL="select Producto.productocodigo, producto.productoNombre, producto.productovalor, producto.productoImagen, Producto.ProductoStock from Producto where Producto.CategoriaCodigo = " & dbcod & " and Producto.ProductoStock > 0 and Producto.ProductoMostrarTV = 1 order by PRODUCTO.ProductoNombre"
Set rsListarPro = MyBase.execute(strSQL)
If Not rsListarPro.Eof Then
Do While Not rsListarPro.Eof
%>
<tr onMouseOver="ilumina(this)">
<td class="Fila1"><div align="left"><%=PrimeraMayuscula(rsListarPro("Prod uctoNombre"))%></div></td>
<%
If len(rsListarPro("productovalor"))>3 then
dbcentena=mid(strreverse(rsListarPro("productovalo r")),1,3)
dbmiles=mid(strreverse(rsListarPro("productovalor" )),4,3)
dbProductoValor=strreverse(dbmiles) & "." & strreverse(dbcentena)
Else
dbProductoValor=rsListarPro("productovalor")
dbProductoStock=rsListarPro("ProductoStock")

End if
%>
<td class="Fila1">$<%=dbProductoValor%></td>
<td class="Fila1"><%=dbProductoStock%></td>
<input type="hidden" value="<%=dbProductoStock%>" name="Stocks">
<td class="Fila1"><input type="hidden" value="<%=rsListarPro("productocodigo")%>" name="dbcodigoproducto">
<!-- <input type="List" name="dbCantidadele" size="5" maxlength="5"> -->
<%
ListStock=0
Do while dbProductoStock = ListStock
ListStock = ListStock +1
%>

<% Loop %>
<select name="Menus" >
<%

for w = empty to dbProductoStock

%>
<option value=<%=w%>><%=w%>
<% next %>
</select>
<SCRIPT LANGUAGE="JavaScript">alert("<%=Menus%>")</SCRIPT>






</td>


<td class="Fila1F"><a href="#" onClick="javascript:window.open('DetalleProducto.a sp?dbCodigopro=<%=rsListarPro("ProductoCodigo")%>' ,'Detalle','toolbar=0, resizable=1, scrollbars=0, menubar=0, status=0, directories=0, top=100,left=100,width=400,height=400')">Detalles Producto</a> </td>
<td class="Fila1F"><%
rsListarPro.Movenext
loop
%>
<%

%>





<%



Set rsListarProx = MyBase.execute(strSQL)
If Not rsListarProx.Eof Then
Do While Not rsListarProx.Eof
Stockrevi=rsListarProx("ProductoNombre")
canti=request.form("dbcantidadele")

For Each n in Request.Form("dbcantidadele")
Mensaje=n & "<br>"
Next


'If Stockrevi = canti then
' response.Redirect("PopUp2.asp")
' Else
' mensajito="no funko"
'end if
%>


</td>
<%
rsListarProx.Movenext
loop
end if
%>
</tr>



</table></td>
</tr>
<tr>
<td class="Error"><%=Mensaje%></td>

</tr>
<tr>
<td class="Fila1F">
<INPUT TYPE="submit" name="txtAgregar" value="Agregar" class="Boton">
<INPUT TYPE="submit" name="txtPrecios" value="Lista de Precios" class="Boton">
<INPUT TYPE="hidden" name="dbCodigoCategoria" value="<%=dbcod%>"> </td>
</tr>
<%
Else
%>
<tr>
<td class="Fila1F">
EN ESTOS MOMENTOS NO SE ENCUENTRAN DISPONIBLES PRODUCTOS CON ESTA CATEGORIA </td>
</tr>
<%
End if
%>
</table>
</td>
</tr>
</table>
<span class="Fila1"></span>
</Form>
<%

MyBase.close
set MyBase=nothing
%>
</BODY>
</HTML>

Aki habia un validacion cuando era 0 pero como ahora lo ago con list no puedo validarlo pk los manda haci 1,0,6
sorry x lo enrredado