//------------------------------------------------------------------------------
// <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 EnterpriseDesktop.Contacts.Proxy.Web {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://enterprisedesktop/webservices/contacts")]
    public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback GetAllContactsOperationCompleted;
        
        private System.Threading.SendOrPostCallback ValidateContactOperationCompleted;
        
        private System.Threading.SendOrPostCallback SaveContactOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public Service() {
            this.Url = global::EnterpriseDesktop.Contacts.Proxy.Properties.Settings.Default.EnterpriseDesktop_Contacts_Proxy_Web_Service;
            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 GetAllContactsCompletedEventHandler GetAllContactsCompleted;
        
        /// <remarks/>
        public event ValidateContactCompletedEventHandler ValidateContactCompleted;
        
        /// <remarks/>
        public event SaveContactCompletedEventHandler SaveContactCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://enterprisedesktop/webservices/contacts/GetAllContacts", RequestNamespace="http://enterprisedesktop/webservices/contacts", ResponseNamespace="http://enterprisedesktop/webservices/contacts", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public ContactDataSet GetAllContacts() {
            object[] results = this.Invoke("GetAllContacts", new object[0]);
            return ((ContactDataSet)(results[0]));
        }
        
        /// <remarks/>
        public void GetAllContactsAsync() {
            this.GetAllContactsAsync(null);
        }
        
        /// <remarks/>
        public void GetAllContactsAsync(object userState) {
            if ((this.GetAllContactsOperationCompleted == null)) {
                this.GetAllContactsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAllContactsOperationCompleted);
            }
            this.InvokeAsync("GetAllContacts", new object[0], this.GetAllContactsOperationCompleted, userState);
        }
        
        private void OnGetAllContactsOperationCompleted(object arg) {
            if ((this.GetAllContactsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetAllContactsCompleted(this, new GetAllContactsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://enterprisedesktop/webservices/contacts/ValidateContact", RequestNamespace="http://enterprisedesktop/webservices/contacts", ResponseNamespace="http://enterprisedesktop/webservices/contacts", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public Rule[] ValidateContact(ContactDataSet contact) {
            object[] results = this.Invoke("ValidateContact", new object[] {
                        contact});
            return ((Rule[])(results[0]));
        }
        
        /// <remarks/>
        public void ValidateContactAsync(ContactDataSet contact) {
            this.ValidateContactAsync(contact, null);
        }
        
        /// <remarks/>
        public void ValidateContactAsync(ContactDataSet contact, object userState) {
            if ((this.ValidateContactOperationCompleted == null)) {
                this.ValidateContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnValidateContactOperationCompleted);
            }
            this.InvokeAsync("ValidateContact", new object[] {
                        contact}, this.ValidateContactOperationCompleted, userState);
        }
        
        private void OnValidateContactOperationCompleted(object arg) {
            if ((this.ValidateContactCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ValidateContactCompleted(this, new ValidateContactCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://enterprisedesktop/webservices/contacts/SaveContact", RequestNamespace="http://enterprisedesktop/webservices/contacts", ResponseNamespace="http://enterprisedesktop/webservices/contacts", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool SaveContact(ContactDataSet contact, out Rule[] brokenRules) {
            object[] results = this.Invoke("SaveContact", new object[] {
                        contact});
            brokenRules = ((Rule[])(results[1]));
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public void SaveContactAsync(ContactDataSet contact) {
            this.SaveContactAsync(contact, null);
        }
        
        /// <remarks/>
        public void SaveContactAsync(ContactDataSet contact, object userState) {
            if ((this.SaveContactOperationCompleted == null)) {
                this.SaveContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveContactOperationCompleted);
            }
            this.InvokeAsync("SaveContact", new object[] {
                        contact}, this.SaveContactOperationCompleted, userState);
        }
        
        private void OnSaveContactOperationCompleted(object arg) {
            if ((this.SaveContactCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SaveContactCompleted(this, new SaveContactCompletedEventArgs(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;
        }
    }
    
    // This type definition was generated by System.Data.Design.TypedDataSetSchemaImporterExtension schema importer extension.
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
    [System.Xml.Serialization.XmlRootAttribute("ContactDataSet")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
    public partial class ContactDataSet : System.Data.DataSet {
        
        private ContactDataTable tableContact;
        
        private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public ContactDataSet() {
            this.BeginInit();
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            base.Relations.CollectionChanged += schemaChangedHandler;
            this.EndInit();
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected ContactDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context, false) {
            if ((this.IsBinarySerialized(info, context) == true)) {
                this.InitVars(false);
                System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
                this.Tables.CollectionChanged += schemaChangedHandler1;
                this.Relations.CollectionChanged += schemaChangedHandler1;
                return;
            }
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["Contact"] != null)) {
                    base.Tables.Add(new ContactDataTable(ds.Tables["Contact"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ContactDataTable Contact {
            get {
                return this.tableContact;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.BrowsableAttribute(true)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
        public override System.Data.SchemaSerializationMode SchemaSerializationMode {
            get {
                return this._schemaSerializationMode;
            }
            set {
                this._schemaSerializationMode = value;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataTableCollection Tables {
            get {
                return base.Tables;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataRelationCollection Relations {
            get {
                return base.Relations;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void InitializeDerivedDataSet() {
            this.BeginInit();
            this.InitClass();
            this.EndInit();
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public override System.Data.DataSet Clone() {
            ContactDataSet cln = ((ContactDataSet)(base.Clone()));
            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return cln;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
            if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                this.Reset();
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXml(reader);
                if ((ds.Tables["Contact"] != null)) {
                    base.Tables.Add(new ContactDataTable(ds.Tables["Contact"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXml(reader);
                this.InitVars();
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars() {
            this.InitVars(true);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars(bool initTable) {
            this.tableContact = ((ContactDataTable)(base.Tables["Contact"]));
            if ((initTable == true)) {
                if ((this.tableContact != null)) {
                    this.tableContact.InitVars();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitClass() {
            this.DataSetName = "ContactDataSet";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/ContactDataSet.xsd";
            this.EnforceConstraints = true;
            this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            this.tableContact = new ContactDataTable();
            base.Tables.Add(this.tableContact);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private bool ShouldSerializeContact() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
            ContactDataSet ds = new ContactDataSet();
            System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
            System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
            xs.Add(ds.GetSchemaSerializable());
            System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            return type;
        }
        
        public delegate void ContactRowChangeEventHandler(object sender, ContactRowChangeEvent e);
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ContactDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnNameStyle;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnPasswordHash;
            
            private System.Data.DataColumn columnPasswordSalt;
            
            private System.Data.DataColumn columnAdditionalContactInfo;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactDataTable() {
                this.TableName = "Contact";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal ContactDataTable(System.Data.DataTable table) {
                this.TableName = table.TableName;
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected ContactDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn NameStyleColumn {
                get {
                    return this.columnNameStyle;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn PasswordHashColumn {
                get {
                    return this.columnPasswordHash;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn PasswordSaltColumn {
                get {
                    return this.columnPasswordSalt;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn AdditionalContactInfoColumn {
                get {
                    return this.columnAdditionalContactInfo;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRow this[int index] {
                get {
                    return ((ContactRow)(this.Rows[index]));
                }
            }
            
            public event ContactRowChangeEventHandler ContactRowChanging;
            
            public event ContactRowChangeEventHandler ContactRowChanged;
            
            public event ContactRowChangeEventHandler ContactRowDeleting;
            
            public event ContactRowChangeEventHandler ContactRowDeleted;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void AddContactRow(ContactRow row) {
                this.Rows.Add(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRow AddContactRow(bool NameStyle, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string EmailAddress, int EmailPromotion, string Phone, string PasswordHash, string PasswordSalt, string AdditionalContactInfo, System.Guid rowguid, System.DateTime ModifiedDate) {
                ContactRow rowContactRow = ((ContactRow)(this.NewRow()));
                rowContactRow.ItemArray = new object[] {
                        null,
                        NameStyle,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        EmailAddress,
                        EmailPromotion,
                        Phone,
                        PasswordHash,
                        PasswordSalt,
                        AdditionalContactInfo,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowContactRow);
                return rowContactRow;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRow FindByContactID(int ContactID) {
                return ((ContactRow)(this.Rows.Find(new object[] {
                            ContactID})));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public override System.Data.DataTable Clone() {
                ContactDataTable cln = ((ContactDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataTable CreateInstance() {
                return new ContactDataTable();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal void InitVars() {
                this.columnContactID = base.Columns["ContactID"];
                this.columnNameStyle = base.Columns["NameStyle"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnPhone = base.Columns["Phone"];
                this.columnPasswordHash = base.Columns["PasswordHash"];
                this.columnPasswordSalt = base.Columns["PasswordSalt"];
                this.columnAdditionalContactInfo = base.Columns["AdditionalContactInfo"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private void InitClass() {
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnNameStyle = new System.Data.DataColumn("NameStyle", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNameStyle);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnPasswordHash = new System.Data.DataColumn("PasswordHash", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPasswordHash);
                this.columnPasswordSalt = new System.Data.DataColumn("PasswordSalt", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPasswordSalt);
                this.columnAdditionalContactInfo = new System.Data.DataColumn("AdditionalContactInfo", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAdditionalContactInfo);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactID}, true));
                this.columnContactID.AutoIncrement = true;
                this.columnContactID.AllowDBNull = false;
                this.columnContactID.ReadOnly = true;
                this.columnContactID.Unique = true;
                this.columnNameStyle.AllowDBNull = false;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnPhone.MaxLength = 25;
                this.columnPasswordHash.AllowDBNull = false;
                this.columnPasswordHash.MaxLength = 40;
                this.columnPasswordSalt.AllowDBNull = false;
                this.columnPasswordSalt.MaxLength = 10;
                this.columnAdditionalContactInfo.MaxLength = 2147483647;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRow NewContactRow() {
                return ((ContactRow)(this.NewRow()));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ContactRow(builder);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Type GetRowType() {
                return typeof(ContactRow);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ContactRowChanged != null)) {
                    this.ContactRowChanged(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ContactRowChanging != null)) {
                    this.ContactRowChanging(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ContactRowDeleted != null)) {
                    this.ContactRowDeleted(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ContactRowDeleting != null)) {
                    this.ContactRowDeleting(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void RemoveContactRow(ContactRow row) {
                this.Rows.Remove(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                ContactDataSet ds = new ContactDataSet();
                xs.Add(ds.GetSchemaSerializable());
                System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "ContactDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public partial class ContactRow : System.Data.DataRow {
            
            private ContactDataTable tableContact;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal ContactRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableContact = ((ContactDataTable)(this.Table));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int ContactID {
                get {
                    return ((int)(this[this.tableContact.ContactIDColumn]));
                }
                set {
                    this[this.tableContact.ContactIDColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool NameStyle {
                get {
                    return ((bool)(this[this.tableContact.NameStyleColumn]));
                }
                set {
                    this[this.tableContact.NameStyleColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tableContact.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.TitleColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string FirstName {
                get {
                    return ((string)(this[this.tableContact.FirstNameColumn]));
                }
                set {
                    this[this.tableContact.FirstNameColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tableContact.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.MiddleNameColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string LastName {
                get {
                    return ((string)(this[this.tableContact.LastNameColumn]));
                }
                set {
                    this[this.tableContact.LastNameColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tableContact.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.SuffixColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tableContact.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.EmailAddressColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tableContact.EmailPromotionColumn]));
                }
                set {
                    this[this.tableContact.EmailPromotionColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tableContact.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.PhoneColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string PasswordHash {
                get {
                    return ((string)(this[this.tableContact.PasswordHashColumn]));
                }
                set {
                    this[this.tableContact.PasswordHashColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string PasswordSalt {
                get {
                    return ((string)(this[this.tableContact.PasswordSaltColumn]));
                }
                set {
                    this[this.tableContact.PasswordSaltColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string AdditionalContactInfo {
                get {
                    try {
                        return ((string)(this[this.tableContact.AdditionalContactInfoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AdditionalContactInfo\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.AdditionalContactInfoColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableContact.rowguidColumn]));
                }
                set {
                    this[this.tableContact.rowguidColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableContact.ModifiedDateColumn]));
                }
                set {
                    this[this.tableContact.ModifiedDateColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsTitleNull() {
                return this.IsNull(this.tableContact.TitleColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetTitleNull() {
                this[this.tableContact.TitleColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tableContact.MiddleNameColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetMiddleNameNull() {
                this[this.tableContact.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsSuffixNull() {
                return this.IsNull(this.tableContact.SuffixColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetSuffixNull() {
                this[this.tableContact.SuffixColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tableContact.EmailAddressColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetEmailAddressNull() {
                this[this.tableContact.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsPhoneNull() {
                return this.IsNull(this.tableContact.PhoneColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetPhoneNull() {
                this[this.tableContact.PhoneColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsAdditionalContactInfoNull() {
                return this.IsNull(this.tableContact.AdditionalContactInfoColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetAdditionalContactInfoNull() {
                this[this.tableContact.AdditionalContactInfoColumn] = System.Convert.DBNull;
            }
        }
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public class ContactRowChangeEvent : System.EventArgs {
            
            private ContactRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRowChangeEvent(ContactRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ContactRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
    
    /// <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://enterprisedesktop/webservices/contacts")]
    public partial class Rule {
        
        private string propertyField;
        
        private string errorField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string property {
            get {
                return this.propertyField;
            }
            set {
                this.propertyField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string error {
            get {
                return this.errorField;
            }
            set {
                this.errorField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void GetAllContactsCompletedEventHandler(object sender, GetAllContactsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetAllContactsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetAllContactsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public ContactDataSet Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((ContactDataSet)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void ValidateContactCompletedEventHandler(object sender, ValidateContactCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ValidateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ValidateContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public Rule[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((Rule[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void SaveContactCompletedEventHandler(object sender, SaveContactCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SaveContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SaveContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public bool Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
        
        /// <remarks/>
        public Rule[] brokenRules {
            get {
                this.RaiseExceptionIfNecessary();
                return ((Rule[])(this.results[1]));
            }
        }
    }
}

#pragma warning restore 1591