using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Data.SqlClient; using System.Data; using System.Web.Configuration; using System.Xml; namespace usingparameterwebservice { /// <summary> /// Summary description for mywebservice /// </summary> [WebService(Namespace = "create_request")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // 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 Service1 : System.Web.Services.WebService { string constring = WebConfigurationManager.ConnectionStrings["Name"].ToString(); SqlConnection conn; SqlCommand comm; [WebMethod(Description = "Просмотр заявки")] public DataSet Select(string Reques_id, string nameproc) { SqlConnection myConn = new SqlConnection(constring); SqlDataAdapter myData = new SqlDataAdapter(nameproc, myConn); myData.SelectCommand.CommandType = CommandType.StoredProcedure; myData.SelectCommand.Parameters.Add(new SqlParameter("@id", SqlDbType.Char, 5)); myData.SelectCommand.Parameters["@id"].Value = Reques_id; DataSet ds = new DataSet(); myData.Fill(ds); return ds; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)