87,907
社区成员
发帖
与我相关
我的任务
分享
public string[,] getSource()
{
MyService.MyServiceClient client = new MyService.MyServiceClient();
DataSet ds = new DataSet();
ds = client.ScheduleGetList("");
// List<MyService.Schedule> list = new List<MyService.Schedule>();
MyService.Schedule schedule = new MyService.Schedule();
string[,] list = new string[ds.Tables[0].Rows.Count,3];
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
list[i,0] = ds.Tables[0].Rows[i][1].ToString();
list[i,1] = ds.Tables[0].Rows[i][2].ToString();
list[i,2] = ds.Tables[0].Rows[i][3].ToString();
}
return list;
}
string[][] list = new string[ds.Tables[0].Rows.Count][];
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
list[i][0] = ds.Tables[0].Rows[i][1].ToString();
list[i][1] = ds.Tables[0].Rows[i][2].ToString();
list[i][2] = ds.Tables[0].Rows[i][3].ToString();
}