تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
اريد تعديل الكود ليعمل على صف فى داتا جريد
#1
السلام عليكم 

اريد تعديل الكود ليعمل لوب  ويتم الحساب على العمود كله مرة واحدة 
كود :
  Dim TotalMinit As Integer = 0
       Dim TotalHour As Integer = 0
       'DataGridView1(4, DataGridView1.CurrentRow.Index).Value = txtTimeIN.Text


       TotalMinit = DateDiff(DateInterval.Minute, DataGridView1(3, DataGridView1.CurrentRow.Index).Value, DataGridView1(4, DataGridView1.CurrentRow.Index).Value) ' حساب الفرق بالساعة بين الحضور والانصراف

       If TotalMinit > 59 Then
           TotalHour += Math.Floor(TotalMinit / 60)
           TotalMinit = TotalMinit Mod 60
           Dim TotalTime As String = TotalHour.ToString("00") & ":" & TotalMinit.ToString("00")
           DataGridView1(5, DataGridView1.CurrentRow.Index).Value = TotalTime

       Else
           DataGridView1(5, DataGridView1.CurrentRow.Index).Value = "00:" & TotalMinit.ToString("00")
           'DataGridView1(5, DataGridView1.CurrentRow.Index).Value = Format("h:mm tt")
       End If
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
اريد تعديل الكود ليعمل على صف فى داتا جريد - بواسطة new_programer - 26-11-21, 04:26 AM


التنقل السريع :


يقوم بقرائة الموضوع: