Question

Locked

Web Service Implementation

By ti3863 ·
I am working on a web service program but is stuck. i dont know what to do after I use the foreach statement to retreive my data.

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Services;
usingSystem.Web.Services.Protocols;
using System.Xml;
using System.Xml.Linq;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Text;
using System.Drawing;

/// <summary>
/// Summary description for WMS_WHS
/// </summary>
[WebService(Namespace = "http://airforce.af.mil/wmsorder")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WMS_WHS : System.Web.Services.WebService {

public WMS_WHS () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}

[WebMethod(Description = "WMS_WHS_ORDERS")]
public DataSet GETORDERS()
{
using (SqlConnection WMS_WHSconnection = new SqlConnection(ConfigurationManager.ConnectionStrings["WMS_WHSConnectionString"].ConnectionString))
{

string Query = "SELECT * FROM [tOrders]";
SqlCommand command = new SqlCommand(Query, WMS_WHSconnection);
command.CommandType = CommandType.Text;
WMS_WHSconnection.Open();

SqlDataAdapter daORDER
= new SqlDataAdapter(Query, WMS_WHSconnection);

DataSet dsWHS = new DataSet("WMS_WHS_ORDERS");
daORDER.FillSchema(dsWHS, SchemaType.Source, "tOrders");
daORDER.Fill(dsWHS, "tOrders");
DataTable tbltOrders;
tbltOrders = dsWHS.Tables["tOrders"];

foreach (DataRow drCurrent in tbltOrders.Rows)
{


}

}


}

}

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums