//これで呼び出せる!!
ServiceReference1.Service1Client px = new ServiceReference1.Service1Client();
this.Text = px.GetData(987);
DataSet ds = px.GetDataB(new ServiceReference1.OdbcParameter());
[サービス内にGetData関数とGetDataB関数を作成]
[OperationContract]
string GetData(int value);
[OperationContract]
DataSet.SpringJoeDataSet GetDataB(System.Data.Odbc.OdbcParameter prm);
public DataSet.SpringJoeDataSet GetDataB(System.Data.Odbc.OdbcParameter prm)
{
//アダプタは拡張しておきます(partial)
WcfService.DataSet.SpringJoeDataSetTableAdapters.SCV_HACCHU_KTableAdapter adpt = new WcfService.DataSet.SpringJoeDataSetTableAdapters.SCV_HACCHU_KTableAdapter();
WcfService.DataSet.SpringJoeDataSet dtset = new WcfService.DataSet.SpringJoeDataSet();
adpt.GetMyData(dtset, prm);
return dtset;
}
public string GetData(int value)
{
return string.Format("You entered: {0}", value);
}
0 件のコメント:
コメントを投稿