//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:4.0.30319.42000
//
//     对此文件的更改可能会导致不正确的行为，并且如果
//     重新生成代码，这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

// 
// 此源代码由 wsdl 自动生成, Version=4.8.3928.0。
// 
namespace CHEER.PresentationLayer {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    
    
    /// <remarks/>
    // CODEGEN: 未处理命名空间“http://www.w3.org/2006/05/addressing/wsdl”中的可选 WSDL 扩展元素“UsingAddressing”。
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="HandlePatientSoap11Binding", Namespace="http://www.winning.com.cn")]
    public partial class HandlePatient : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback ControllerOperationCompleted;
        
        private System.Threading.SendOrPostCallback RegisterPatientOperationCompleted;
        
        private System.Threading.SendOrPostCallback QueryPatientOperationCompleted;
        
        private System.Threading.SendOrPostCallback QueryHospitalsOperationCompleted;
        
        private System.Threading.SendOrPostCallback QueryVisitByIDOperationCompleted;
        
        private System.Threading.SendOrPostCallback QueryPatientVisitByIDOperationCompleted;
        
        /// <remarks/>
        public HandlePatient() {
            this.Url = "http://172.16.0.177:8081/winempi/HandlePatientHttpSoap11Endpoint";
        }
        
        /// <remarks/>
        public event ControllerCompletedEventHandler ControllerCompleted;
        
        /// <remarks/>
        public event RegisterPatientCompletedEventHandler RegisterPatientCompleted;
        
        /// <remarks/>
        public event QueryPatientCompletedEventHandler QueryPatientCompleted;
        
        /// <remarks/>
        public event QueryHospitalsCompletedEventHandler QueryHospitalsCompleted;
        
        /// <remarks/>
        public event QueryVisitByIDCompletedEventHandler QueryVisitByIDCompleted;
        
        /// <remarks/>
        public event QueryPatientVisitByIDCompletedEventHandler QueryPatientVisitByIDCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:Controller", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string Controller(string action, string inxml) {
            object[] results = this.Invoke("Controller", new object[] {
                        action,
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginController(string action, string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("Controller", new object[] {
                        action,
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndController(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void ControllerAsync(string action, string inxml) {
            this.ControllerAsync(action, inxml, null);
        }
        
        /// <remarks/>
        public void ControllerAsync(string action, string inxml, object userState) {
            if ((this.ControllerOperationCompleted == null)) {
                this.ControllerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnControllerOperationCompleted);
            }
            this.InvokeAsync("Controller", new object[] {
                        action,
                        inxml}, this.ControllerOperationCompleted, userState);
        }
        
        private void OnControllerOperationCompleted(object arg) {
            if ((this.ControllerCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ControllerCompleted(this, new ControllerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:RegisterPatient", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string RegisterPatient(string inxml) {
            object[] results = this.Invoke("RegisterPatient", new object[] {
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginRegisterPatient(string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("RegisterPatient", new object[] {
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndRegisterPatient(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void RegisterPatientAsync(string inxml) {
            this.RegisterPatientAsync(inxml, null);
        }
        
        /// <remarks/>
        public void RegisterPatientAsync(string inxml, object userState) {
            if ((this.RegisterPatientOperationCompleted == null)) {
                this.RegisterPatientOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRegisterPatientOperationCompleted);
            }
            this.InvokeAsync("RegisterPatient", new object[] {
                        inxml}, this.RegisterPatientOperationCompleted, userState);
        }
        
        private void OnRegisterPatientOperationCompleted(object arg) {
            if ((this.RegisterPatientCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.RegisterPatientCompleted(this, new RegisterPatientCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:QueryPatient", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string QueryPatient(string inxml) {
            object[] results = this.Invoke("QueryPatient", new object[] {
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginQueryPatient(string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("QueryPatient", new object[] {
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndQueryPatient(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void QueryPatientAsync(string inxml) {
            this.QueryPatientAsync(inxml, null);
        }
        
        /// <remarks/>
        public void QueryPatientAsync(string inxml, object userState) {
            if ((this.QueryPatientOperationCompleted == null)) {
                this.QueryPatientOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryPatientOperationCompleted);
            }
            this.InvokeAsync("QueryPatient", new object[] {
                        inxml}, this.QueryPatientOperationCompleted, userState);
        }
        
        private void OnQueryPatientOperationCompleted(object arg) {
            if ((this.QueryPatientCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.QueryPatientCompleted(this, new QueryPatientCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:QueryHospitals", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string QueryHospitals(string inxml) {
            object[] results = this.Invoke("QueryHospitals", new object[] {
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginQueryHospitals(string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("QueryHospitals", new object[] {
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndQueryHospitals(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void QueryHospitalsAsync(string inxml) {
            this.QueryHospitalsAsync(inxml, null);
        }
        
        /// <remarks/>
        public void QueryHospitalsAsync(string inxml, object userState) {
            if ((this.QueryHospitalsOperationCompleted == null)) {
                this.QueryHospitalsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryHospitalsOperationCompleted);
            }
            this.InvokeAsync("QueryHospitals", new object[] {
                        inxml}, this.QueryHospitalsOperationCompleted, userState);
        }
        
        private void OnQueryHospitalsOperationCompleted(object arg) {
            if ((this.QueryHospitalsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.QueryHospitalsCompleted(this, new QueryHospitalsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:QueryVisitByID", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string QueryVisitByID(string inxml) {
            object[] results = this.Invoke("QueryVisitByID", new object[] {
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginQueryVisitByID(string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("QueryVisitByID", new object[] {
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndQueryVisitByID(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void QueryVisitByIDAsync(string inxml) {
            this.QueryVisitByIDAsync(inxml, null);
        }
        
        /// <remarks/>
        public void QueryVisitByIDAsync(string inxml, object userState) {
            if ((this.QueryVisitByIDOperationCompleted == null)) {
                this.QueryVisitByIDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryVisitByIDOperationCompleted);
            }
            this.InvokeAsync("QueryVisitByID", new object[] {
                        inxml}, this.QueryVisitByIDOperationCompleted, userState);
        }
        
        private void OnQueryVisitByIDOperationCompleted(object arg) {
            if ((this.QueryVisitByIDCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.QueryVisitByIDCompleted(this, new QueryVisitByIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:QueryPatientVisitByID", RequestNamespace="http://www.winning.com.cn", ResponseNamespace="http://www.winning.com.cn", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute("outxml")]
        public string QueryPatientVisitByID(string inxml) {
            object[] results = this.Invoke("QueryPatientVisitByID", new object[] {
                        inxml});
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginQueryPatientVisitByID(string inxml, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("QueryPatientVisitByID", new object[] {
                        inxml}, callback, asyncState);
        }
        
        /// <remarks/>
        public string EndQueryPatientVisitByID(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void QueryPatientVisitByIDAsync(string inxml) {
            this.QueryPatientVisitByIDAsync(inxml, null);
        }
        
        /// <remarks/>
        public void QueryPatientVisitByIDAsync(string inxml, object userState) {
            if ((this.QueryPatientVisitByIDOperationCompleted == null)) {
                this.QueryPatientVisitByIDOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryPatientVisitByIDOperationCompleted);
            }
            this.InvokeAsync("QueryPatientVisitByID", new object[] {
                        inxml}, this.QueryPatientVisitByIDOperationCompleted, userState);
        }
        
        private void OnQueryPatientVisitByIDOperationCompleted(object arg) {
            if ((this.QueryPatientVisitByIDCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.QueryPatientVisitByIDCompleted(this, new QueryPatientVisitByIDCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void ControllerCompletedEventHandler(object sender, ControllerCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ControllerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ControllerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void RegisterPatientCompletedEventHandler(object sender, RegisterPatientCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class RegisterPatientCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal RegisterPatientCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void QueryPatientCompletedEventHandler(object sender, QueryPatientCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class QueryPatientCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal QueryPatientCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void QueryHospitalsCompletedEventHandler(object sender, QueryHospitalsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class QueryHospitalsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal QueryHospitalsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void QueryVisitByIDCompletedEventHandler(object sender, QueryVisitByIDCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class QueryVisitByIDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal QueryVisitByIDCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void QueryPatientVisitByIDCompletedEventHandler(object sender, QueryPatientVisitByIDCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class QueryPatientVisitByIDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal QueryPatientVisitByIDCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
}
