|
Framework 2.0
Framework 4.0
Framework 2.0
RapPricesWebService.RapaportPrices webServiceManager
= new RapPricesWebService.RapaportPrices();
webServiceManager.Login("myUser",
"myPassword");
webServiceManager.Url = "http" + webServiceManager.Url.Substring(5);
RapPricesWebService.RapaportPrice RapPriceClass =
webServiceManager.GetPrice("Round", 0.4f,
"D", "VS1");
decimal price = RapPriceClass.price;
decimal high_size = RapPriceClass.high_size;
decimal low_size = RapPriceClass.low_size;
DateTime date = RapPriceClass.Date;
RapPricesWebService.RapaportPriceSheet RapPriceSheetDataSet
=
webServiceManager.GetPriceSheet(TechnetSamples.RapPricesWebService.Shapes.Round);
DateTime date_ps = RapPriceSheetDataSet.Date;
string shape_ps = RapPriceSheetDataSet.Shape;
DataSet ds = RapPriceSheetDataSet.Prices;
foreach(DataRow dr
in ds.Tables[0].Rows)
{
string clarity_ps = dr["Clarity"].ToString();
string color_ps = dr["Color"].ToString();
decimal low_size_ps = Convert.ToDecimal(dr["LowSize"]);
decimal high_size_ps = Convert.ToDecimal(dr["HighSize"]);
decimal price_ps = Convert.ToDecimal(dr["Price"]);
}
|
Framework 4.0
closeTimeout="00:05:00" openTimeout="00:05:00"
receiveTimeout="00:10:00" sendTimeout="00:05:00"
maxBufferSize="65536" maxBufferPoolSize="5242880" maxReceivedMessageSize="655360"
<system.web>
<compilation debug="false"/>
<httpRuntime executionTimeout="2000000"/>
</system.web>
RapaportPricesSoapClient webServiceManager = new RapaportPricesSoapClient();
AuthenticationTicketHeader ticket = webServiceManager.Login("myUser", "myPassword");
string oldAddress = webServiceManager.Endpoint.Address.ToString();
string newAddress = "http"
+ webServiceManager.Endpoint.Address.ToString().Substring(5);
System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(newAddress);
webServiceManager.Endpoint.Address = address;
RapaportPrice RapPriceClass =
webServiceManager.GetPrice(ticket,"Round", 0.4f,
"D", "VS1");
decimal price = RapPriceClass.price;
decimal high_size = RapPriceClass.high_size;
decimal low_size = RapPriceClass.low_size;
DateTime date = RapPriceClass.Date;
RapaportPriceSheet RapPriceSheetDataSet
=
webServiceManager.GetPriceSheet(ticket,Shapes.Round);
DateTime date_ps = RapPriceSheetDataSet.Date;
string shape_ps = RapPriceSheetDataSet.Shape;
DataSet ds = RapPriceSheetDataSet.Prices;
foreach(DataRow dr
in ds.Tables[0].Rows)
{
string clarity_ps = dr["Clarity"].ToString();
string color_ps = dr["Color"].ToString();
decimal low_size_ps = Convert.ToDecimal(dr["LowSize"]);
decimal high_size_ps = Convert.ToDecimal(dr["HighSize"]);
decimal price_ps = Convert.ToDecimal(dr["Price"]);
}
|
|