i got bit calculate coding..
i want make my output be double like 100.30(this is double?)
the calculate data is from database.
i want the result at lblPremiumJP.Text be double
anyone can help me?
Private Sub cmbPremium_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPremium.SelectedIndexChanged
con.Open()
sqlPremium = "SELECT * FROM KadarPremium"
da = New OleDb.OleDbDataAdapter(sqlPremium, con)
da.Fill(ds, "KadarPremium")
With ds.Tables("KadarPremium").Rows(cmbPremium.SelectedIndex)
Select Case cmbPelan.Text
Case (1)
lblPremium.Text = .Item("20TP1")
Case (2)
lblPremium.Text = .Item("20TP2")
Case (3)
lblPremium.Text = .Item("20TP3")
Case (4)
lblPremium.Text = .Item("20TP4")
Case (5)
lblPremium.Text = .Item("20TP5")
Case (6)
lblPremium.Text = .Item("20TP6")
Case (7)
lblPremium.Text = .Item("20TP7")
Case Else
'whatever you want to do here
End Select
If cmbJPembayaran.Text = "Bulanan" Then
lblPremiumJP.Text = lblPremium.Text \ 12
ElseIf cmbJPembayaran.Text = "3 Bulan" Then
lblPremiumJP.Text = (lblPremium.Text \ 12) * 3
ElseIf cmbJPembayaran.Text = "6 Bulan" Then
lblPremiumJP.Text = lblPremium.Text \ 2
Else
'whatever
End If
End With
con.Close()
End Sub
sorry my english bad.*