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

namespace BookCommunityService {
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class DataSetUserInfo : DataSet {
        
        private USER_INFODataTable tableUSER_INFO;
        
        public DataSetUserInfo() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DataSetUserInfo(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["USER_INFO"] != null)) {
                    this.Tables.Add(new USER_INFODataTable(ds.Tables["USER_INFO"]));
                }
                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.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public USER_INFODataTable USER_INFO {
            get {
                return this.tableUSER_INFO;
            }
        }
        
        public override DataSet Clone() {
            DataSetUserInfo cln = ((DataSetUserInfo)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["USER_INFO"] != null)) {
                this.Tables.Add(new USER_INFODataTable(ds.Tables["USER_INFO"]));
            }
            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();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableUSER_INFO = ((USER_INFODataTable)(this.Tables["USER_INFO"]));
            if ((this.tableUSER_INFO != null)) {
                this.tableUSER_INFO.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DataSetUserInfo";
            this.Prefix = "";
            this.Namespace = "http://www.tempuri.org/DataSetUserInfo.xsd";
            this.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableUSER_INFO = new USER_INFODataTable();
            this.Tables.Add(this.tableUSER_INFO);
        }
        
        private bool ShouldSerializeUSER_INFO() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void USER_INFORowChangeEventHandler(object sender, USER_INFORowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class USER_INFODataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnID;
            
            private DataColumn columnRealName;
            
            private DataColumn columnUserName;
            
            private DataColumn columnPassword;
            
            private DataColumn columnAddress;
            
            private DataColumn columnEmail;
            
            private DataColumn columnMobilePhone;
            
            private DataColumn columnHomePhone;
            
            private DataColumn columnWorkPhone;
            
            private DataColumn columnCompany;
            
            private DataColumn columnCompanyAddress;
            
            private DataColumn columnCredit;
            
            private DataColumn columnRatingNumber;
            
            internal USER_INFODataTable() : 
                    base("USER_INFO") {
                this.InitClass();
            }
            
            internal USER_INFODataTable(DataTable table) : 
                    base(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;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn IDColumn {
                get {
                    return this.columnID;
                }
            }
            
            internal DataColumn RealNameColumn {
                get {
                    return this.columnRealName;
                }
            }
            
            internal DataColumn UserNameColumn {
                get {
                    return this.columnUserName;
                }
            }
            
            internal DataColumn PasswordColumn {
                get {
                    return this.columnPassword;
                }
            }
            
            internal DataColumn AddressColumn {
                get {
                    return this.columnAddress;
                }
            }
            
            internal DataColumn EmailColumn {
                get {
                    return this.columnEmail;
                }
            }
            
            internal DataColumn MobilePhoneColumn {
                get {
                    return this.columnMobilePhone;
                }
            }
            
            internal DataColumn HomePhoneColumn {
                get {
                    return this.columnHomePhone;
                }
            }
            
            internal DataColumn WorkPhoneColumn {
                get {
                    return this.columnWorkPhone;
                }
            }
            
            internal DataColumn CompanyColumn {
                get {
                    return this.columnCompany;
                }
            }
            
            internal DataColumn CompanyAddressColumn {
                get {
                    return this.columnCompanyAddress;
                }
            }
            
            internal DataColumn CreditColumn {
                get {
                    return this.columnCredit;
                }
            }
            
            internal DataColumn RatingNumberColumn {
                get {
                    return this.columnRatingNumber;
                }
            }
            
            public USER_INFORow this[int index] {
                get {
                    return ((USER_INFORow)(this.Rows[index]));
                }
            }
            
            public event USER_INFORowChangeEventHandler USER_INFORowChanged;
            
            public event USER_INFORowChangeEventHandler USER_INFORowChanging;
            
            public event USER_INFORowChangeEventHandler USER_INFORowDeleted;
            
            public event USER_INFORowChangeEventHandler USER_INFORowDeleting;
            
            public void AddUSER_INFORow(USER_INFORow row) {
                this.Rows.Add(row);
            }
            
            public USER_INFORow AddUSER_INFORow(string RealName, string UserName, string Password, string Address, string Email, string MobilePhone, string HomePhone, string WorkPhone, string Company, string CompanyAddress, int Credit, int RatingNumber) {
                USER_INFORow rowUSER_INFORow = ((USER_INFORow)(this.NewRow()));
                rowUSER_INFORow.ItemArray = new object[] {
                        null,
                        RealName,
                        UserName,
                        Password,
                        Address,
                        Email,
                        MobilePhone,
                        HomePhone,
                        WorkPhone,
                        Company,
                        CompanyAddress,
                        Credit,
                        RatingNumber};
                this.Rows.Add(rowUSER_INFORow);
                return rowUSER_INFORow;
            }
            
            public USER_INFORow FindByID(int ID) {
                return ((USER_INFORow)(this.Rows.Find(new object[] {
                            ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                USER_INFODataTable cln = ((USER_INFODataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new USER_INFODataTable();
            }
            
            internal void InitVars() {
                this.columnID = this.Columns["ID"];
                this.columnRealName = this.Columns["RealName"];
                this.columnUserName = this.Columns["UserName"];
                this.columnPassword = this.Columns["Password"];
                this.columnAddress = this.Columns["Address"];
                this.columnEmail = this.Columns["Email"];
                this.columnMobilePhone = this.Columns["MobilePhone"];
                this.columnHomePhone = this.Columns["HomePhone"];
                this.columnWorkPhone = this.Columns["WorkPhone"];
                this.columnCompany = this.Columns["Company"];
                this.columnCompanyAddress = this.Columns["CompanyAddress"];
                this.columnCredit = this.Columns["Credit"];
                this.columnRatingNumber = this.Columns["RatingNumber"];
            }
            
            private void InitClass() {
                this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnID);
                this.columnRealName = new DataColumn("RealName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRealName);
                this.columnUserName = new DataColumn("UserName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnUserName);
                this.columnPassword = new DataColumn("Password", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPassword);
                this.columnAddress = new DataColumn("Address", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAddress);
                this.columnEmail = new DataColumn("Email", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEmail);
                this.columnMobilePhone = new DataColumn("MobilePhone", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnMobilePhone);
                this.columnHomePhone = new DataColumn("HomePhone", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnHomePhone);
                this.columnWorkPhone = new DataColumn("WorkPhone", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWorkPhone);
                this.columnCompany = new DataColumn("Company", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCompany);
                this.columnCompanyAddress = new DataColumn("CompanyAddress", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCompanyAddress);
                this.columnCredit = new DataColumn("Credit", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCredit);
                this.columnRatingNumber = new DataColumn("RatingNumber", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRatingNumber);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnID}, true));
                this.columnID.AutoIncrement = true;
                this.columnID.AllowDBNull = false;
                this.columnID.ReadOnly = true;
                this.columnID.Unique = true;
                this.columnRealName.AllowDBNull = false;
                this.columnUserName.AllowDBNull = false;
                this.columnPassword.AllowDBNull = false;
                this.columnAddress.AllowDBNull = false;
                this.columnEmail.AllowDBNull = false;
                this.columnMobilePhone.AllowDBNull = false;
                this.columnCredit.AllowDBNull = false;
                this.columnRatingNumber.AllowDBNull = false;
            }
            
            public USER_INFORow NewUSER_INFORow() {
                return ((USER_INFORow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new USER_INFORow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(USER_INFORow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.USER_INFORowChanged != null)) {
                    this.USER_INFORowChanged(this, new USER_INFORowChangeEvent(((USER_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.USER_INFORowChanging != null)) {
                    this.USER_INFORowChanging(this, new USER_INFORowChangeEvent(((USER_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.USER_INFORowDeleted != null)) {
                    this.USER_INFORowDeleted(this, new USER_INFORowChangeEvent(((USER_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.USER_INFORowDeleting != null)) {
                    this.USER_INFORowDeleting(this, new USER_INFORowChangeEvent(((USER_INFORow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveUSER_INFORow(USER_INFORow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class USER_INFORow : DataRow {
            
            private USER_INFODataTable tableUSER_INFO;
            
            internal USER_INFORow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableUSER_INFO = ((USER_INFODataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableUSER_INFO.IDColumn]));
                }
                set {
                    this[this.tableUSER_INFO.IDColumn] = value;
                }
            }
            
            public string RealName {
                get {
                    return ((string)(this[this.tableUSER_INFO.RealNameColumn]));
                }
                set {
                    this[this.tableUSER_INFO.RealNameColumn] = value;
                }
            }
            
            public string UserName {
                get {
                    return ((string)(this[this.tableUSER_INFO.UserNameColumn]));
                }
                set {
                    this[this.tableUSER_INFO.UserNameColumn] = value;
                }
            }
            
            public string Password {
                get {
                    return ((string)(this[this.tableUSER_INFO.PasswordColumn]));
                }
                set {
                    this[this.tableUSER_INFO.PasswordColumn] = value;
                }
            }
            
            public string Address {
                get {
                    return ((string)(this[this.tableUSER_INFO.AddressColumn]));
                }
                set {
                    this[this.tableUSER_INFO.AddressColumn] = value;
                }
            }
            
            public string Email {
                get {
                    return ((string)(this[this.tableUSER_INFO.EmailColumn]));
                }
                set {
                    this[this.tableUSER_INFO.EmailColumn] = value;
                }
            }
            
            public string MobilePhone {
                get {
                    return ((string)(this[this.tableUSER_INFO.MobilePhoneColumn]));
                }
                set {
                    this[this.tableUSER_INFO.MobilePhoneColumn] = value;
                }
            }
            
            public string HomePhone {
                get {
                    try {
                        return ((string)(this[this.tableUSER_INFO.HomePhoneColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableUSER_INFO.HomePhoneColumn] = value;
                }
            }
            
            public string WorkPhone {
                get {
                    try {
                        return ((string)(this[this.tableUSER_INFO.WorkPhoneColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableUSER_INFO.WorkPhoneColumn] = value;
                }
            }
            
            public string Company {
                get {
                    try {
                        return ((string)(this[this.tableUSER_INFO.CompanyColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableUSER_INFO.CompanyColumn] = value;
                }
            }
            
            public string CompanyAddress {
                get {
                    try {
                        return ((string)(this[this.tableUSER_INFO.CompanyAddressColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableUSER_INFO.CompanyAddressColumn] = value;
                }
            }
            
            public int Credit {
                get {
                    return ((int)(this[this.tableUSER_INFO.CreditColumn]));
                }
                set {
                    this[this.tableUSER_INFO.CreditColumn] = value;
                }
            }
            
            public int RatingNumber {
                get {
                    return ((int)(this[this.tableUSER_INFO.RatingNumberColumn]));
                }
                set {
                    this[this.tableUSER_INFO.RatingNumberColumn] = value;
                }
            }
            
            public bool IsHomePhoneNull() {
                return this.IsNull(this.tableUSER_INFO.HomePhoneColumn);
            }
            
            public void SetHomePhoneNull() {
                this[this.tableUSER_INFO.HomePhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsWorkPhoneNull() {
                return this.IsNull(this.tableUSER_INFO.WorkPhoneColumn);
            }
            
            public void SetWorkPhoneNull() {
                this[this.tableUSER_INFO.WorkPhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsCompanyNull() {
                return this.IsNull(this.tableUSER_INFO.CompanyColumn);
            }
            
            public void SetCompanyNull() {
                this[this.tableUSER_INFO.CompanyColumn] = System.Convert.DBNull;
            }
            
            public bool IsCompanyAddressNull() {
                return this.IsNull(this.tableUSER_INFO.CompanyAddressColumn);
            }
            
            public void SetCompanyAddressNull() {
                this[this.tableUSER_INFO.CompanyAddressColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class USER_INFORowChangeEvent : EventArgs {
            
            private USER_INFORow eventRow;
            
            private DataRowAction eventAction;
            
            public USER_INFORowChangeEvent(USER_INFORow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public USER_INFORow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
