reference.cs

来自「< SQL Server2005程序设计>」· CS 代码 · 共 962 行 · 第 1/3 页

CS
962
字号
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.42
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
// 
#pragma warning disable 1591

namespace AdventureSales.AdventureSalesWebService {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    using System.Data;
    using System.Data.SqlTypes;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="AdventureWorksSoap", Namespace="http://Adventure-Works/")]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(xml))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(SqlParameter[]))]
    public partial class AdventureWorks : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback sqlbatchOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetStoreContactsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetStoreInfoOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetStoreRecentOrdersOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetStoreSalesYTDOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public AdventureWorks() {
            this.Url = global::AdventureSales.Properties.Settings.Default.AdventureSales_AdventureSalesWebService_AdventureWorks;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event sqlbatchCompletedEventHandler sqlbatchCompleted;
        
        /// <remarks/>
        public event GetStoreContactsCompletedEventHandler GetStoreContactsCompleted;
        
        /// <remarks/>
        public event GetStoreInfoCompletedEventHandler GetStoreInfoCompleted;
        
        /// <remarks/>
        public event GetStoreRecentOrdersCompletedEventHandler GetStoreRecentOrdersCompleted;
        
        /// <remarks/>
        public event GetStoreSalesYTDCompletedEventHandler GetStoreSalesYTDCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2004/SOAPsqlbatch", RequestNamespace="http://schemas.microsoft.com/sqlserver/2004/SOAP", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2004/SOAP", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlMessage), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlResultCode", typeof(int), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlRowCount), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlRowSet", typeof(System.Data.DataSet), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlTransaction), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlXml", typeof(System.Xml.XmlNode), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        public object[] sqlbatch(string BatchCommands, [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlParameter", IsNullable=false)] ref SqlParameter[] Parameters) {
            object[] results = this.Invoke("sqlbatch", new object[] {
                        BatchCommands,
                        Parameters});
            Parameters = ((SqlParameter[])(results[1]));
            return ((object[])(results[0]));
        }
        
        /// <remarks/>
        public void sqlbatchAsync(string BatchCommands, SqlParameter[] Parameters) {
            this.sqlbatchAsync(BatchCommands, Parameters, null);
        }
        
        /// <remarks/>
        public void sqlbatchAsync(string BatchCommands, SqlParameter[] Parameters, object userState) {
            if ((this.sqlbatchOperationCompleted == null)) {
                this.sqlbatchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsqlbatchOperationCompleted);
            }
            this.InvokeAsync("sqlbatch", new object[] {
                        BatchCommands,
                        Parameters}, this.sqlbatchOperationCompleted, userState);
        }
        
        private void OnsqlbatchOperationCompleted(object arg) {
            if ((this.sqlbatchCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.sqlbatchCompleted(this, new sqlbatchCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://Adventure-Works/GetStoreContacts", RequestNamespace="http://Adventure-Works/", ResponseNamespace="http://Adventure-Works/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlMessage), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlResultCode", typeof(int), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlRowCount), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlRowSet", typeof(System.Data.DataSet), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlTransaction), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlXml", typeof(System.Xml.XmlNode), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        public object[] GetStoreContacts([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Data.SqlTypes.SqlInt32 CustomerID) {
            object[] results = this.Invoke("GetStoreContacts", new object[] {
                        CustomerID});
            return ((object[])(results[0]));
        }
        
        /// <remarks/>
        public void GetStoreContactsAsync(System.Data.SqlTypes.SqlInt32 CustomerID) {
            this.GetStoreContactsAsync(CustomerID, null);
        }
        
        /// <remarks/>
        public void GetStoreContactsAsync(System.Data.SqlTypes.SqlInt32 CustomerID, object userState) {
            if ((this.GetStoreContactsOperationCompleted == null)) {
                this.GetStoreContactsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStoreContactsOperationCompleted);
            }
            this.InvokeAsync("GetStoreContacts", new object[] {
                        CustomerID}, this.GetStoreContactsOperationCompleted, userState);
        }
        
        private void OnGetStoreContactsOperationCompleted(object arg) {
            if ((this.GetStoreContactsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetStoreContactsCompleted(this, new GetStoreContactsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://Adventure-Works/GetStoreInfo", RequestNamespace="http://Adventure-Works/", ResponseNamespace="http://Adventure-Works/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlMessage), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlResultCode", typeof(int), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlRowCount), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlRowSet", typeof(System.Data.DataSet), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(SqlTransaction), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        [return: System.Xml.Serialization.XmlArrayItemAttribute("SqlXml", typeof(System.Xml.XmlNode), Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream", IsNullable=false)]
        public object[] GetStoreInfo([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Data.SqlTypes.SqlInt32 CustomerID) {
            object[] results = this.Invoke("GetStoreInfo", new object[] {
                        CustomerID});
            return ((object[])(results[0]));
        }
        
        /// <remarks/>
        public void GetStoreInfoAsync(System.Data.SqlTypes.SqlInt32 CustomerID) {
            this.GetStoreInfoAsync(CustomerID, null);
        }
        
        /// <remarks/>
        public void GetStoreInfoAsync(System.Data.SqlTypes.SqlInt32 CustomerID, object userState) {
            if ((this.GetStoreInfoOperationCompleted == null)) {
                this.GetStoreInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStoreInfoOperationCompleted);
            }
            this.InvokeAsync("GetStoreInfo", new object[] {
                        CustomerID}, this.GetStoreInfoOperationCompleted, userState);
        }
        
        private void OnGetStoreInfoOperationCompleted(object arg) {
            if ((this.GetStoreInfoCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetStoreInfoCompleted(this, new GetStoreInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://Adventure-Works/GetStoreRecentOrders", RequestNamespace="http://Adventure-Works/", ResponseNamespace="http://Adventure-Works/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataSet GetStoreRecentOrders([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Data.SqlTypes.SqlInt32 CustomerID) {
            object[] results = this.Invoke("GetStoreRecentOrders", new object[] {
                        CustomerID});
            return ((System.Data.DataSet)(results[0]));
        }
        
        /// <remarks/>
        public void GetStoreRecentOrdersAsync(System.Data.SqlTypes.SqlInt32 CustomerID) {
            this.GetStoreRecentOrdersAsync(CustomerID, null);
        }
        
        /// <remarks/>
        public void GetStoreRecentOrdersAsync(System.Data.SqlTypes.SqlInt32 CustomerID, object userState) {
            if ((this.GetStoreRecentOrdersOperationCompleted == null)) {
                this.GetStoreRecentOrdersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStoreRecentOrdersOperationCompleted);
            }
            this.InvokeAsync("GetStoreRecentOrders", new object[] {
                        CustomerID}, this.GetStoreRecentOrdersOperationCompleted, userState);
        }
        
        private void OnGetStoreRecentOrdersOperationCompleted(object arg) {
            if ((this.GetStoreRecentOrdersCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetStoreRecentOrdersCompleted(this, new GetStoreRecentOrdersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://Adventure-Works/GetStoreSalesYTD", RequestNamespace="http://Adventure-Works/", ResponseNamespace="http://Adventure-Works/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Data.SqlTypes.SqlDecimal GetStoreSalesYTD([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Data.SqlTypes.SqlInt32 CustomerID) {
            object[] results = this.Invoke("GetStoreSalesYTD", new object[] {
                        CustomerID});
            return ((System.Data.SqlTypes.SqlDecimal)(results[0]));
        }
        
        /// <remarks/>
        public void GetStoreSalesYTDAsync(System.Data.SqlTypes.SqlInt32 CustomerID) {
            this.GetStoreSalesYTDAsync(CustomerID, null);
        }
        
        /// <remarks/>
        public void GetStoreSalesYTDAsync(System.Data.SqlTypes.SqlInt32 CustomerID, object userState) {
            if ((this.GetStoreSalesYTDOperationCompleted == null)) {
                this.GetStoreSalesYTDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStoreSalesYTDOperationCompleted);
            }
            this.InvokeAsync("GetStoreSalesYTD", new object[] {
                        CustomerID}, this.GetStoreSalesYTDOperationCompleted, userState);
        }
        
        private void OnGetStoreSalesYTDOperationCompleted(object arg) {
            if ((this.GetStoreSalesYTDCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetStoreSalesYTDCompleted(this, new GetStoreSalesYTDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlParameter")]
    public partial class SqlParameter {
        
        private object valueField;
        
        private string nameField;
        
        private sqlDbTypeEnum sqlDbTypeField;
        
        private ParameterDirection directionField;
        
        private long maxLengthField;
        
        private byte precisionField;
        
        private byte scaleField;
        
        private string clrTypeNameField;
        
        private sqlCompareOptionsEnum[] sqlCompareOptionsField;
        
        private int localeIdField;
        
        private int sqlCollationVersionField;
        
        private int sqlSortIdField;
        
        private string xmlSchemaCollectionField;
        
        public SqlParameter() {
            this.sqlDbTypeField = sqlDbTypeEnum.NVarChar;
            this.directionField = ParameterDirection.Input;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?