Jump to content
Fórum Script Brasil
  • 0

Erro No Script Utilizando Classe

mestre fyoda



    Dim Total_Pedido, Total_Info

    Set Total_Pedido = New Pedido
    Set Total_Info = New InfoPedido

    Set Total_Info = Total_Pedido.TotalPedido( Session("num_ped"), Session("frete_pedido"))



Class Pedido

Function TotalPedido(ByVal num_ped, ByVal frete_pedido)

Dim Subtotal, Total

Set Pedido = con.Execute(" Select * from Pedido where COD_Pedido = '" & num_ped & "' ")

while not Pedido.Eof

Set Produto = con.Execute(" Select * from Produtos where COD_Produto = '" & Pedido("COD_Produto") &

"' ")

Subtotal = CDbl(Subtotal) + CDbl(Produto("VLR_Unitario")) * Cint(Pedido("QTD_Produto"))



Total = CDbl(Subtotal) + CDbl(frete_pedido)

End Function

End Class

Class InfoPedido

Public Subtotal

Public Total

End Class


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...