//------------------------------------------------------------------------------
// <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 DataSetBook : DataSet {
        
        private BOOK_INFODataTable tableBOOK_INFO;
        
        public DataSetBook() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DataSetBook(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["BOOK_INFO"] != null)) {
                    this.Tables.Add(new BOOK_INFODataTable(ds.Tables["BOOK_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 BOOK_INFODataTable BOOK_INFO {
            get {
                return this.tableBOOK_INFO;
            }
        }
        
        public override DataSet Clone() {
            DataSetBook cln = ((DataSetBook)(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["BOOK_INFO"] != null)) {
                this.Tables.Add(new BOOK_INFODataTable(ds.Tables["BOOK_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.tableBOOK_INFO = ((BOOK_INFODataTable)(this.Tables["BOOK_INFO"]));
            if ((this.tableBOOK_INFO != null)) {
                this.tableBOOK_INFO.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DataSetBook";
            this.Prefix = "";
            this.Namespace = "http://www.tempuri.org/DataSetBook.xsd";
            this.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableBOOK_INFO = new BOOK_INFODataTable();
            this.Tables.Add(this.tableBOOK_INFO);
        }
        
        private bool ShouldSerializeBOOK_INFO() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void BOOK_INFORowChangeEventHandler(object sender, BOOK_INFORowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BOOK_INFODataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnID;
            
            private DataColumn columnBookNameEng;
            
            private DataColumn columnBookNameChn;
            
            private DataColumn columnAuthor;
            
            private DataColumn columnTranslator;
            
            private DataColumn columnPress;
            
            private DataColumn columnISBN;
            
            private DataColumn columnSummary;
            
            private DataColumn columnCoverPage;
            
            private DataColumn columnContents;
            
            private DataColumn columnStatus;
            
            private DataColumn columnOwner;
            
            private DataColumn columnCurrentShareInfo;
            
            internal BOOK_INFODataTable() : 
                    base("BOOK_INFO") {
                this.InitClass();
            }
            
            internal BOOK_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 BookNameEngColumn {
                get {
                    return this.columnBookNameEng;
                }
            }
            
            internal DataColumn BookNameChnColumn {
                get {
                    return this.columnBookNameChn;
                }
            }
            
            internal DataColumn AuthorColumn {
                get {
                    return this.columnAuthor;
                }
            }
            
            internal DataColumn TranslatorColumn {
                get {
                    return this.columnTranslator;
                }
            }
            
            internal DataColumn PressColumn {
                get {
                    return this.columnPress;
                }
            }
            
            internal DataColumn ISBNColumn {
                get {
                    return this.columnISBN;
                }
            }
            
            internal DataColumn SummaryColumn {
                get {
                    return this.columnSummary;
                }
            }
            
            internal DataColumn CoverPageColumn {
                get {
                    return this.columnCoverPage;
                }
            }
            
            internal DataColumn ContentsColumn {
                get {
                    return this.columnContents;
                }
            }
            
            internal DataColumn StatusColumn {
                get {
                    return this.columnStatus;
                }
            }
            
            internal DataColumn OwnerColumn {
                get {
                    return this.columnOwner;
                }
            }
            
            internal DataColumn CurrentShareInfoColumn {
                get {
                    return this.columnCurrentShareInfo;
                }
            }
            
            public BOOK_INFORow this[int index] {
                get {
                    return ((BOOK_INFORow)(this.Rows[index]));
                }
            }
            
            public event BOOK_INFORowChangeEventHandler BOOK_INFORowChanged;
            
            public event BOOK_INFORowChangeEventHandler BOOK_INFORowChanging;
            
            public event BOOK_INFORowChangeEventHandler BOOK_INFORowDeleted;
            
            public event BOOK_INFORowChangeEventHandler BOOK_INFORowDeleting;
            
            public void AddBOOK_INFORow(BOOK_INFORow row) {
                this.Rows.Add(row);
            }
            
            public BOOK_INFORow AddBOOK_INFORow(string BookNameEng, string BookNameChn, string Author, string Translator, string Press, string ISBN, string Summary, string CoverPage, string Contents, string Status, int Owner, int CurrentShareInfo) {
                BOOK_INFORow rowBOOK_INFORow = ((BOOK_INFORow)(this.NewRow()));
                rowBOOK_INFORow.ItemArray = new object[] {
                        null,
                        BookNameEng,
                        BookNameChn,
                        Author,
                        Translator,
                        Press,
                        ISBN,
                        Summary,
                        CoverPage,
                        Contents,
                        Status,
                        Owner,
                        CurrentShareInfo};
                this.Rows.Add(rowBOOK_INFORow);
                return rowBOOK_INFORow;
            }
            
            public BOOK_INFORow FindByID(int ID) {
                return ((BOOK_INFORow)(this.Rows.Find(new object[] {
                            ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                BOOK_INFODataTable cln = ((BOOK_INFODataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new BOOK_INFODataTable();
            }
            
            internal void InitVars() {
                this.columnID = this.Columns["ID"];
                this.columnBookNameEng = this.Columns["BookNameEng"];
                this.columnBookNameChn = this.Columns["BookNameChn"];
                this.columnAuthor = this.Columns["Author"];
                this.columnTranslator = this.Columns["Translator"];
                this.columnPress = this.Columns["Press"];
                this.columnISBN = this.Columns["ISBN"];
                this.columnSummary = this.Columns["Summary"];
                this.columnCoverPage = this.Columns["CoverPage"];
                this.columnContents = this.Columns["Contents"];
                this.columnStatus = this.Columns["Status"];
                this.columnOwner = this.Columns["Owner"];
                this.columnCurrentShareInfo = this.Columns["CurrentShareInfo"];
            }
            
            private void InitClass() {
                this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnID);
                this.columnBookNameEng = new DataColumn("BookNameEng", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBookNameEng);
                this.columnBookNameChn = new DataColumn("BookNameChn", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBookNameChn);
                this.columnAuthor = new DataColumn("Author", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAuthor);
                this.columnTranslator = new DataColumn("Translator", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTranslator);
                this.columnPress = new DataColumn("Press", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPress);
                this.columnISBN = new DataColumn("ISBN", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnISBN);
                this.columnSummary = new DataColumn("Summary", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSummary);
                this.columnCoverPage = new DataColumn("CoverPage", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCoverPage);
                this.columnContents = new DataColumn("Contents", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnContents);
                this.columnStatus = new DataColumn("Status", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStatus);
                this.columnOwner = new DataColumn("Owner", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnOwner);
                this.columnCurrentShareInfo = new DataColumn("CurrentShareInfo", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCurrentShareInfo);
                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.columnOwner.AllowDBNull = false;
            }
            
            public BOOK_INFORow NewBOOK_INFORow() {
                return ((BOOK_INFORow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new BOOK_INFORow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(BOOK_INFORow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.BOOK_INFORowChanged != null)) {
                    this.BOOK_INFORowChanged(this, new BOOK_INFORowChangeEvent(((BOOK_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.BOOK_INFORowChanging != null)) {
                    this.BOOK_INFORowChanging(this, new BOOK_INFORowChangeEvent(((BOOK_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.BOOK_INFORowDeleted != null)) {
                    this.BOOK_INFORowDeleted(this, new BOOK_INFORowChangeEvent(((BOOK_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.BOOK_INFORowDeleting != null)) {
                    this.BOOK_INFORowDeleting(this, new BOOK_INFORowChangeEvent(((BOOK_INFORow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveBOOK_INFORow(BOOK_INFORow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BOOK_INFORow : DataRow {
            
            private BOOK_INFODataTable tableBOOK_INFO;
            
            internal BOOK_INFORow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableBOOK_INFO = ((BOOK_INFODataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableBOOK_INFO.IDColumn]));
                }
                set {
                    this[this.tableBOOK_INFO.IDColumn] = value;
                }
            }
            
            public string BookNameEng {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.BookNameEngColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.BookNameEngColumn] = value;
                }
            }
            
            public string BookNameChn {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.BookNameChnColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.BookNameChnColumn] = value;
                }
            }
            
            public string Author {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.AuthorColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.AuthorColumn] = value;
                }
            }
            
            public string Translator {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.TranslatorColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.TranslatorColumn] = value;
                }
            }
            
            public string Press {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.PressColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.PressColumn] = value;
                }
            }
            
            public string ISBN {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.ISBNColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.ISBNColumn] = value;
                }
            }
            
            public string Summary {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.SummaryColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.SummaryColumn] = value;
                }
            }
            
            public string CoverPage {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.CoverPageColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.CoverPageColumn] = value;
                }
            }
            
            public string Contents {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.ContentsColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.ContentsColumn] = value;
                }
            }
            
            public string Status {
                get {
                    try {
                        return ((string)(this[this.tableBOOK_INFO.StatusColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.StatusColumn] = value;
                }
            }
            
            public int Owner {
                get {
                    return ((int)(this[this.tableBOOK_INFO.OwnerColumn]));
                }
                set {
                    this[this.tableBOOK_INFO.OwnerColumn] = value;
                }
            }
            
            public int CurrentShareInfo {
                get {
                    try {
                        return ((int)(this[this.tableBOOK_INFO.CurrentShareInfoColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBOOK_INFO.CurrentShareInfoColumn] = value;
                }
            }
            
            public bool IsBookNameEngNull() {
                return this.IsNull(this.tableBOOK_INFO.BookNameEngColumn);
            }
            
            public void SetBookNameEngNull() {
                this[this.tableBOOK_INFO.BookNameEngColumn] = System.Convert.DBNull;
            }
            
            public bool IsBookNameChnNull() {
                return this.IsNull(this.tableBOOK_INFO.BookNameChnColumn);
            }
            
            public void SetBookNameChnNull() {
                this[this.tableBOOK_INFO.BookNameChnColumn] = System.Convert.DBNull;
            }
            
            public bool IsAuthorNull() {
                return this.IsNull(this.tableBOOK_INFO.AuthorColumn);
            }
            
            public void SetAuthorNull() {
                this[this.tableBOOK_INFO.AuthorColumn] = System.Convert.DBNull;
            }
            
            public bool IsTranslatorNull() {
                return this.IsNull(this.tableBOOK_INFO.TranslatorColumn);
            }
            
            public void SetTranslatorNull() {
                this[this.tableBOOK_INFO.TranslatorColumn] = System.Convert.DBNull;
            }
            
            public bool IsPressNull() {
                return this.IsNull(this.tableBOOK_INFO.PressColumn);
            }
            
            public void SetPressNull() {
                this[this.tableBOOK_INFO.PressColumn] = System.Convert.DBNull;
            }
            
            public bool IsISBNNull() {
                return this.IsNull(this.tableBOOK_INFO.ISBNColumn);
            }
            
            public void SetISBNNull() {
                this[this.tableBOOK_INFO.ISBNColumn] = System.Convert.DBNull;
            }
            
            public bool IsSummaryNull() {
                return this.IsNull(this.tableBOOK_INFO.SummaryColumn);
            }
            
            public void SetSummaryNull() {
                this[this.tableBOOK_INFO.SummaryColumn] = System.Convert.DBNull;
            }
            
            public bool IsCoverPageNull() {
                return this.IsNull(this.tableBOOK_INFO.CoverPageColumn);
            }
            
            public void SetCoverPageNull() {
                this[this.tableBOOK_INFO.CoverPageColumn] = System.Convert.DBNull;
            }
            
            public bool IsContentsNull() {
                return this.IsNull(this.tableBOOK_INFO.ContentsColumn);
            }
            
            public void SetContentsNull() {
                this[this.tableBOOK_INFO.ContentsColumn] = System.Convert.DBNull;
            }
            
            public bool IsStatusNull() {
                return this.IsNull(this.tableBOOK_INFO.StatusColumn);
            }
            
            public void SetStatusNull() {
                this[this.tableBOOK_INFO.StatusColumn] = System.Convert.DBNull;
            }
            
            public bool IsCurrentShareInfoNull() {
                return this.IsNull(this.tableBOOK_INFO.CurrentShareInfoColumn);
            }
            
            public void SetCurrentShareInfoNull() {
                this[this.tableBOOK_INFO.CurrentShareInfoColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BOOK_INFORowChangeEvent : EventArgs {
            
            private BOOK_INFORow eventRow;
            
            private DataRowAction eventAction;
            
            public BOOK_INFORowChangeEvent(BOOK_INFORow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public BOOK_INFORow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
