在C#中引用webservice后,返回的是一个dataset,如何将dataset中数据显示到窗口控件上我在C#当中拖动了一个窗口,通过引用一个webservice之后,该webservice返回值是一个dataset,我如何将dataset中的数据显示到窗口控件上。我如何读取dataset中的数据。
该webservice中的一个函数如下:
我不清楚Item(areaID)这个究竟是什么意思……getAreaDataSet ( )
<br /><h3>[第一步] 获得支持的省市(地区)和分类电视列表 DataSet</h3><p>输入参数:无;返回数据:DataSet,结构为:Item(areaID)=省市和分类电视ID,Ietm(Area)=省市和分类电视名称,Item(Zone)=所属地区。</p><br />
该webservice中的一个函数如下:
我不清楚Item(areaID)这个究竟是什么意思……getAreaDataSet ( )
<br /><h3>[第一步] 获得支持的省市(地区)和分类电视列表 DataSet</h3><p>输入参数:无;返回数据:DataSet,结构为:Item(areaID)=省市和分类电视ID,Ietm(Area)=省市和分类电视名称,Item(Zone)=所属地区。</p><br />
public class Test: WebService
{
}
Test t = new Test();
DataTable dt= t.testtable();//返回datatable
DataFrid.Bind();
{
Java.cn.com.webxml.webservice1.DomesticAirline test = new Java.cn.com.webxml.webservice1.DomesticAirline();
DataSet return_value;
string result;
return_value = test.getDomesticAirlinesTime(textBox4.Text,textBox5.Text,textBox6.Text null);
result=return_value.Tables[0].Rows[0][0].ToString(); }这是其中一个处理函数,我不会将dataset中数据显示出来。该如何显示,希望给出修改后的代码,本人比较菜,谢谢诶……
单步跟踪看看
{
Java.cn.com.webxml.webservice1.DomesticAirline test = new Java.cn.com.webxml.webservice1.DomesticAirline();
DataSet return_value;
string result;
return_value = test.getDomesticAirlinesTime(textBox4.Text,textBox5.Text,textBox6.Text null);
result=return_value.Tables[0].Rows[0][0].ToString();
DataGrid1.DataSource = return_value.Tables[0];
DataGrid1.Bind();
}在你的窗体上放一个DataGrid