1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
For i = 0 To Me.DataGridView1.RowCount - 1
Dim row As DataGridViewRow = Me.DataGridView1.Rows(i)
If TextBox1.Text = Me.DataGridView1.Rows(i).Cells(0).Value Then
optexist = True
End If
Next i
If optexist = False Then
Dim tot, tat As Decimal
'Me.TextBox16.Text = Val(Me.TextBox16.Text) + Val(Me.TextBox5.Text)
tot = Val(Me.TextBox16.Text)
tat = Val(Me.TextBox5.Text)
Me.TextBox16.Text = tat + tot
Dim Ligne = New String() {Me.TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text, Me.TextBox4.Text, Me.TextBox5.Text, Me.txtstkavant.Text, Me.txtFinal.Text, Me.TextBox14.Text, Me.TextBox15.Text}
Me.DataGridView1.Rows.Add(Ligne)
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = ""
Me.txtstkavant.Text = ""
Me.txtFinal.Text = ""
Me.TextBox14.Text = ""
Me.TextBox15.Text = ""
'optexist = Nothing
Else
MsgBox("Ce produit a été déjà servi...")
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = ""
Me.txtstkavant.Text = ""
Me.txtFinal.Text = ""
Me.TextBox14.Text = ""
Me.TextBox15.Text = ""
optexist = False
End If
'Me.TextBo |
Partager