[C# - SQL] arrondir un prix (sans virgule)!
hbhh
-
hbhh -
hbhh -
Bonjour,
Je travaille en C# et dans mon SQL, mon champs "prix" contient des valeurs avec 2 chiffres après la virgule ( ,00 )
J'aimerais afficher les prix sans virgule.
J'ai cette fonction en VB.NET (qui fonctionne super bien!)
Public Function Forme(ByVal ztxt As String) As String
Dim zstrT As String()
If ztxt <> "" Then
If InStr(ztxt, ",") Then
zstrT = Split(ztxt, ",")
If zstrT(1) = "00" Then ztxt = zstrT(0)
End If
If (Val(ztxt) = 0) Then
ztxt = "NC"
End If
Return ztxt
End Function
Je voudrais la même en C# :$
ou alors un moyen de modifier le prix directement dans la requete SQL!
merci d'avance! ;)
Je travaille en C# et dans mon SQL, mon champs "prix" contient des valeurs avec 2 chiffres après la virgule ( ,00 )
J'aimerais afficher les prix sans virgule.
J'ai cette fonction en VB.NET (qui fonctionne super bien!)
Public Function Forme(ByVal ztxt As String) As String
Dim zstrT As String()
If ztxt <> "" Then
If InStr(ztxt, ",") Then
zstrT = Split(ztxt, ",")
If zstrT(1) = "00" Then ztxt = zstrT(0)
End If
If (Val(ztxt) = 0) Then
ztxt = "NC"
End If
Return ztxt
End Function
Je voudrais la même en C# :$
ou alors un moyen de modifier le prix directement dans la requete SQL!
merci d'avance! ;)
A voir également:
- [C# - SQL] arrondir un prix (sans virgule)!
- Réclamez votre prix ✓ - Forum Vos droits sur internet
- Historique prix amazon - Guide
- Prix réparation rétroéclairage tv led - Forum TV & Vidéo
- Écran tv cassé réparation prix - Forum TV & Vidéo
- Prix d'un appel local - Forum Mobile