B
Bajtitou
Guest
Hi,
This is de code ,it is working very Well.
Private Sub ShowALLDataPontes()
Dgf3.DataSource = opsd.ALLDataPontes()
Dgf3.ExpandColumns()
For i As Integer = 0 To Dgf3.Rows.Count - 1 - 1
Sum += Convert.ToInt32(Dgf3.Rows(i).Cells(4).Value)
Sum1 += Convert.ToInt32(Dgf3.Rows(i).Cells(5).Value)
Sum2 += Convert.ToInt32(Dgf3.Rows(i).Cells(6).Value)
Sum3 += Convert.ToInt32(Dgf3.Rows(i).Cells(11).Value)
Next
Dgf3("EnPonte", Dgf3.Rows.Count - 1).Value = Sum
Dgf3("Couvant", Dgf3.Rows.Count - 1).Value = Sum1
Dgf3("Eclos", Dgf3.Rows.Count - 1).Value = Sum2
Dgf3("ŒufsPondus", Dgf3.Rows.Count - 1).Value = Sum3
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.BackColor = Color.YellowGreen
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.ForeColor = Color.Black
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.Font = New Font("Segoe UI", 9, (FontStyle.Bold))
End Sub
Private Sub btnLoad_Click(sender As Object, e As EventArgs) Handles btnLoad.Click
ShowALLDataPontes()
End Sub
But there is a small problem.
If I click a second time on the load button, the result of the calculation is multiplied by 2,
So how to stop the calculation if I click a second time or more on the loading button?
Thank you very Much .
Best Regards.
Continue reading...
This is de code ,it is working very Well.
Private Sub ShowALLDataPontes()
Dgf3.DataSource = opsd.ALLDataPontes()
Dgf3.ExpandColumns()
For i As Integer = 0 To Dgf3.Rows.Count - 1 - 1
Sum += Convert.ToInt32(Dgf3.Rows(i).Cells(4).Value)
Sum1 += Convert.ToInt32(Dgf3.Rows(i).Cells(5).Value)
Sum2 += Convert.ToInt32(Dgf3.Rows(i).Cells(6).Value)
Sum3 += Convert.ToInt32(Dgf3.Rows(i).Cells(11).Value)
Next
Dgf3("EnPonte", Dgf3.Rows.Count - 1).Value = Sum
Dgf3("Couvant", Dgf3.Rows.Count - 1).Value = Sum1
Dgf3("Eclos", Dgf3.Rows.Count - 1).Value = Sum2
Dgf3("ŒufsPondus", Dgf3.Rows.Count - 1).Value = Sum3
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.BackColor = Color.YellowGreen
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.ForeColor = Color.Black
Dgf3.Rows(Dgf3.Rows.Count - 1).DefaultCellStyle.Font = New Font("Segoe UI", 9, (FontStyle.Bold))
End Sub
Private Sub btnLoad_Click(sender As Object, e As EventArgs) Handles btnLoad.Click
ShowALLDataPontes()
End Sub
But there is a small problem.
If I click a second time on the load button, the result of the calculation is multiplied by 2,
So how to stop the calculation if I click a second time or more on the loading button?
Thank you very Much .
Best Regards.
Continue reading...