28-04-21, 12:55 AM
(آخر تعديل لهذه المشاركة : 28-04-21, 12:56 AM {2} بواسطة asdfar1977.)
(27-04-21, 10:14 PM)messry كتب : السلام عليكم
حاول التالي
كود :
Dim tot_d_ As String = 0
Dim tot_c_ As String = 0
Dim dif_ As String = 0
For i As Integer = 0 To DGV.Rows.Count - 1
If DGV.Rows(i).Cells(1).Value <> Nothing Then
tot_d_ = Val(tot_d_) + Val(DGV.Rows(i).Cells(4).Value)
tot_c_ = Val(tot_c_) + Val(DGV.Rows(i).Cells(5).Value)
dif_ = Val(tot_d_) - Val(tot_c_)
End If
Text_total_debit.Text = val(tot_d_)
Text_total_credit.Text = val(tot_c_)
Text_difference.Text = val(dif_)
Next
الف شكر اخى الكريم messry

