Professional Documents
Culture Documents
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the
following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function reserve(ByVal roomtype1 As String, ByVal roomtype2 As String, ByVal
sdate As Date, ByVal edate As Date) As Boolean
Dim r As Boolean
If roomtype1 = "delux" Or roomtype2 = "ordinary" Then
If sdate.Date.Day.ToString = "30" Or edate.Date.Day.ToString = "30" Then
r = False
Else
r = True
End If
End If
Return r
End Function
<WebMethod()> _
Public Function price(ByVal roomtype1 As String) As Double
Dim pr As Double
If roomtype1 = "delux" Then
pr = 5000
ElseIf roomtype1 = "A" Then
pr = 3000
ElseIf roomtype1 = "ordinary" Then
pr = 1000
End If
Return pr
End Function
<WebMethod()> _
Public Function desc() As String
Return " No one vegitarian hotel"
End Function
<WebMethod()> _
Public Function room() As String
Return "300 delux rooms,200 A class rooms and 100 ordinary rooms"
End Function
<WebMethod()> _
Public Function food() As String
Return "Both chinece,fast food varities are available"
End Function
End Class
‘Web Service Application
Imports localhost
Partial Class _Default
Inherits System.Web.UI.Page