29-10-17, 10:44 AM
PHP كود :
'أمر الانتقال الى السطر الأول
For Each DataGridView In DataGridView1.Rows
'Me.DataGridView1.CurrentRow.Cells(0).Value عمود الرصيد
'Me.DataGridView1.CurrentRow.Cells(1).Value عمود دائن/مدين
If Me.DataGridView1.CurrentRow.Cells(0).Value = 0 Then
Me.DataGridView1.CurrentRow.Cells(1).Value = ""
ElseIf Me.DataGridView1.CurrentRow.Cells(0).Value < 0 Then
Me.DataGridView1.CurrentRow.Cells(1).Value = "مدين"
Me.DataGridView1.CurrentRow.Cells(0).Value = Me.DataGridView1.CurrentRow.Cells(0).Value.Replace("-", "")
Else
Me.DataGridView1.CurrentRow.Cells(1).Value = "دائن"
End If
'أمر الانتقال الى السطر التالي
Next
'أمر الانتقال الى السطر الأول
لاكن لابد أن يكون هذا الجدول للعرض فقط، لأنك لو حفظت الجدول بهذه الحالة فسيكون جميع الأشخاص دائنين في المرة القادمة.
