26-10-16, 11:57 PM
الله يسعدك يا ابو عمر ولا عدمناك يالغالي
هل ممكن تشرح لي الكود لأني ودي افهمه بصراحه ولا هنت
واهم شي عندي حساب التاريخ
Public Class Form1
Dim i As Double = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Test_mshDataSet.ber' table. You can move, or remove it, as needed.
Me.BerTableAdapter.Fill(Me.Test_mshDataSet.ber)
reads()
End Sub
Sub reads()
For i = 0 To BerDataGridView.Rows.Count - 2
BerDataGridView.Rows(i).Cells(4).Value = Val(BerDataGridView.Rows(i).Cells(3).Value) / Val(BerDataGridView.Rows(i).Cells(2).Value)
Dim df As Date = BerDataGridView.Rows(i).Cells(5).Value
df = df.ToString("yyyy/MM/dd")
Dim dn As Date = Now.ToString("yyyy/MM/dd")
BerDataGridView.Rows(i).Cells(6).Value = (DateDiff(DateInterval.Day, df, dn))
Next
End Sub
هل ممكن تشرح لي الكود لأني ودي افهمه بصراحه ولا هنت
واهم شي عندي حساب التاريخ
Public Class Form1
Dim i As Double = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Test_mshDataSet.ber' table. You can move, or remove it, as needed.
Me.BerTableAdapter.Fill(Me.Test_mshDataSet.ber)
reads()
End Sub
Sub reads()
For i = 0 To BerDataGridView.Rows.Count - 2
BerDataGridView.Rows(i).Cells(4).Value = Val(BerDataGridView.Rows(i).Cells(3).Value) / Val(BerDataGridView.Rows(i).Cells(2).Value)
Dim df As Date = BerDataGridView.Rows(i).Cells(5).Value
df = df.ToString("yyyy/MM/dd")
Dim dn As Date = Now.ToString("yyyy/MM/dd")
BerDataGridView.Rows(i).Cells(6).Value = (DateDiff(DateInterval.Day, df, dn))
Next
End Sub
بكم نرتقي ونسأل الله لنا ولكم التوفيق ،،

