public partial class MainPage : UserControl { ExportCustomers_PortClient expCustomers = new ExportCustomers_PortClient("ExportCustomers_Port", new EndpointAddress("http://localhost:7047/DynamicsNAV/WS/Codeunit/ExportCustomers")); public MainPage() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { GetCustomer gtCust = new GetCustomer(); expCustomers.ExportCustomerAsync(gtCust); foreach (Customer c in gtCust.Customer) { textBox1.Text = c.No; } } } }the problem is that "gtCust" comes null after "expCustomers.ExportCustomerAsync(gtCust);" and i cant find the problem with that, he calls the webservice well but looks like he doenst run the main method for returning the list of customers.
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.