//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//
//     对此文件的更改可能导致不正确的行为，并在以下条件下丢失:
//     代码重新生成。
// </auto-generated>
//------------------------------------------------------------------------------

namespace TCHoldApptReference
{
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TC_API_Abstract_Edit", Namespace="http://www.intersystems.com/trak/ws")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(TCHoldApptReference.TCapiRBAppointmentHoldApptEdit))]
    public partial class TC_API_Abstract_Edit : object
    {
        
        private string TUSERNAMEField;
        
        private string TPASSWORDField;
        
        private bool TENCRYPTPASSWORDField;
        
        private string TSESSIONIDField;
        
        private string TOVERRIDEField;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string TUSERNAME
        {
            get
            {
                return this.TUSERNAMEField;
            }
            set
            {
                this.TUSERNAMEField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public string TPASSWORD
        {
            get
            {
                return this.TPASSWORDField;
            }
            set
            {
                this.TPASSWORDField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(Order=2)]
        public bool TENCRYPTPASSWORD
        {
            get
            {
                return this.TENCRYPTPASSWORDField;
            }
            set
            {
                this.TENCRYPTPASSWORDField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=3)]
        public string TSESSIONID
        {
            get
            {
                return this.TSESSIONIDField;
            }
            set
            {
                this.TSESSIONIDField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=4)]
        public string TOVERRIDE
        {
            get
            {
                return this.TOVERRIDEField;
            }
            set
            {
                this.TOVERRIDEField = value;
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TC.api.RBAppointment.HoldAppt.Edit", Namespace="http://www.intersystems.com/trak/ws")]
    public partial class TCapiRBAppointmentHoldApptEdit : TCHoldApptReference.TC_API_Abstract_Edit
    {
        
        private string IDField;
        
        private string APPTUBRNField;
        
        private string APPTUSRNField;
        
        private string ModeField;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string ID
        {
            get
            {
                return this.IDField;
            }
            set
            {
                this.IDField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public string APPTUBRN
        {
            get
            {
                return this.APPTUBRNField;
            }
            set
            {
                this.APPTUBRNField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
        public string APPTUSRN
        {
            get
            {
                return this.APPTUSRNField;
            }
            set
            {
                this.APPTUSRNField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=3)]
        public string Mode
        {
            get
            {
                return this.ModeField;
            }
            set
            {
                this.ModeField = value;
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://www.intersystems.com/trak/ws", ConfigurationName="TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap")]
    public interface TC_ws_RBAppointment_HoldAppt_EditSoap
    {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://www.intersystems.com/trak/ws/TC.ws.RBAppointment.HoldAppt.Edit.Open", ReplyAction="*")]
        System.Threading.Tasks.Task<TCHoldApptReference.OpenResponse> OpenAsync(TCHoldApptReference.OpenRequest request);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://www.intersystems.com/trak/ws/TC.ws.RBAppointment.HoldAppt.Edit.Save", ReplyAction="*")]
        System.Threading.Tasks.Task<TCHoldApptReference.SaveResponse> SaveAsync(TCHoldApptReference.SaveRequest request);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class OpenRequest
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="Open", Namespace="http://www.intersystems.com/trak/ws", Order=0)]
        public TCHoldApptReference.OpenRequestBody Body;
        
        public OpenRequest()
        {
        }
        
        public OpenRequest(TCHoldApptReference.OpenRequestBody Body)
        {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://www.intersystems.com/trak/ws")]
    public partial class OpenRequestBody
    {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public string token;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public string ID;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
        public string TUSERNAME;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=3)]
        public string TPASSWORD;
        
        public OpenRequestBody()
        {
        }
        
        public OpenRequestBody(string token, string ID, string TUSERNAME, string TPASSWORD)
        {
            this.token = token;
            this.ID = ID;
            this.TUSERNAME = TUSERNAME;
            this.TPASSWORD = TPASSWORD;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class OpenResponse
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="OpenResponse", Namespace="http://www.intersystems.com/trak/ws", Order=0)]
        public TCHoldApptReference.OpenResponseBody Body;
        
        public OpenResponse()
        {
        }
        
        public OpenResponse(TCHoldApptReference.OpenResponseBody Body)
        {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://www.intersystems.com/trak/ws")]
    public partial class OpenResponseBody
    {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public TCHoldApptReference.TCapiRBAppointmentHoldApptEdit OpenResult;
        
        public OpenResponseBody()
        {
        }
        
        public OpenResponseBody(TCHoldApptReference.TCapiRBAppointmentHoldApptEdit OpenResult)
        {
            this.OpenResult = OpenResult;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class SaveRequest
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="Save", Namespace="http://www.intersystems.com/trak/ws", Order=0)]
        public TCHoldApptReference.SaveRequestBody Body;
        
        public SaveRequest()
        {
        }
        
        public SaveRequest(TCHoldApptReference.SaveRequestBody Body)
        {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://www.intersystems.com/trak/ws")]
    public partial class SaveRequestBody
    {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public string token;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public TCHoldApptReference.TCapiRBAppointmentHoldApptEdit rs;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
        public string TUSERNAME;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=3)]
        public string TPASSWORD;
        
        public SaveRequestBody()
        {
        }
        
        public SaveRequestBody(string token, TCHoldApptReference.TCapiRBAppointmentHoldApptEdit rs, string TUSERNAME, string TPASSWORD)
        {
            this.token = token;
            this.rs = rs;
            this.TUSERNAME = TUSERNAME;
            this.TPASSWORD = TPASSWORD;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class SaveResponse
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="SaveResponse", Namespace="http://www.intersystems.com/trak/ws", Order=0)]
        public TCHoldApptReference.SaveResponseBody Body;
        
        public SaveResponse()
        {
        }
        
        public SaveResponse(TCHoldApptReference.SaveResponseBody Body)
        {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://www.intersystems.com/trak/ws")]
    public partial class SaveResponseBody
    {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public string SaveResult;
        
        public SaveResponseBody()
        {
        }
        
        public SaveResponseBody(string SaveResult)
        {
            this.SaveResult = SaveResult;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public interface TC_ws_RBAppointment_HoldAppt_EditSoapChannel : TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap, System.ServiceModel.IClientChannel
    {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public partial class TC_ws_RBAppointment_HoldAppt_EditSoapClient : System.ServiceModel.ClientBase<TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap>, TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap
    {
        
        /// <summary>
        /// 实现此分部方法，配置服务终结点。
        /// </summary>
        /// <param name="serviceEndpoint">要配置的终结点</param>
        /// <param name="clientCredentials">客户端凭据</param>
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
        
        public TC_ws_RBAppointment_HoldAppt_EditSoapClient() : 
                base(TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetDefaultBinding(), TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetDefaultEndpointAddress())
        {
            this.Endpoint.Name = EndpointConfiguration.TC_ws_RBAppointment_HoldAppt_EditSoap.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public TC_ws_RBAppointment_HoldAppt_EditSoapClient(EndpointConfiguration endpointConfiguration) : 
                base(TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetBindingForEndpoint(endpointConfiguration), TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetEndpointAddress(endpointConfiguration))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public TC_ws_RBAppointment_HoldAppt_EditSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
                base(TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public TC_ws_RBAppointment_HoldAppt_EditSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public TC_ws_RBAppointment_HoldAppt_EditSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress)
        {
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task<TCHoldApptReference.OpenResponse> TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap.OpenAsync(TCHoldApptReference.OpenRequest request)
        {
            return base.Channel.OpenAsync(request);
        }
        
        public System.Threading.Tasks.Task<TCHoldApptReference.OpenResponse> OpenAsync(string token, string ID, string TUSERNAME, string TPASSWORD)
        {
            TCHoldApptReference.OpenRequest inValue = new TCHoldApptReference.OpenRequest();
            inValue.Body = new TCHoldApptReference.OpenRequestBody();
            inValue.Body.token = token;
            inValue.Body.ID = ID;
            inValue.Body.TUSERNAME = TUSERNAME;
            inValue.Body.TPASSWORD = TPASSWORD;
            return ((TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap)(this)).OpenAsync(inValue);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task<TCHoldApptReference.SaveResponse> TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap.SaveAsync(TCHoldApptReference.SaveRequest request)
        {
            return base.Channel.SaveAsync(request);
        }
        
        public System.Threading.Tasks.Task<TCHoldApptReference.SaveResponse> SaveAsync(string token, TCHoldApptReference.TCapiRBAppointmentHoldApptEdit rs, string TUSERNAME, string TPASSWORD)
        {
            TCHoldApptReference.SaveRequest inValue = new TCHoldApptReference.SaveRequest();
            inValue.Body = new TCHoldApptReference.SaveRequestBody();
            inValue.Body.token = token;
            inValue.Body.rs = rs;
            inValue.Body.TUSERNAME = TUSERNAME;
            inValue.Body.TPASSWORD = TPASSWORD;
            return ((TCHoldApptReference.TC_ws_RBAppointment_HoldAppt_EditSoap)(this)).SaveAsync(inValue);
        }
        
        public virtual System.Threading.Tasks.Task OpenAsync1()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
        }
        
        public virtual System.Threading.Tasks.Task CloseAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
        }
        
        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.TC_ws_RBAppointment_HoldAppt_EditSoap))
            {
                System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
                result.MaxBufferSize = int.MaxValue;
                result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
                result.MaxReceivedMessageSize = int.MaxValue;
                result.AllowCookies = true;
                return result;
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.TC_ws_RBAppointment_HoldAppt_EditSoap))
            {
                return new System.ServiceModel.EndpointAddress("http://192.168.50.235/trakbase/web/api/TC.ws.RBAppointment.HoldAppt.Edit.cls");
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        private static System.ServiceModel.Channels.Binding GetDefaultBinding()
        {
            return TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetBindingForEndpoint(EndpointConfiguration.TC_ws_RBAppointment_HoldAppt_EditSoap);
        }
        
        private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
        {
            return TC_ws_RBAppointment_HoldAppt_EditSoapClient.GetEndpointAddress(EndpointConfiguration.TC_ws_RBAppointment_HoldAppt_EditSoap);
        }
        
        public enum EndpointConfiguration
        {
            
            TC_ws_RBAppointment_HoldAppt_EditSoap,
        }
    }
}
