//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.239
//
//     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 4.0.30319.239.
// 
#pragma warning disable 1591

namespace QuickRoute.BusinessEntities.CzechSplitsWebService {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ResultsDBServiceBinding", Namespace="http://www.bestik.cz/vysledky")]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(dateTime))]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(Runner))]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(Category))]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(Event))]
    public partial class ResultsDBService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback GetEventsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetCategoriesOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetRunnersAndSplitsOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ResultsDBService() {
            this.Url = global::QuickRoute.BusinessEntities.Properties.Settings.Default.QuickRoute_BusinessEntities_CzechSplitsWebService_ResultsDBService;
            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 GetEventsCompletedEventHandler GetEventsCompleted;
        
        /// <remarks/>
        public event GetCategoriesCompletedEventHandler GetCategoriesCompleted;
        
        /// <remarks/>
        public event GetRunnersAndSplitsCompletedEventHandler GetRunnersAndSplitsCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://bestik.cz/vysledky/webservice.php/GetEvents", RequestNamespace="http://www.bestik.cz/vysledky", ResponseNamespace="http://www.bestik.cz/vysledky")]
        [return: System.Xml.Serialization.SoapElementAttribute("response")]
        public GetEventsResponse GetEvents(GetEvents request) {
            object[] results = this.Invoke("GetEvents", new object[] {
                        request});
            return ((GetEventsResponse)(results[0]));
        }
        
        /// <remarks/>
        public void GetEventsAsync(GetEvents request) {
            this.GetEventsAsync(request, null);
        }
        
        /// <remarks/>
        public void GetEventsAsync(GetEvents request, object userState) {
            if ((this.GetEventsOperationCompleted == null)) {
                this.GetEventsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEventsOperationCompleted);
            }
            this.InvokeAsync("GetEvents", new object[] {
                        request}, this.GetEventsOperationCompleted, userState);
        }
        
        private void OnGetEventsOperationCompleted(object arg) {
            if ((this.GetEventsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetEventsCompleted(this, new GetEventsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://bestik.cz/vysledky/webservice.php/GetCategories", RequestNamespace="http://www.bestik.cz/vysledky", ResponseNamespace="http://www.bestik.cz/vysledky")]
        [return: System.Xml.Serialization.SoapElementAttribute("response")]
        public GetCategoriesResponse GetCategories(GetCategories request) {
            object[] results = this.Invoke("GetCategories", new object[] {
                        request});
            return ((GetCategoriesResponse)(results[0]));
        }
        
        /// <remarks/>
        public void GetCategoriesAsync(GetCategories request) {
            this.GetCategoriesAsync(request, null);
        }
        
        /// <remarks/>
        public void GetCategoriesAsync(GetCategories request, object userState) {
            if ((this.GetCategoriesOperationCompleted == null)) {
                this.GetCategoriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCategoriesOperationCompleted);
            }
            this.InvokeAsync("GetCategories", new object[] {
                        request}, this.GetCategoriesOperationCompleted, userState);
        }
        
        private void OnGetCategoriesOperationCompleted(object arg) {
            if ((this.GetCategoriesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetCategoriesCompleted(this, new GetCategoriesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://bestik.cz/vysledky/webservice.php/GetRunnersAndSplits", RequestNamespace="http://www.bestik.cz/vysledky", ResponseNamespace="http://www.bestik.cz/vysledky")]
        [return: System.Xml.Serialization.SoapElementAttribute("response")]
        public GetRunnersAndSplitsResponse GetRunnersAndSplits(GetRunnersAndSplits request) {
            object[] results = this.Invoke("GetRunnersAndSplits", new object[] {
                        request});
            return ((GetRunnersAndSplitsResponse)(results[0]));
        }
        
        /// <remarks/>
        public void GetRunnersAndSplitsAsync(GetRunnersAndSplits request) {
            this.GetRunnersAndSplitsAsync(request, null);
        }
        
        /// <remarks/>
        public void GetRunnersAndSplitsAsync(GetRunnersAndSplits request, object userState) {
            if ((this.GetRunnersAndSplitsOperationCompleted == null)) {
                this.GetRunnersAndSplitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRunnersAndSplitsOperationCompleted);
            }
            this.InvokeAsync("GetRunnersAndSplits", new object[] {
                        request}, this.GetRunnersAndSplitsOperationCompleted, userState);
        }
        
        private void OnGetRunnersAndSplitsOperationCompleted(object arg) {
            if ((this.GetRunnersAndSplitsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetRunnersAndSplitsCompleted(this, new GetRunnersAndSplitsCompletedEventArgs(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", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetEvents {
        
        private System.DateTime startDateField;
        
        private System.DateTime endDateField;
        
        private string countryField;
        
        /// <remarks/>
        public System.DateTime startDate {
            get {
                return this.startDateField;
            }
            set {
                this.startDateField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime endDate {
            get {
                return this.endDateField;
            }
            set {
                this.endDateField = value;
            }
        }
        
        /// <remarks/>
        public string country {
            get {
                return this.countryField;
            }
            set {
                this.countryField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class dateTime {
        
        private System.DateTime dateTime1Field;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute("dateTime")]
        public System.DateTime dateTime1 {
            get {
                return this.dateTime1Field;
            }
            set {
                this.dateTime1Field = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class Runner {
        
        private string nameField;
        
        private string clubField;
        
        private System.DateTime startTimeField;
        
        private System.DateTime finishTimeField;
        
        private dateTime[] splitsField;
        
        /// <remarks/>
        public string Name {
            get {
                return this.nameField;
            }
            set {
                this.nameField = value;
            }
        }
        
        /// <remarks/>
        public string Club {
            get {
                return this.clubField;
            }
            set {
                this.clubField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime StartTime {
            get {
                return this.startTimeField;
            }
            set {
                this.startTimeField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime FinishTime {
            get {
                return this.finishTimeField;
            }
            set {
                this.finishTimeField = value;
            }
        }
        
        /// <remarks/>
        public dateTime[] Splits {
            get {
                return this.splitsField;
            }
            set {
                this.splitsField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetRunnersAndSplitsResponse {
        
        private Runner[] getRunnersAndSplitsResultField;
        
        /// <remarks/>
        public Runner[] GetRunnersAndSplitsResult {
            get {
                return this.getRunnersAndSplitsResultField;
            }
            set {
                this.getRunnersAndSplitsResultField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetRunnersAndSplits {
        
        private string databaseIdField;
        
        private int categoryIndexField;
        
        /// <remarks/>
        public string databaseId {
            get {
                return this.databaseIdField;
            }
            set {
                this.databaseIdField = value;
            }
        }
        
        /// <remarks/>
        public int categoryIndex {
            get {
                return this.categoryIndexField;
            }
            set {
                this.categoryIndexField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class Category {
        
        private string nameField;
        
        private int noOfRunnersField;
        
        /// <remarks/>
        public string Name {
            get {
                return this.nameField;
            }
            set {
                this.nameField = value;
            }
        }
        
        /// <remarks/>
        public int NoOfRunners {
            get {
                return this.noOfRunnersField;
            }
            set {
                this.noOfRunnersField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetCategoriesResponse {
        
        private Category[] getCategoriesResultField;
        
        /// <remarks/>
        public Category[] GetCategoriesResult {
            get {
                return this.getCategoriesResultField;
            }
            set {
                this.getCategoriesResultField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetCategories {
        
        private string databaseIdField;
        
        /// <remarks/>
        public string databaseId {
            get {
                return this.databaseIdField;
            }
            set {
                this.databaseIdField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class Event {
        
        private string nameField;
        
        private string organiserField;
        
        private System.DateTime startDateField;
        
        private string databaseIdField;
        
        /// <remarks/>
        public string Name {
            get {
                return this.nameField;
            }
            set {
                this.nameField = value;
            }
        }
        
        /// <remarks/>
        public string Organiser {
            get {
                return this.organiserField;
            }
            set {
                this.organiserField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime StartDate {
            get {
                return this.startDateField;
            }
            set {
                this.startDateField = value;
            }
        }
        
        /// <remarks/>
        public string DatabaseId {
            get {
                return this.databaseIdField;
            }
            set {
                this.databaseIdField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.bestik.cz/vysledky")]
    public partial class GetEventsResponse {
        
        private Event[] getEventsResultField;
        
        /// <remarks/>
        public Event[] GetEventsResult {
            get {
                return this.getEventsResultField;
            }
            set {
                this.getEventsResultField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    public delegate void GetEventsCompletedEventHandler(object sender, GetEventsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetEventsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetEventsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public GetEventsResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((GetEventsResponse)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    public delegate void GetCategoriesCompletedEventHandler(object sender, GetCategoriesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetCategoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetCategoriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public GetCategoriesResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((GetCategoriesResponse)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    public delegate void GetRunnersAndSplitsCompletedEventHandler(object sender, GetRunnersAndSplitsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetRunnersAndSplitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetRunnersAndSplitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public GetRunnersAndSplitsResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((GetRunnersAndSplitsResponse)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591