Hi all,

I have an application in Visual Studio 20013 called H2U(Hotel Management System). And another application called Interface in Visual Studio 2013. Interface is a send & receive network packets application.

Now when the check in button is clicked in H2U, a result string should be sent to Interface. Eg: Interface should receive the result and says this in the log "receive request from IpTV". I have written the code in H2U to generate the result string when check in button is clicked. But I don't know how to send the result to Interface application. The Interface application has IP Address Column, where the H2U IP address will be linked to the Interface column. So how to transfer the result between these 2 application. Kindly Help me. The result string is as below in H2U :

Code:
Public Function PostToInterface(ByVal ReservNo As String) As String
        Dim SQL As String
        Dim cmd As SqlCommand
        Dim Con As New SqlConnection(ConnStr)
        Dim result As String
        Dim BDate As String = Format(Now(), "yyMMdd")
        Dim BTime As String = Format(Now(), "HHmmss")

 SelectSTR = "SELECT Reservation.ReservationNo, CONVERT(varchar, Reservation.ArrivalDate, 12) As ArrivalDate,       Reservation.GuestName, Reservation.VIPStatus, RoomNo.RoomNumber, Salutation.Salutation, "
        SelectSTR += "GroupMaster.GroupID, Language.Language From Reservation "
        SelectSTR += "LEFT OUTER JOIN RoomNo ON RoomNo.RoomID = Reservation.RoomID "
        SelectSTR += "LEFT OUTER JOIN Salutation ON Reservation.SalutationID = Salutation.SalutationID "
        SelectSTR += "LEFT OUTER JOIN GroupMaster ON Reservation.GroupID = GroupMaster.GroupID "
        SelectSTR += "LEFT OUTER JOIN Language ON Reservation.LanguageID = Language.LanguageID "
        SelectSTR += "WHERE Reservation.Status = 'Registered' "
        SelectSTR += "AND Reservation.ReservationNo = '" & ReservNo & "'"
        Con.Open()
        cmd = New SqlCommand(SelectSTR, Con)
        Dim dr As SqlDataReader = cmd.ExecuteReader()
        While dr.Read()
            result = "GI|RN" & dr("RoomNumber") & "|" & "G#" & dr("ReservationNo") & "|" & "GS" & "N" & "|" & "GF" & "" & "|" &              "GN" & dr("GuestName") & "|" & "GL" & dr("Language") & "|" & "GG" & dr("GroupID") & "|" & "GT" & dr("Salutation")                & "|" & "GV0" & "|" & "NP" & "N" & "|" & "GA" & dr("ArrivalDate") & "|" & "DA" & BDate & "|" & "TI" & BTime & "|" &                  "SF" & "" & "|"
        End While
        dr.Close()
        cmd.Dispose()
        Con.Close()

    //Now I must pass the result to Interface
    End Function