工作流程 4.0 和集合
我想编写一个简单的应用程序来帮助我稍微了解一下工作流程 4.0。我有一个带有 ReceiveAndSendRepply 活动的序列活动来与我的 silverlight 应用程序进行通信。
我想创建一个学生类型列表,并在我的 silverlight 应用程序中显示在数据网格中。
目前,我有一个简单的学生类,
public class Student
{
public int ID { get; set; }
public string Name { get; set; }
}
我将我的 WF 作为服务公开并从我的 silverlight 应用程序调用它:
StudentService.ServiceClient client = new StudentService.ServiceClient();
public MainPage()
{
InitializeComponent();
client.GetStudentsCompleted += new EventHandler<StudentService.GetStudentsCompletedEventArgs>(client_GetStudentsCompleted);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
client.GetStudentsAsync();
}
我可以使用分配 AB 并分配一个变量并给它一个值,但我想发送多个值并遍历它们。
我如何拥有学生列表并在网格中迭代和显示。
如何在工作流程中创建列表并将其发送回 Silverlight 网格?
I want to write a simple application to help me understand workflow 4.0 a bit. I have a sequence activity with a ReceiveAndSendRepply activity to communicate with my silverlight application.
I want to create a List of Type Students and in my silverlight application, display in the datagrid.
At the moment, I have a simple class Student
public class Student
{
public int ID { get; set; }
public string Name { get; set; }
}
I am exposing my WF as a service and calling it from my silverlight app:
StudentService.ServiceClient client = new StudentService.ServiceClient();
public MainPage()
{
InitializeComponent();
client.GetStudentsCompleted += new EventHandler<StudentService.GetStudentsCompletedEventArgs>(client_GetStudentsCompleted);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
client.GetStudentsAsync();
}
I am able to use the assign A-B and assign a variable and give it ONE value but I want to send multiple values and ierate through them.
How do I go about having a List of students and iterate and display in grid.
How do I create a list in workflow and send it back to the Silverlight grid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需从工作流服务返回一个列表,Silverlight 客户端就会收到该列表。
工作流程
Silverlight 客户端
完整的工作流服务 XAMLX 源代码如下所示:
Just return a List from your workflow service and the Silverlight client will receive that.
The workflow
The Silverlight client
The complete workflow service XAMLX source looks like this: