How to send data to mc_issue_add from vb.net

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
soumya1092
Posts: 1
Joined: 02 Jun 2016, 10:39

How to send data to mc_issue_add from vb.net

Post by soumya1092 »

How do I send data from vb.net to mc_issue_add. The pre-defined function is as follows:

Code: Select all

Function mc_issue_add(ByVal username As String, ByVal password As String, ByVal issue As mantistest.IssueData) As <System.ServiceModel.MessageParameterAttribute(Name:="return"), System.Xml.Serialization.SoapElementAttribute(DataType:="integer")> String
My code :

Code: Select all

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim value1 As String
    Dim value2 As String
    Dim value3 As String
    Dim value4 As String
    'Dim req As Net.HttpWebRequest
    Dim mantNote As IssueData

    value1 = Project_Name.SelectedItem.ToString()
    value2 = ComboBox2.SelectedItem.ToString()
    value3 = ComboBox3.SelectedItem.ToString()
    value4 = TextBox4.Text
    Dim s As String = String.Format("Value 1: {0}  value2 : {1} value3: {2} value4: {3}", value1, value2, value3, value4)
    Windows.Forms.MessageBox.Show(s)

    'Console.WriteLine("View_State:{0} Project:{1} Category{2} Priority{3} Severity{4} Status{5} reporter{6}", 10, 1, "test", "low", 1, 90, "administrator", "", 1, "28/05/2016", "administrator", "administrator")

    'Dim issueVar = method.Invoke(s, New Object() {10, 1, "test", "low", 1, 90, "administrator", " ", 1, "26/05/2016", "administrator", "administrator"})

    mantNote.view_state = ObjectRef.Equals(10)
    mantNote.date_submittedSpecified = True

    TextBox1.Text = QService.mc_issue_add(username:="**", password:="**", issue:=mantNote)

End Sub
Where have I gone wrong / what is the issue? I tried changing the function definition but that gives more errors.

Thanks
rombert
Posts: 66
Joined: 05 Nov 2009, 08:43

Re: How to send data to mc_issue_add from vb.net

Post by rombert »

What is the exact error that you get?
Jon albert
Posts: 1
Joined: 01 Sep 2016, 09:21

Re: How to send data to mc_issue_add from vb.net

Post by Jon albert »

[color=#000000]soumya1092s[/color] wrote:How do I send data from vb.net to mc_issue_add. The pre-defined function is as follows:

Code: Select all

Function mc_issue_add(ByVal username As String, ByVal password As String, ByVal issue As mantistest.IssueData) As <System.ServiceModel.MessageParameterAttribute(Name:="return"), System.Xml.Serialization.SoapElementAttribute(DataType:="integer")> String
My code :

Code: Select all

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim value1 As String
    Dim value2 As String
    Dim value3 As String
    Dim value4 As String
    'Dim req As Net.HttpWebRequest
    Dim mantNote As IssueData

    value1 = Project_Name.SelectedItem.ToString()
    value2 = ComboBox2.SelectedItem.ToString()
    value3 = ComboBox3.SelectedItem.ToString()
    value4 = TextBox4.Text
    Dim s As String = String.Format("Value 1: {0}  value2 : {1} value3: {2} value4: {3}", value1, value2, value3, value4)
    Windows.Forms.MessageBox.Show(s)

    'Console.WriteLine("View_State:{0} Project:{1} Category{2} Priority{3} Severity{4} Status{5} reporter{6}", 10, 1, "test", "low", 1, 90, "administrator", "", 1, "28/05/2016", "administrator", "administrator")

    'Dim issueVar = method.Invoke(s, New Object() {10, 1, "test", "low", 1, 90, "administrator", " ", 1, "26/05/2016", "administrator", "administrator"})

    mantNote.view_state = ObjectRef.Equals(10)
    mantNote.date_submittedSpecified = True

    TextBox1.Text = QService.mc_issue_add(username:="**", password:="**", issue:=mantNote)


End Sub
Where have I gone wrong / what is the issue? I tried changing the function definition but that gives more errors.

Thanks
I was getting same problem but after re-configuring all values it works fine now!
Post Reply