Register   |  Login
  Search
All samples    Sample 1    Sample 2    Sample 2.1    Sample 3     Sample 4    Sample 5    Sample 5.1   

Sample 2.1. Using input and output parameters (proxy class by Visual Studio).

This sample demonstrates the using of the input and output parameters.
The data service method concatenates the input string with the string "You entered".

Press "Execute" button, using datumnode/datumnode as username/password.

private void button1_Click(object senderRoutedEventArgs e)
{
	textBlock1.Text = string.Empty;
 
	var client = new scriptClient();
 
	client.helloCompleted += (sargs=>
	{
		textBlock1.Text = args.Error == null ? args.Result.Parameters.result : args.Error.Message;
	};
 
	client.helloAsync(
		new helloRequest
		{
			Command = new MetaCommand
			{
				Operation = DbOperation.ExecuteNonQuery
			},
			Parameters = new helloInputParameters
			{
				value = textBox1.Text
			}
		});
}

Full source code