Conversion different unit webservice code in ASP



App_Code Service_web


Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
     Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function HelloWorld() As String
        Return "Hello World"
    End Function
    <WebMethod()> _
    Public Function cel_to_fer(ByVal c As Single) As Single
        Dim f As Single
        f = ((c * 9) / 5) + 32
        Return f
    End Function

    <WebMethod()> _
    Public Function fer_to_cel(ByVal f As Single) As Single
        Dim c As Single
        c = ((f - 32) * 5) / 9
        Return c
    End Function


    <WebMethod()> _
   Public Function cm_to_mtr(ByVal cm As Single) As Single
        Dim mtr As Single
        mtr = (cm / 100)
        Return mtr
    End Function

    <WebMethod()> _
   Public Function mtr_to_cm(ByVal mtr As Single) As Single
        Dim cm As Single
        cm = (mtr * 100)
        Return cm
    End Function

    <WebMethod()> _
   Public Function mtr_to_km(ByVal mtr As Single) As Single
        Dim km As Single
        km = (mtr / 1000)
        Return km
    End Function

    <WebMethod()> _
   Public Function km_to_mtr(ByVal km As Single) As Single
        Dim mtr As Single
        mtr = (km * 1000)
        Return mtr
    End Function

    <WebMethod()> _
   Public Function gm_to_kg(ByVal gm As Single) As Single
        Dim kg As Single
        kg = (gm * 0.001)
        Return kg
    End Function

    <WebMethod()> _
   Public Function kg_to_gm(ByVal kg As Single) As Single
        Dim gm As Single
        gm = (kg * 1000)
        Return gm
    End Function

    <WebMethod()> _
   Public Function foot_to_inch(ByVal foot As Single) As Single
        Dim inch As Single
        inch = foot * 12
        Return inch
    End Function

    <WebMethod()> _
   Public Function inch_to_foot(ByVal inch As Single) As Single
        Dim foot As Single
        foot = 12 / inch
        Return foot
    End Function

    <WebMethod()> _
   Public Function ton_to_quintal(ByVal ton As Single) As Single
        Dim quintal As Single
        quintal = (ton * 10)
        Return quintal
    End Function

    <WebMethod()> _
   Public Function quintal_to_ton(ByVal quinatal As Single) As Single
        Dim ton As Single
        ton = quinatal / 10
        Return ton
    End Function

End Class

 
Conversion different unit webservice code in ASP Conversion different unit webservice code in ASP Reviewed by Unknown on 8:09 pm Rating: 5

No comments: