//------------------------------------------------------------------------------
// <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 DataSetOnlineInfo : DataSet {
        
        private ONLINE_INFODataTable tableONLINE_INFO;
        
        public DataSetOnlineInfo() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DataSetOnlineInfo(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["ONLINE_INFO"] != null)) {
                    this.Tables.Add(new ONLINE_INFODataTable(ds.Tables["ONLINE_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 ONLINE_INFODataTable ONLINE_INFO {
            get {
                return this.tableONLINE_INFO;
            }
        }
        
        public override DataSet Clone() {
            DataSetOnlineInfo cln = ((DataSetOnlineInfo)(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["ONLINE_INFO"] != null)) {
                this.Tables.Add(new ONLINE_INFODataTable(ds.Tables["ONLINE_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.tableONLINE_INFO = ((ONLINE_INFODataTable)(this.Tables["ONLINE_INFO"]));
            if ((this.tableONLINE_INFO != null)) {
                this.tableONLINE_INFO.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DataSetOnlineInfo";
            this.Prefix = "";
            this.Namespace = "http://www.tempuri.org/DataSetOnlineInfo.xsd";
            this.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableONLINE_INFO = new ONLINE_INFODataTable();
            this.Tables.Add(this.tableONLINE_INFO);
        }
        
        private bool ShouldSerializeONLINE_INFO() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void ONLINE_INFORowChangeEventHandler(object sender, ONLINE_INFORowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ONLINE_INFODataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnID;
            
            private DataColumn columnBook;
            
            private DataColumn columnSite;
            
            private DataColumn columnURL;
            
            private DataColumn columnContent;
            
            private DataColumn columnTitle;
            
            internal ONLINE_INFODataTable() : 
                    base("ONLINE_INFO") {
                this.InitClass();
            }
            
            internal ONLINE_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 BookColumn {
                get {
                    return this.columnBook;
                }
            }
            
            internal DataColumn SiteColumn {
                get {
                    return this.columnSite;
                }
            }
            
            internal DataColumn URLColumn {
                get {
                    return this.columnURL;
                }
            }
            
            internal DataColumn ContentColumn {
                get {
                    return this.columnContent;
                }
            }
            
            internal DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public ONLINE_INFORow this[int index] {
                get {
                    return ((ONLINE_INFORow)(this.Rows[index]));
                }
            }
            
            public event ONLINE_INFORowChangeEventHandler ONLINE_INFORowChanged;
            
            public event ONLINE_INFORowChangeEventHandler ONLINE_INFORowChanging;
            
            public event ONLINE_INFORowChangeEventHandler ONLINE_INFORowDeleted;
            
            public event ONLINE_INFORowChangeEventHandler ONLINE_INFORowDeleting;
            
            public void AddONLINE_INFORow(ONLINE_INFORow row) {
                this.Rows.Add(row);
            }
            
            public ONLINE_INFORow AddONLINE_INFORow(int Book, string Site, string URL, string Content, string Title) {
                ONLINE_INFORow rowONLINE_INFORow = ((ONLINE_INFORow)(this.NewRow()));
                rowONLINE_INFORow.ItemArray = new object[] {
                        null,
                        Book,
                        Site,
                        URL,
                        Content,
                        Title};
                this.Rows.Add(rowONLINE_INFORow);
                return rowONLINE_INFORow;
            }
            
            public ONLINE_INFORow FindByID(int ID) {
                return ((ONLINE_INFORow)(this.Rows.Find(new object[] {
                            ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ONLINE_INFODataTable cln = ((ONLINE_INFODataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ONLINE_INFODataTable();
            }
            
            internal void InitVars() {
                this.columnID = this.Columns["ID"];
                this.columnBook = this.Columns["Book"];
                this.columnSite = this.Columns["Site"];
                this.columnURL = this.Columns["URL"];
                this.columnContent = this.Columns["Content"];
                this.columnTitle = this.Columns["Title"];
            }
            
            private void InitClass() {
                this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnID);
                this.columnBook = new DataColumn("Book", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBook);
                this.columnSite = new DataColumn("Site", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSite);
                this.columnURL = new DataColumn("URL", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnURL);
                this.columnContent = new DataColumn("Content", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnContent);
                this.columnTitle = new DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTitle);
                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.columnBook.AllowDBNull = false;
            }
            
            public ONLINE_INFORow NewONLINE_INFORow() {
                return ((ONLINE_INFORow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ONLINE_INFORow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ONLINE_INFORow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ONLINE_INFORowChanged != null)) {
                    this.ONLINE_INFORowChanged(this, new ONLINE_INFORowChangeEvent(((ONLINE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ONLINE_INFORowChanging != null)) {
                    this.ONLINE_INFORowChanging(this, new ONLINE_INFORowChangeEvent(((ONLINE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ONLINE_INFORowDeleted != null)) {
                    this.ONLINE_INFORowDeleted(this, new ONLINE_INFORowChangeEvent(((ONLINE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ONLINE_INFORowDeleting != null)) {
                    this.ONLINE_INFORowDeleting(this, new ONLINE_INFORowChangeEvent(((ONLINE_INFORow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveONLINE_INFORow(ONLINE_INFORow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ONLINE_INFORow : DataRow {
            
            private ONLINE_INFODataTable tableONLINE_INFO;
            
            internal ONLINE_INFORow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableONLINE_INFO = ((ONLINE_INFODataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableONLINE_INFO.IDColumn]));
                }
                set {
                    this[this.tableONLINE_INFO.IDColumn] = value;
                }
            }
            
            public int Book {
                get {
                    return ((int)(this[this.tableONLINE_INFO.BookColumn]));
                }
                set {
                    this[this.tableONLINE_INFO.BookColumn] = value;
                }
            }
            
            public string Site {
                get {
                    try {
                        return ((string)(this[this.tableONLINE_INFO.SiteColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableONLINE_INFO.SiteColumn] = value;
                }
            }
            
            public string URL {
                get {
                    try {
                        return ((string)(this[this.tableONLINE_INFO.URLColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableONLINE_INFO.URLColumn] = value;
                }
            }
            
            public string Content {
                get {
                    try {
                        return ((string)(this[this.tableONLINE_INFO.ContentColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableONLINE_INFO.ContentColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tableONLINE_INFO.TitleColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableONLINE_INFO.TitleColumn] = value;
                }
            }
            
            public bool IsSiteNull() {
                return this.IsNull(this.tableONLINE_INFO.SiteColumn);
            }
            
            public void SetSiteNull() {
                this[this.tableONLINE_INFO.SiteColumn] = System.Convert.DBNull;
            }
            
            public bool IsURLNull() {
                return this.IsNull(this.tableONLINE_INFO.URLColumn);
            }
            
            public void SetURLNull() {
                this[this.tableONLINE_INFO.URLColumn] = System.Convert.DBNull;
            }
            
            public bool IsContentNull() {
                return this.IsNull(this.tableONLINE_INFO.ContentColumn);
            }
            
            public void SetContentNull() {
                this[this.tableONLINE_INFO.ContentColumn] = System.Convert.DBNull;
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tableONLINE_INFO.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tableONLINE_INFO.TitleColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ONLINE_INFORowChangeEvent : EventArgs {
            
            private ONLINE_INFORow eventRow;
            
            private DataRowAction eventAction;
            
            public ONLINE_INFORowChangeEvent(ONLINE_INFORow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ONLINE_INFORow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
