Imports System.Web.Services
Imports System.Data.SqlClient

<WebService(Namespace:="http://ChattyWays.com/")> _
Public Class GetChatUsers
        Inherits System.Web.Services.WebService

#Region "Developer Credits"
        '=======================================================================================
        'AUTHOR                  : David Silverlight
        '
        'CLAIM TO FAME      : Head Geek at XMLPitstop.com and CoFounder of NonProfitWays.com
        '
        'EMAIL                      : HeadGeek@XMLPitstop.com
        '
        'SHAMELESS PLUG  :Yes I am a consultant who is always looking for cool projects.
        '
        'PHONE                    : (561) 212-5707  Coconut Grove, Florida
        '
        'COPYWRIGHT		: This demo is not copywrighted so feel free to use it however it may help you.  Credit is always appreciated,
        '                                  but not required.  I created it simply for the learning experience. If you have any suggestions on areas that 
        '                                  can be improved upon, please feel free to email me.  All credit for enhancements will be given to 
        '                                  those who suggest them.  Enjoy.
        '=======================================================================================
#End Region

#Region " Web Services Designer Generated Code "

        Public Sub New()
                MyBase.New()

                'This call is required by the Web Services Designer.
                InitializeComponent()

                'Add your own initialization code after the InitializeComponent() call

        End Sub

        'Required by the Web Services Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Web Services Designer
        'It can be modified using the Web Services Designer.  
        'Do not modify it using the code editor.
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
                components = New System.ComponentModel.Container()
        End Sub

        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
                'CODEGEN: This procedure is required by the Web Services Designer
                'Do not modify it using the code editor.
                If disposing Then
                        If Not (components Is Nothing) Then
                                components.Dispose()
                        End If
                End If
                MyBase.Dispose(disposing)
        End Sub

#End Region


        <WebMethod()> Public Function doGetChatUsers(ByVal strChatID As String) As DataSet

                Dim objChatBLL As New Chat_BLL()
                Dim intChatID As Integer = IIf(Trim(strChatID) = "", 0, CInt(strChatID))

                'Return a dataset containing the users of the given Chat ID
                Return objChatBLL.get_ChatUsers(intChatID)


        End Function

End Class
