31-12-18, 10:47 PM
For i As Integer = 0 To DataGridVi.Rows.Count - 1
DataGridVi.Rows(i).Cells(5).Value = TextBox1.Text
If DataGridVi(5, DataGridVi.Rows(i).Index).Value > 0 Then
Dim a As Integer = DataGridVi.Rows(i).Cells(5).Value
Dim cmdup As New OleDb.OleDbCommand
With cmdup
.Connection = con
.CommandType = CommandType.Text
.CommandText = "update salhos set t=t- " & a & " where id = " & DataGridVi.Rows(i).Cells(0).Value & " "
con.Open()
cmdup.ExecuteNonQuery()
con.Close()
End With
End If
Next
السلام عليكم شباب ان استعملت هذه الكود لكين المشكلة انه يسترجع من جميع اعمدة الكمية وكذالك تكون الاضافة في جميع اعمدة الكمية في المخزن
DataGridVi.Rows(i).Cells(5).Value = TextBox1.Text
If DataGridVi(5, DataGridVi.Rows(i).Index).Value > 0 Then
Dim a As Integer = DataGridVi.Rows(i).Cells(5).Value
Dim cmdup As New OleDb.OleDbCommand
With cmdup
.Connection = con
.CommandType = CommandType.Text
.CommandText = "update salhos set t=t- " & a & " where id = " & DataGridVi.Rows(i).Cells(0).Value & " "
con.Open()
cmdup.ExecuteNonQuery()
con.Close()
End With
End If
Next
السلام عليكم شباب ان استعملت هذه الكود لكين المشكلة انه يسترجع من جميع اعمدة الكمية وكذالك تكون الاضافة في جميع اعمدة الكمية في المخزن
