reference.vb
来自「wrox出版社的另一套经典的VB2005数据库编程学习书籍,收集了书中源码,郑重」· VB 代码 · 共 1,034 行 · 第 1/5 页
VB
1,034 行
Private Sub OnGetAllDetailsOperationCompleted(ByVal arg As Object)
If (Not (Me.GetAllDetailsCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent GetAllDetailsCompleted(Me, New GetAllDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/GetDetailsByCustomerID", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetDetailsByCustomerID(ByVal CustomerID As String) As OrderDetail()
Dim results() As Object = Me.Invoke("GetDetailsByCustomerID", New Object() {CustomerID})
Return CType(results(0),OrderDetail())
End Function
'''<remarks/>
Public Overloads Sub GetDetailsByCustomerIDAsync(ByVal CustomerID As String)
Me.GetDetailsByCustomerIDAsync(CustomerID, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub GetDetailsByCustomerIDAsync(ByVal CustomerID As String, ByVal userState As Object)
If (Me.GetDetailsByCustomerIDOperationCompleted Is Nothing) Then
Me.GetDetailsByCustomerIDOperationCompleted = AddressOf Me.OnGetDetailsByCustomerIDOperationCompleted
End If
Me.InvokeAsync("GetDetailsByCustomerID", New Object() {CustomerID}, Me.GetDetailsByCustomerIDOperationCompleted, userState)
End Sub
Private Sub OnGetDetailsByCustomerIDOperationCompleted(ByVal arg As Object)
If (Not (Me.GetDetailsByCustomerIDCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent GetDetailsByCustomerIDCompleted(Me, New GetDetailsByCustomerIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/GetTopDetails", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetTopDetails(ByVal Number As Integer) As OrderDetail()
Dim results() As Object = Me.Invoke("GetTopDetails", New Object() {Number})
Return CType(results(0),OrderDetail())
End Function
'''<remarks/>
Public Overloads Sub GetTopDetailsAsync(ByVal Number As Integer)
Me.GetTopDetailsAsync(Number, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub GetTopDetailsAsync(ByVal Number As Integer, ByVal userState As Object)
If (Me.GetTopDetailsOperationCompleted Is Nothing) Then
Me.GetTopDetailsOperationCompleted = AddressOf Me.OnGetTopDetailsOperationCompleted
End If
Me.InvokeAsync("GetTopDetails", New Object() {Number}, Me.GetTopDetailsOperationCompleted, userState)
End Sub
Private Sub OnGetTopDetailsOperationCompleted(ByVal arg As Object)
If (Not (Me.GetTopDetailsCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent GetTopDetailsCompleted(Me, New GetTopDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/GetDetailsByOrderID", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetDetailsByOrderID(ByVal OrderID As Integer) As OrderDetail()
Dim results() As Object = Me.Invoke("GetDetailsByOrderID", New Object() {OrderID})
Return CType(results(0),OrderDetail())
End Function
'''<remarks/>
Public Overloads Sub GetDetailsByOrderIDAsync(ByVal OrderID As Integer)
Me.GetDetailsByOrderIDAsync(OrderID, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub GetDetailsByOrderIDAsync(ByVal OrderID As Integer, ByVal userState As Object)
If (Me.GetDetailsByOrderIDOperationCompleted Is Nothing) Then
Me.GetDetailsByOrderIDOperationCompleted = AddressOf Me.OnGetDetailsByOrderIDOperationCompleted
End If
Me.InvokeAsync("GetDetailsByOrderID", New Object() {OrderID}, Me.GetDetailsByOrderIDOperationCompleted, userState)
End Sub
Private Sub OnGetDetailsByOrderIDOperationCompleted(ByVal arg As Object)
If (Not (Me.GetDetailsByOrderIDCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent GetDetailsByOrderIDCompleted(Me, New GetDetailsByOrderIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/UpdateOrder", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function UpdateOrder(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String, ByVal original_OrderID As Integer) As Integer
Dim results() As Object = Me.Invoke("UpdateOrder", New Object() {CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry, original_OrderID})
Return CType(results(0),Integer)
End Function
'''<remarks/>
Public Overloads Sub UpdateOrderAsync(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String, ByVal original_OrderID As Integer)
Me.UpdateOrderAsync(CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry, original_OrderID, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub UpdateOrderAsync(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String, ByVal original_OrderID As Integer, ByVal userState As Object)
If (Me.UpdateOrderOperationCompleted Is Nothing) Then
Me.UpdateOrderOperationCompleted = AddressOf Me.OnUpdateOrderOperationCompleted
End If
Me.InvokeAsync("UpdateOrder", New Object() {CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry, original_OrderID}, Me.UpdateOrderOperationCompleted, userState)
End Sub
Private Sub OnUpdateOrderOperationCompleted(ByVal arg As Object)
If (Not (Me.UpdateOrderCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent UpdateOrderCompleted(Me, New UpdateOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/InsertOrder", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function InsertOrder(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String) As Integer
Dim results() As Object = Me.Invoke("InsertOrder", New Object() {CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry})
Return CType(results(0),Integer)
End Function
'''<remarks/>
Public Overloads Sub InsertOrderAsync(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String)
Me.InsertOrderAsync(CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub InsertOrderAsync(ByVal CustomerID As String, ByVal EmployeeID As Integer, ByVal OrderDate As Date, ByVal RequiredDate As Date, ByVal ShippedDate As Date, ByVal ShipVia As Integer, ByVal Freight As Decimal, ByVal ShipName As String, ByVal ShipAddress As String, ByVal ShipCity As String, ByVal ShipRegion As String, ByVal ShipPostalCode As String, ByVal ShipCountry As String, ByVal userState As Object)
If (Me.InsertOrderOperationCompleted Is Nothing) Then
Me.InsertOrderOperationCompleted = AddressOf Me.OnInsertOrderOperationCompleted
End If
Me.InvokeAsync("InsertOrder", New Object() {CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry}, Me.InsertOrderOperationCompleted, userState)
End Sub
Private Sub OnInsertOrderOperationCompleted(ByVal arg As Object)
If (Not (Me.InsertOrderCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent InsertOrderCompleted(Me, New InsertOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/DeleteOrder", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function DeleteOrder(ByVal original_OrderID As Integer) As Integer
Dim results() As Object = Me.Invoke("DeleteOrder", New Object() {original_OrderID})
Return CType(results(0),Integer)
End Function
'''<remarks/>
Public Overloads Sub DeleteOrderAsync(ByVal original_OrderID As Integer)
Me.DeleteOrderAsync(original_OrderID, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub DeleteOrderAsync(ByVal original_OrderID As Integer, ByVal userState As Object)
If (Me.DeleteOrderOperationCompleted Is Nothing) Then
Me.DeleteOrderOperationCompleted = AddressOf Me.OnDeleteOrderOperationCompleted
End If
Me.InvokeAsync("DeleteOrder", New Object() {original_OrderID}, Me.DeleteOrderOperationCompleted, userState)
End Sub
Private Sub OnDeleteOrderOperationCompleted(ByVal arg As Object)
If (Not (Me.DeleteOrderCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent DeleteOrderCompleted(Me, New DeleteOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/UpdateDetail", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function UpdateDetail(ByVal OrderID As Integer, ByVal ProductID As Integer, ByVal UnitPrice As Decimal, ByVal Quantity As Short, ByVal Discount As Decimal, ByVal original_OrderID As Integer, ByVal original_ProductID As Integer) As Integer
Dim results() As Object = Me.Invoke("UpdateDetail", New Object() {OrderID, ProductID, UnitPrice, Quantity, Discount, original_OrderID, original_ProductID})
Return CType(results(0),Integer)
End Function
'''<remarks/>
Public Overloads Sub UpdateDetailAsync(ByVal OrderID As Integer, ByVal ProductID As Integer, ByVal UnitPrice As Decimal, ByVal Quantity As Short, ByVal Discount As Decimal, ByVal original_OrderID As Integer, ByVal original_ProductID As Integer)
Me.UpdateDetailAsync(OrderID, ProductID, UnitPrice, Quantity, Discount, original_OrderID, original_ProductID, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub UpdateDetailAsync(ByVal OrderID As Integer, ByVal ProductID As Integer, ByVal UnitPrice As Decimal, ByVal Quantity As Short, ByVal Discount As Decimal, ByVal original_OrderID As Integer, ByVal original_ProductID As Integer, ByVal userState As Object)
If (Me.UpdateDetailOperationCompleted Is Nothing) Then
Me.UpdateDetailOperationCompleted = AddressOf Me.OnUpdateDetailOperationCompleted
End If
Me.InvokeAsync("UpdateDetail", New Object() {OrderID, ProductID, UnitPrice, Quantity, Discount, original_OrderID, original_ProductID}, Me.UpdateDetailOperationCompleted, userState)
End Sub
Private Sub OnUpdateDetailOperationCompleted(ByVal arg As Object)
If (Not (Me.UpdateDetailCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent UpdateDetailCompleted(Me, New UpdateDetailCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("www.oakleaf.ws/webservices/northwind/orders/ordersbe/InsertDetail", RequestNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", ResponseNamespace:="www.oakleaf.ws/webservices/northwind/orders/ordersbe", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function InsertDetail(ByVal OrderID As Integer, ByVal ProductID As Integer, ByVal UnitPrice As Decimal, ByVal Quantity As Short, ByVal Discount As Decimal) As Integer
Dim results() As Object = Me.Invoke("InsertDetail", New Object() {OrderID, ProductID, UnitPrice, Quantity, Discount})
Return CType(results(0),Integer)
End Function
'''<remarks/>
Public Overloads Sub InsertDetailAsync(ByVal OrderID As Integer, ByVal ProductID As Integer, ByVal UnitPrice As Decimal, ByVal Quantity As Short, ByVal Discount As Decimal)
Me.InsertDetailAsync(OrderID, ProductID, UnitPrice, Quantity, Discount, Nothing)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?