Created
December 18, 2014 09:40
-
-
Save felixlindemann/29280e41ea7ef5167e66 to your computer and use it in GitHub Desktop.
Lime-tree Test 01: Default.aspx.vb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub calc() | |
Dim _return As String = "" | |
Try | |
Dim dbl As Double = CDbl(sugarlevel.Text) | |
Select Case cbolevel.SelectedValue | |
Case 2 | |
dbl *= 18.02 | |
_return = String.Format("{0} [mg/dl]", Format(dbl, "0.00")) | |
Case 1 | |
dbl /= 18.02 | |
_return = String.Format("{0} [mmol/l]", Format(dbl, "0.00")) | |
End Select | |
Catch ex As Exception | |
_return = "Bitte nur numerische Werte eingeben" | |
End Try | |
txtresult.Text = _return | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment