Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / Visual Basic

VB6 Hybrid Application Architecture

Rate me:
Please Sign up or sign in to vote.
4.84/5 (11 votes)
4 Jul 20073 min read 73.7K   2.3K   48  
An article on Interop Forms TookKit 2.0
Public Class Incident

    Public Function Create(ByVal ConnectionSettings As CrmHelper, ByVal CaseName As String) As GenericEntity
        Dim crm As New CrmService.sugarsoap
        Dim auth As New CrmService.user_auth
        auth.user_name = ConnectionSettings.crmUserId
        auth.password = ConnectionSettings.crmPassword
        auth.version = ConnectionSettings.crmVer
        crm.Url = ConnectionSettings.crmURL

        Dim ReturnObject As New GenericEntity
        Try
            Dim test As String = crm.test("test")
            Dim a As Object = crm.login(auth, "SoapTest")
        Catch ex As Exception
            ReturnObject.IsError = True
            ReturnObject.Message = "Connection to SugarCrm was unsuccessfull"
            Return ReturnObject
        End Try

        Try
            Dim caseid As String = crm.create_case(ConnectionSettings.crmUserId, ConnectionSettings.crmPassword, CaseName)

            ReturnObject.Message = "Case created in SugarCrm with CaseID - " + caseid
            Return ReturnObject
        Catch ex As Exception
            ReturnObject.IsError = True
            ReturnObject.Message = "Unable to create case in SugarCrm ErrorDetails - " + ex.Message
            Return ReturnObject
        End Try

    End Function

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions