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

namespace EQTrack.BlackhawkReportService {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    using System.Data;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ReportServiceSoap", Namespace="http://www.theblackhawk.co.nz/")]
    public partial class ReportService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback TrackingReportOperationCompleted;
        
        private System.Threading.SendOrPostCallback FullTrackingReportOperationCompleted;
        
        private System.Threading.SendOrPostCallback InvoiceStatisticsOperationCompleted;
        
        private System.Threading.SendOrPostCallback EventChargesOperationCompleted;
        
        private System.Threading.SendOrPostCallback SMSOutboundChargesOperationCompleted;
        
        private System.Threading.SendOrPostCallback SMSInboundChargesOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ReportService() {
            this.Url = global::EQTrack.Properties.Settings.Default.BH_TOOLBOX_BlackhawkReportService_ReportService;
            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 TrackingReportCompletedEventHandler TrackingReportCompleted;
        
        /// <remarks/>
        public event FullTrackingReportCompletedEventHandler FullTrackingReportCompleted;
        
        /// <remarks/>
        public event InvoiceStatisticsCompletedEventHandler InvoiceStatisticsCompleted;
        
        /// <remarks/>
        public event EventChargesCompletedEventHandler EventChargesCompleted;
        
        /// <remarks/>
        public event SMSOutboundChargesCompletedEventHandler SMSOutboundChargesCompleted;
        
        /// <remarks/>
        public event SMSInboundChargesCompletedEventHandler SMSInboundChargesCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/TrackingReport", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable TrackingReport(string Device, string From, string To, int MinumumSpeed, int TimeSpan, decimal Resolution) {
            object[] results = this.Invoke("TrackingReport", new object[] {
                        Device,
                        From,
                        To,
                        MinumumSpeed,
                        TimeSpan,
                        Resolution});
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void TrackingReportAsync(string Device, string From, string To, int MinumumSpeed, int TimeSpan, decimal Resolution) {
            this.TrackingReportAsync(Device, From, To, MinumumSpeed, TimeSpan, Resolution, null);
        }
        
        /// <remarks/>
        public void TrackingReportAsync(string Device, string From, string To, int MinumumSpeed, int TimeSpan, decimal Resolution, object userState) {
            if ((this.TrackingReportOperationCompleted == null)) {
                this.TrackingReportOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTrackingReportOperationCompleted);
            }
            this.InvokeAsync("TrackingReport", new object[] {
                        Device,
                        From,
                        To,
                        MinumumSpeed,
                        TimeSpan,
                        Resolution}, this.TrackingReportOperationCompleted, userState);
        }
        
        private void OnTrackingReportOperationCompleted(object arg) {
            if ((this.TrackingReportCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.TrackingReportCompleted(this, new TrackingReportCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/FullTrackingReport", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable FullTrackingReport(string Device, string From, string To) {
            object[] results = this.Invoke("FullTrackingReport", new object[] {
                        Device,
                        From,
                        To});
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void FullTrackingReportAsync(string Device, string From, string To) {
            this.FullTrackingReportAsync(Device, From, To, null);
        }
        
        /// <remarks/>
        public void FullTrackingReportAsync(string Device, string From, string To, object userState) {
            if ((this.FullTrackingReportOperationCompleted == null)) {
                this.FullTrackingReportOperationCompleted = new System.Threading.SendOrPostCallback(this.OnFullTrackingReportOperationCompleted);
            }
            this.InvokeAsync("FullTrackingReport", new object[] {
                        Device,
                        From,
                        To}, this.FullTrackingReportOperationCompleted, userState);
        }
        
        private void OnFullTrackingReportOperationCompleted(object arg) {
            if ((this.FullTrackingReportCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.FullTrackingReportCompleted(this, new FullTrackingReportCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/InvoiceStatistics", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable InvoiceStatistics() {
            object[] results = this.Invoke("InvoiceStatistics", new object[0]);
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void InvoiceStatisticsAsync() {
            this.InvoiceStatisticsAsync(null);
        }
        
        /// <remarks/>
        public void InvoiceStatisticsAsync(object userState) {
            if ((this.InvoiceStatisticsOperationCompleted == null)) {
                this.InvoiceStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInvoiceStatisticsOperationCompleted);
            }
            this.InvokeAsync("InvoiceStatistics", new object[0], this.InvoiceStatisticsOperationCompleted, userState);
        }
        
        private void OnInvoiceStatisticsOperationCompleted(object arg) {
            if ((this.InvoiceStatisticsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.InvoiceStatisticsCompleted(this, new InvoiceStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/EventCharges", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable EventCharges(int DeviceSet, string From, string To) {
            object[] results = this.Invoke("EventCharges", new object[] {
                        DeviceSet,
                        From,
                        To});
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void EventChargesAsync(int DeviceSet, string From, string To) {
            this.EventChargesAsync(DeviceSet, From, To, null);
        }
        
        /// <remarks/>
        public void EventChargesAsync(int DeviceSet, string From, string To, object userState) {
            if ((this.EventChargesOperationCompleted == null)) {
                this.EventChargesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEventChargesOperationCompleted);
            }
            this.InvokeAsync("EventCharges", new object[] {
                        DeviceSet,
                        From,
                        To}, this.EventChargesOperationCompleted, userState);
        }
        
        private void OnEventChargesOperationCompleted(object arg) {
            if ((this.EventChargesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.EventChargesCompleted(this, new EventChargesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/SMSOutboundCharges", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable SMSOutboundCharges(int DeviceSet, string From, string To) {
            object[] results = this.Invoke("SMSOutboundCharges", new object[] {
                        DeviceSet,
                        From,
                        To});
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void SMSOutboundChargesAsync(int DeviceSet, string From, string To) {
            this.SMSOutboundChargesAsync(DeviceSet, From, To, null);
        }
        
        /// <remarks/>
        public void SMSOutboundChargesAsync(int DeviceSet, string From, string To, object userState) {
            if ((this.SMSOutboundChargesOperationCompleted == null)) {
                this.SMSOutboundChargesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSMSOutboundChargesOperationCompleted);
            }
            this.InvokeAsync("SMSOutboundCharges", new object[] {
                        DeviceSet,
                        From,
                        To}, this.SMSOutboundChargesOperationCompleted, userState);
        }
        
        private void OnSMSOutboundChargesOperationCompleted(object arg) {
            if ((this.SMSOutboundChargesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SMSOutboundChargesCompleted(this, new SMSOutboundChargesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.theblackhawk.co.nz/SMSInboundCharges", RequestNamespace="http://www.theblackhawk.co.nz/", ResponseNamespace="http://www.theblackhawk.co.nz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataTable SMSInboundCharges(int DeviceSet, string From, string To) {
            object[] results = this.Invoke("SMSInboundCharges", new object[] {
                        DeviceSet,
                        From,
                        To});
            return ((System.Data.DataTable)(results[0]));
        }
        
        /// <remarks/>
        public void SMSInboundChargesAsync(int DeviceSet, string From, string To) {
            this.SMSInboundChargesAsync(DeviceSet, From, To, null);
        }
        
        /// <remarks/>
        public void SMSInboundChargesAsync(int DeviceSet, string From, string To, object userState) {
            if ((this.SMSInboundChargesOperationCompleted == null)) {
                this.SMSInboundChargesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSMSInboundChargesOperationCompleted);
            }
            this.InvokeAsync("SMSInboundCharges", new object[] {
                        DeviceSet,
                        From,
                        To}, this.SMSInboundChargesOperationCompleted, userState);
        }
        
        private void OnSMSInboundChargesOperationCompleted(object arg) {
            if ((this.SMSInboundChargesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SMSInboundChargesCompleted(this, new SMSInboundChargesCompletedEventArgs(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.Web.Services", "2.0.50727.1433")]
    public delegate void TrackingReportCompletedEventHandler(object sender, TrackingReportCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class TrackingReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal TrackingReportCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void FullTrackingReportCompletedEventHandler(object sender, FullTrackingReportCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class FullTrackingReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal FullTrackingReportCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void InvoiceStatisticsCompletedEventHandler(object sender, InvoiceStatisticsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class InvoiceStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal InvoiceStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void EventChargesCompletedEventHandler(object sender, EventChargesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class EventChargesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal EventChargesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void SMSOutboundChargesCompletedEventHandler(object sender, SMSOutboundChargesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SMSOutboundChargesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SMSOutboundChargesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void SMSInboundChargesCompletedEventHandler(object sender, SMSInboundChargesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SMSInboundChargesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SMSInboundChargesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataTable Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataTable)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591