12-09-20, 11:14 AM
PHP كود :
If Txt_CutomerName.Text = "" Or Txt_DebtValue.Text = "" Or Txt_MonthCount.Text = "" Then
MSGASEM_XT("الرجاء ملاْ جميع القول و شكراً", "خطأ", SystemIcons.Error)
Exit Sub
End If
Dim sum1 As Double = 0
Dim sum2 As Double = 0
Dim sum3 As Double = 0
Dim sum4 As Double = 0
Dim sum5 As Double = 0
DataGridView1.Rows.Clear()
For i = 1 To CInt(Txt_MonthCount.Text)
sum5 += 1
DataGridView1.Rows.Add(Txt_CustomerID.Text, DateTimePicker1.Value.AddMonths(sum5), Txt_DebtValue.Text, Val(Txt_DebtValue.Text * Cmb_FaedaPersent.Text / Txt_MonthCount.Text), Val(Txt_DebtValue.Text / Txt_MonthCount.Text) + Val(Txt_DebtValue.Text * Cmb_FaedaPersent.Text / Txt_MonthCount.Text), 0, False, ID_INV)
Next
sum4 = Txt_DebtValue.Text + Val(Txt_DebtValue.Text * Cmb_FaedaPersent.Text)
For Each row As DataGridViewRow In DataGridView1.Rows
If row.IsNewRow Then Continue For
sum1 = sum4
sum2 += row.Cells(4).Value
sum3 = sum1 - sum2
row.Cells(2).Value = sum3
Next
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
