//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.312
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

#pragma warning disable 1591

namespace EnterpriseDesktop.Contacts.DataLayer {
    using System;
    
    
    [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 = 128;
                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;
                }
            }
        }
    }
}
namespace EnterpriseDesktop.Contacts.DataLayer.ContactDataSetTableAdapters {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class ContactTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter _adapter;
        
        private System.Data.SqlClient.SqlConnection _connection;
        
        private System.Data.SqlClient.SqlCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public ContactTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this._connection == null)) {
                    this.InitConnection();
                }
                return this._connection;
            }
            set {
                this._connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool ClearBeforeFill {
            get {
                return this._clearBeforeFill;
            }
            set {
                this._clearBeforeFill = value;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitAdapter() {
            this._adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Contact";
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("NameStyle", "NameStyle");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("PasswordHash", "PasswordHash");
            tableMapping.ColumnMappings.Add("PasswordSalt", "PasswordSalt");
            tableMapping.ColumnMappings.Add("AdditionalContactInfo", "AdditionalContactInfo");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = @"DELETE FROM [Person].[Contact] WHERE (([ContactID] = @Original_ContactID) AND ([NameStyle] = @Original_NameStyle) AND ((@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_Suffix = 1 AND [Suffix] IS NULL) OR ([Suffix] = @Original_Suffix)) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ([EmailPromotion] = @Original_EmailPromotion) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ([PasswordHash] = @Original_PasswordHash) AND ([PasswordSalt] = @Original_PasswordSalt) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Title", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Suffix", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = @"INSERT INTO [Person].[Contact] ([NameStyle], [Title], [FirstName], [MiddleName], [LastName], [Suffix], [EmailAddress], [EmailPromotion], [Phone], [PasswordHash], [PasswordSalt], [AdditionalContactInfo], [rowguid], [ModifiedDate]) VALUES (@NameStyle, @Title, @FirstName, @MiddleName, @LastName, @Suffix, @EmailAddress, @EmailPromotion, @Phone, @PasswordHash, @PasswordSalt, @AdditionalContactInfo, @rowguid, @ModifiedDate);
SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, EmailAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactInfo, rowguid, ModifiedDate FROM Person.Contact WHERE (ContactID = SCOPE_IDENTITY())";
            this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AdditionalContactInfo", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "AdditionalContactInfo", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = @"UPDATE [Person].[Contact] SET [NameStyle] = @NameStyle, [Title] = @Title, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [Suffix] = @Suffix, [EmailAddress] = @EmailAddress, [EmailPromotion] = @EmailPromotion, [Phone] = @Phone, [PasswordHash] = @PasswordHash, [PasswordSalt] = @PasswordSalt, [AdditionalContactInfo] = @AdditionalContactInfo, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ContactID] = @Original_ContactID) AND ([NameStyle] = @Original_NameStyle) AND ((@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_Suffix = 1 AND [Suffix] IS NULL) OR ([Suffix] = @Original_Suffix)) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ([EmailPromotion] = @Original_EmailPromotion) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ([PasswordHash] = @Original_PasswordHash) AND ([PasswordSalt] = @Original_PasswordSalt) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, EmailAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactInfo, rowguid, ModifiedDate FROM Person.Contact WHERE (ContactID = @ContactID)";
            this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AdditionalContactInfo", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "AdditionalContactInfo", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Title", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Suffix", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::EnterpriseDesktop.Contacts.DataLayer.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, Emai" +
                "lAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactIn" +
                "fo, rowguid, ModifiedDate FROM Person.Contact";
            this._commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(ContactDataSet.ContactDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual ContactDataSet.ContactDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            ContactDataSet.ContactDataTable dataTable = new ContactDataSet.ContactDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(ContactDataSet.ContactDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(ContactDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Contact");
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ContactID, bool Original_NameStyle, string Original_Title, string Original_FirstName, string Original_MiddleName, string Original_LastName, string Original_Suffix, string Original_EmailAddress, int Original_EmailPromotion, string Original_Phone, string Original_PasswordHash, string Original_PasswordSalt, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((bool)(Original_NameStyle));
            if ((Original_Title == null)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Title));
            }
            if ((Original_FirstName == null)) {
                throw new System.ArgumentNullException("Original_FirstName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_FirstName));
            }
            if ((Original_MiddleName == null)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_MiddleName));
            }
            if ((Original_LastName == null)) {
                throw new System.ArgumentNullException("Original_LastName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_LastName));
            }
            if ((Original_Suffix == null)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_Suffix));
            }
            if ((Original_EmailAddress == null)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_EmailPromotion));
            if ((Original_Phone == null)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Phone));
            }
            if ((Original_PasswordHash == null)) {
                throw new System.ArgumentNullException("Original_PasswordHash");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_PasswordHash));
            }
            if ((Original_PasswordSalt == null)) {
                throw new System.ArgumentNullException("Original_PasswordSalt");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_PasswordSalt));
            }
            this.Adapter.DeleteCommand.Parameters[17].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[18].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(bool NameStyle, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string EmailAddress, int EmailPromotion, string Phone, string PasswordHash, string PasswordSalt, object AdditionalContactInfo, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((bool)(NameStyle));
            if ((Title == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Title));
            }
            if ((FirstName == null)) {
                throw new System.ArgumentNullException("FirstName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(FirstName));
            }
            if ((MiddleName == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(MiddleName));
            }
            if ((LastName == null)) {
                throw new System.ArgumentNullException("LastName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(LastName));
            }
            if ((Suffix == null)) {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Suffix));
            }
            if ((EmailAddress == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(EmailAddress));
            }
            this.Adapter.InsertCommand.Parameters[7].Value = ((int)(EmailPromotion));
            if ((Phone == null)) {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Phone));
            }
            if ((PasswordHash == null)) {
                throw new System.ArgumentNullException("PasswordHash");
            }
            else {
                this.Adapter.InsertCommand.Parameters[9].Value = ((string)(PasswordHash));
            }
            if ((PasswordSalt == null)) {
                throw new System.ArgumentNullException("PasswordSalt");
            }
            else {
                this.Adapter.InsertCommand.Parameters[10].Value = ((string)(PasswordSalt));
            }
            if ((AdditionalContactInfo == null)) {
                this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[11].Value = ((object)(AdditionalContactInfo));
            }
            this.Adapter.InsertCommand.Parameters[12].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[13].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.InsertCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    bool NameStyle, 
                    string Title, 
                    string FirstName, 
                    string MiddleName, 
                    string LastName, 
                    string Suffix, 
                    string EmailAddress, 
                    int EmailPromotion, 
                    string Phone, 
                    string PasswordHash, 
                    string PasswordSalt, 
                    object AdditionalContactInfo, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_ContactID, 
                    bool Original_NameStyle, 
                    string Original_Title, 
                    string Original_FirstName, 
                    string Original_MiddleName, 
                    string Original_LastName, 
                    string Original_Suffix, 
                    string Original_EmailAddress, 
                    int Original_EmailPromotion, 
                    string Original_Phone, 
                    string Original_PasswordHash, 
                    string Original_PasswordSalt, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int ContactID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((bool)(NameStyle));
            if ((Title == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Title));
            }
            if ((FirstName == null)) {
                throw new System.ArgumentNullException("FirstName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(FirstName));
            }
            if ((MiddleName == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(MiddleName));
            }
            if ((LastName == null)) {
                throw new System.ArgumentNullException("LastName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(LastName));
            }
            if ((Suffix == null)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Suffix));
            }
            if ((EmailAddress == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(EmailPromotion));
            if ((Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Phone));
            }
            if ((PasswordHash == null)) {
                throw new System.ArgumentNullException("PasswordHash");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(PasswordHash));
            }
            if ((PasswordSalt == null)) {
                throw new System.ArgumentNullException("PasswordSalt");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(PasswordSalt));
            }
            if ((AdditionalContactInfo == null)) {
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(AdditionalContactInfo));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((bool)(Original_NameStyle));
            if ((Original_Title == null)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_Title));
            }
            if ((Original_FirstName == null)) {
                throw new System.ArgumentNullException("Original_FirstName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_FirstName));
            }
            if ((Original_MiddleName == null)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_MiddleName));
            }
            if ((Original_LastName == null)) {
                throw new System.ArgumentNullException("Original_LastName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_LastName));
            }
            if ((Original_Suffix == null)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_Suffix));
            }
            if ((Original_EmailAddress == null)) {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_EmailPromotion));
            if ((Original_Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[28].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_Phone));
            }
            if ((Original_PasswordHash == null)) {
                throw new System.ArgumentNullException("Original_PasswordHash");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_PasswordHash));
            }
            if ((Original_PasswordSalt == null)) {
                throw new System.ArgumentNullException("Original_PasswordSalt");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_PasswordSalt));
            }
            this.Adapter.UpdateCommand.Parameters[31].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(ContactID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
}

#pragma warning restore 1591