加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

.net webservice

发布时间:2020-12-16 23:26:53 所属栏目:安全 来源:网络整理
导读:Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports kemet.Never.DA Imports kemet.Never.BL Imports System.Data.SqlClient Imports System.Data ? ' To allow this Web Service to be called from script,usi

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

Imports kemet.Never.DA
Imports kemet.Never.BL
Imports System.Data.SqlClient
Imports System.Data

?

' To allow this Web Service to be called from script,using ASP.NET AJAX,uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
??? Inherits System.Web.Services.WebService

??? Private _DBTrans As kemet.Never.DA.DBTransaction
??? Private _BL As kemet.Never.BL.Query
??? Private _connectionString As String = ""

?


??? <WebMethod()> _
??? Public Function HelloWorld() As String
??????? Return "Hello World"
??? End Function

??? 'Public Sub New(ByVal connectionString As String)
??? '??? _connectionString = connectionString
??? 'End Sub

??? <WebMethod()> _
??? Public Function Binding(ByVal r As re) As DataSet

??????? _connectionString = r.connec
??????? ' "Data Source=LDBYYQ3R1MYSQLTEST;? Initial Catalog=MES_TRANS_MCD; User ID=sa; PassWord=admin; Persist Security Info=False;"

??????? _DBTrans = New kemet.Never.DA.DBTransaction("",_connectionString)
??????? _BL = New kemet.Never.BL.Query(_DBTrans)
??????? Dim resultDS As New DataSet


??????? Try

??????????? resultDS = _BL.GetJobInfo2("FPI162236TMW3N")
??????????? Return resultDS
??????? Catch ex As Exception
??????????? Throw ex

??????? End Try

??? End Function
??? 'Public Sub New()
??? '??? MyBase.New()


??? '??? InitialLizeComponet()

??? 'End Sub
??? 'Private components As System.ComponentModel.IContainer
??? '<System.Diagnostics.DebuggerStepThrough()> Private Sub InitialLizeComponet()
??? '??? components = New System.ComponentModel.Container()

??? 'End Sub
??? 'Protected Overrides Sub Dispose(ByVal disposing As Boolean)
??? '??? If disposing Then
??? '??????? If Not (components Is Nothing) Then
??? '??????????? components.Dispose()

??? '??????? End If
??? '??? End If
??? '??? MyBase.Dispose(disposing)
??? 'End Sub

End Class

Public Class re
??? Public pn As String
??? Public job As String
??? Public connec As String

End Class

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读