Escolar Documentos
Profissional Documentos
Cultura Documentos
preco = Me.ESTOQUEDataGridView.CurrentRow.Cells(10).Value
qtd = Quantidadetxt.Text
vltot = preco * qtd
Try
I =
ListView1.Items.Add(Me.ESTOQUEDataGridView.CurrentRow.Cells(0).Value)
I.SubItems.Add(Me.ESTOQUEDataGridView.CurrentRow.Cells(1).Value)
I.SubItems.Add(Me.ESTOQUEDataGridView.CurrentRow.Cells(3).Value & "
" & Me.ESTOQUEDataGridView.CurrentRow.Cells(4).Value & " " &
Me.ESTOQUEDataGridView.CurrentRow.Cells(7).Value)
I.SubItems.Add(Me.ESTOQUEDataGridView.CurrentRow.Cells(10).Value)
I.SubItems.Add(Quantidadetxt.Text)
I.SubItems.Add(vltot)
Catch ex As Exception
MsgBox("erro ao tentar adiconar produto!", vbCritical)
End Try
End If
contitens = ListView1.Items.Count
lblqtditens.Text = contitens & " Itens no carrinho"
End Try
contitens = ListView1.Items.Count
lblqtditens.Text = contitens & " Itens no carrinho"
End If
increment = Quantidadetxt.Text
If increment > 0 Then
increment = increment + 1
Quantidadetxt.Text = increment
___________________________________________________________________________________
_____
BTDW
discrement = Quantidadetxt.Text
If discrement = Me.ESTOQUEDataGridView.CurrentRow.Cells(18).Value Then
lblqtdestoq.Text = "Quantidade"
lblqtdestoq.ForeColor = Color.Black
End If
If discrement < 2 Then
discrement = 0
Quantidadetxt.Text = discrement
Exit Sub
Else
discrement = Quantidadetxt.Text
discrement = discrement - 1
Quantidadetxt.Text = discrement
End If
___________________________________________________________________________________
______
LBLIMITE
If Integer.Parse(Quantidadetxt.Text) =
Me.ESTOQUEDataGridView.CurrentRow.Cells(18).Value Then
lblqtdestoq.Text = "Limite"
lblqtdestoq.ForeColor = Color.Red
lblqtdestoq.Visible = True
Quantidadetxt.Text =
Convert.ToString(Me.ESTOQUEDataGridView.CurrentRow.Cells(18).Value)
End If
___________________________________________________________________________________
___
BTCANCEL
If Integer.Parse(Quantidadetxt.Text) =
Me.ESTOQUEDataGridView.CurrentRow.Cells(18).Value Then
lblqtdestoq.Text = "Limite"
lblqtdestoq.ForeColor = Color.Red
lblqtdestoq.Visible = True
Quantidadetxt.Text =
Convert.ToString(Me.ESTOQUEDataGridView.CurrentRow.Cells(18).Value)
End If
___________________________________________________________________________________
______________________________
WHILE EXEMPLO
Me.BuscaTableAdapter.DeleteQuerybusca(Me.BuscaDataGridView.CurrentRow.Cells(0).Valu
e)
Me.BuscaTableAdapter.Update(Database1DataSet.busca)
Me.BuscaTableAdapter.Fill(Database1DataSet.busca)
End While
Me.BuscaTableAdapter.Update(Database1DataSet.busca)
Me.BuscaTableAdapter.Fill(Database1DataSet.busca)
TextBox1.Text = Me.BuscaDataGridView.RowCount