no overload for method takes 2 arguments
I tested Navision webservices with WebFormAppi But....
Error on this line (no overload for method takes 2 arguments) : label1.Text = MyGlavaImport.ImportGlavaNew(ref, MyRoothElement);
Thanks for help
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyTestNet
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string[] strArray = new string[1] { "kkk"};
ImportGlavaCU.MyImportGlava MyGlavaImport = new ImportGlavaCU.MyImportGlava();
MyGlavaImport.UseDefaultCredentials = true;
MyGlavaImport.Url = "http://win2003navision:7047/DynamicsNAV/ws/Codeunit/MyImportGlava";
ImportGlavaCU.RooetElement MyRoothElement = new ImportGlavaCU.RooetElement();
List<ImportGlavaCU.GlavaTabelaElement> GLLIST = new List<ImportGlavaCU.GlavaTabelaElement>();
ImportGlavaCU.GlavaTabelaElement GlavaHE = new ImportGlavaCU.GlavaTabelaElement();
GlavaHE.GlavaPoljefield = strArray[0];
GLLIST.Add(GlavaHE);
MyRoothElement.GlavaTabelaElement = GLLIST.ToArray();
try
{
label1.Text = MyGlavaImport.ImportGlavaNew(ref, MyRoothElement);
}
catch (Exception ex)
{
label1.Text = ex.ToString();
}
}
}
}
Re: no overload for method takes 2 arguments
It depends on how ImportGlavaNew(...) is defined but most likely you meant to type...
Code:
MyGlavaImport.ImportGlavaNew(ref MyRoothElement);
Re: no overload for method takes 2 arguments