//------------------------------------------------------------------------------
// <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 DataSetShareInfo : DataSet {
        
        private SHARE_INFODataTable tableSHARE_INFO;
        
        public DataSetShareInfo() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DataSetShareInfo(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["SHARE_INFO"] != null)) {
                    this.Tables.Add(new SHARE_INFODataTable(ds.Tables["SHARE_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 SHARE_INFODataTable SHARE_INFO {
            get {
                return this.tableSHARE_INFO;
            }
        }
        
        public override DataSet Clone() {
            DataSetShareInfo cln = ((DataSetShareInfo)(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["SHARE_INFO"] != null)) {
                this.Tables.Add(new SHARE_INFODataTable(ds.Tables["SHARE_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.tableSHARE_INFO = ((SHARE_INFODataTable)(this.Tables["SHARE_INFO"]));
            if ((this.tableSHARE_INFO != null)) {
                this.tableSHARE_INFO.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DataSetShareInfo";
            this.Prefix = "";
            this.Namespace = "http://www.tempuri.org/DataSetShareInfo.xsd";
            this.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableSHARE_INFO = new SHARE_INFODataTable();
            this.Tables.Add(this.tableSHARE_INFO);
        }
        
        private bool ShouldSerializeSHARE_INFO() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void SHARE_INFORowChangeEventHandler(object sender, SHARE_INFORowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SHARE_INFODataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnID;
            
            private DataColumn columnBook;
            
            private DataColumn columnShareTo;
            
            private DataColumn columnShareFrom;
            
            private DataColumn columnActualBeginDate;
            
            private DataColumn columnActualEndDate;
            
            private DataColumn columnPlanBeginDate;
            
            private DataColumn columnPlanEndDate;
            
            private DataColumn columnDepreciation;
            
            private DataColumn columnStatus;
            
            internal SHARE_INFODataTable() : 
                    base("SHARE_INFO") {
                this.InitClass();
            }
            
            internal SHARE_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 ShareToColumn {
                get {
                    return this.columnShareTo;
                }
            }
            
            internal DataColumn ShareFromColumn {
                get {
                    return this.columnShareFrom;
                }
            }
            
            internal DataColumn ActualBeginDateColumn {
                get {
                    return this.columnActualBeginDate;
                }
            }
            
            internal DataColumn ActualEndDateColumn {
                get {
                    return this.columnActualEndDate;
                }
            }
            
            internal DataColumn PlanBeginDateColumn {
                get {
                    return this.columnPlanBeginDate;
                }
            }
            
            internal DataColumn PlanEndDateColumn {
                get {
                    return this.columnPlanEndDate;
                }
            }
            
            internal DataColumn DepreciationColumn {
                get {
                    return this.columnDepreciation;
                }
            }
            
            internal DataColumn StatusColumn {
                get {
                    return this.columnStatus;
                }
            }
            
            public SHARE_INFORow this[int index] {
                get {
                    return ((SHARE_INFORow)(this.Rows[index]));
                }
            }
            
            public event SHARE_INFORowChangeEventHandler SHARE_INFORowChanged;
            
            public event SHARE_INFORowChangeEventHandler SHARE_INFORowChanging;
            
            public event SHARE_INFORowChangeEventHandler SHARE_INFORowDeleted;
            
            public event SHARE_INFORowChangeEventHandler SHARE_INFORowDeleting;
            
            public void AddSHARE_INFORow(SHARE_INFORow row) {
                this.Rows.Add(row);
            }
            
            public SHARE_INFORow AddSHARE_INFORow(int Book, int ShareTo, int ShareFrom, System.DateTime ActualBeginDate, System.DateTime ActualEndDate, System.DateTime PlanBeginDate, System.DateTime PlanEndDate, int Depreciation, string Status) {
                SHARE_INFORow rowSHARE_INFORow = ((SHARE_INFORow)(this.NewRow()));
                rowSHARE_INFORow.ItemArray = new object[] {
                        null,
                        Book,
                        ShareTo,
                        ShareFrom,
                        ActualBeginDate,
                        ActualEndDate,
                        PlanBeginDate,
                        PlanEndDate,
                        Depreciation,
                        Status};
                this.Rows.Add(rowSHARE_INFORow);
                return rowSHARE_INFORow;
            }
            
            public SHARE_INFORow FindByID(int ID) {
                return ((SHARE_INFORow)(this.Rows.Find(new object[] {
                            ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                SHARE_INFODataTable cln = ((SHARE_INFODataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new SHARE_INFODataTable();
            }
            
            internal void InitVars() {
                this.columnID = this.Columns["ID"];
                this.columnBook = this.Columns["Book"];
                this.columnShareTo = this.Columns["ShareTo"];
                this.columnShareFrom = this.Columns["ShareFrom"];
                this.columnActualBeginDate = this.Columns["ActualBeginDate"];
                this.columnActualEndDate = this.Columns["ActualEndDate"];
                this.columnPlanBeginDate = this.Columns["PlanBeginDate"];
                this.columnPlanEndDate = this.Columns["PlanEndDate"];
                this.columnDepreciation = this.Columns["Depreciation"];
                this.columnStatus = this.Columns["Status"];
            }
            
            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.columnShareTo = new DataColumn("ShareTo", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnShareTo);
                this.columnShareFrom = new DataColumn("ShareFrom", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnShareFrom);
                this.columnActualBeginDate = new DataColumn("ActualBeginDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnActualBeginDate);
                this.columnActualEndDate = new DataColumn("ActualEndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnActualEndDate);
                this.columnPlanBeginDate = new DataColumn("PlanBeginDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPlanBeginDate);
                this.columnPlanEndDate = new DataColumn("PlanEndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPlanEndDate);
                this.columnDepreciation = new DataColumn("Depreciation", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDepreciation);
                this.columnStatus = new DataColumn("Status", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStatus);
                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 SHARE_INFORow NewSHARE_INFORow() {
                return ((SHARE_INFORow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new SHARE_INFORow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SHARE_INFORow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SHARE_INFORowChanged != null)) {
                    this.SHARE_INFORowChanged(this, new SHARE_INFORowChangeEvent(((SHARE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SHARE_INFORowChanging != null)) {
                    this.SHARE_INFORowChanging(this, new SHARE_INFORowChangeEvent(((SHARE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SHARE_INFORowDeleted != null)) {
                    this.SHARE_INFORowDeleted(this, new SHARE_INFORowChangeEvent(((SHARE_INFORow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SHARE_INFORowDeleting != null)) {
                    this.SHARE_INFORowDeleting(this, new SHARE_INFORowChangeEvent(((SHARE_INFORow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSHARE_INFORow(SHARE_INFORow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SHARE_INFORow : DataRow {
            
            private SHARE_INFODataTable tableSHARE_INFO;
            
            internal SHARE_INFORow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSHARE_INFO = ((SHARE_INFODataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableSHARE_INFO.IDColumn]));
                }
                set {
                    this[this.tableSHARE_INFO.IDColumn] = value;
                }
            }
            
            public int Book {
                get {
                    return ((int)(this[this.tableSHARE_INFO.BookColumn]));
                }
                set {
                    this[this.tableSHARE_INFO.BookColumn] = value;
                }
            }
            
            public int ShareTo {
                get {
                    try {
                        return ((int)(this[this.tableSHARE_INFO.ShareToColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.ShareToColumn] = value;
                }
            }
            
            public int ShareFrom {
                get {
                    try {
                        return ((int)(this[this.tableSHARE_INFO.ShareFromColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.ShareFromColumn] = value;
                }
            }
            
            public System.DateTime ActualBeginDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSHARE_INFO.ActualBeginDateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.ActualBeginDateColumn] = value;
                }
            }
            
            public System.DateTime ActualEndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSHARE_INFO.ActualEndDateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.ActualEndDateColumn] = value;
                }
            }
            
            public System.DateTime PlanBeginDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSHARE_INFO.PlanBeginDateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.PlanBeginDateColumn] = value;
                }
            }
            
            public System.DateTime PlanEndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSHARE_INFO.PlanEndDateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.PlanEndDateColumn] = value;
                }
            }
            
            public int Depreciation {
                get {
                    try {
                        return ((int)(this[this.tableSHARE_INFO.DepreciationColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.DepreciationColumn] = value;
                }
            }
            
            public string Status {
                get {
                    try {
                        return ((string)(this[this.tableSHARE_INFO.StatusColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值，因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSHARE_INFO.StatusColumn] = value;
                }
            }
            
            public bool IsShareToNull() {
                return this.IsNull(this.tableSHARE_INFO.ShareToColumn);
            }
            
            public void SetShareToNull() {
                this[this.tableSHARE_INFO.ShareToColumn] = System.Convert.DBNull;
            }
            
            public bool IsShareFromNull() {
                return this.IsNull(this.tableSHARE_INFO.ShareFromColumn);
            }
            
            public void SetShareFromNull() {
                this[this.tableSHARE_INFO.ShareFromColumn] = System.Convert.DBNull;
            }
            
            public bool IsActualBeginDateNull() {
                return this.IsNull(this.tableSHARE_INFO.ActualBeginDateColumn);
            }
            
            public void SetActualBeginDateNull() {
                this[this.tableSHARE_INFO.ActualBeginDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsActualEndDateNull() {
                return this.IsNull(this.tableSHARE_INFO.ActualEndDateColumn);
            }
            
            public void SetActualEndDateNull() {
                this[this.tableSHARE_INFO.ActualEndDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsPlanBeginDateNull() {
                return this.IsNull(this.tableSHARE_INFO.PlanBeginDateColumn);
            }
            
            public void SetPlanBeginDateNull() {
                this[this.tableSHARE_INFO.PlanBeginDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsPlanEndDateNull() {
                return this.IsNull(this.tableSHARE_INFO.PlanEndDateColumn);
            }
            
            public void SetPlanEndDateNull() {
                this[this.tableSHARE_INFO.PlanEndDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsDepreciationNull() {
                return this.IsNull(this.tableSHARE_INFO.DepreciationColumn);
            }
            
            public void SetDepreciationNull() {
                this[this.tableSHARE_INFO.DepreciationColumn] = System.Convert.DBNull;
            }
            
            public bool IsStatusNull() {
                return this.IsNull(this.tableSHARE_INFO.StatusColumn);
            }
            
            public void SetStatusNull() {
                this[this.tableSHARE_INFO.StatusColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SHARE_INFORowChangeEvent : EventArgs {
            
            private SHARE_INFORow eventRow;
            
            private DataRowAction eventAction;
            
            public SHARE_INFORowChangeEvent(SHARE_INFORow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SHARE_INFORow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
