www.pudn.com > WebPager.rar > MovieTDS.cs, change:2005-01-24,size:22445b


//------------------------------------------------------------------------------ 
// <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 Hooyee.Demo.WebPager { 
    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 MovieTDS : DataSet { 
         
        private MovieInfoDataTable tableMovieInfo; 
         
        public MovieTDS() { 
            this.InitClass(); 
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); 
            this.Tables.CollectionChanged += schemaChangedHandler; 
            this.Relations.CollectionChanged += schemaChangedHandler; 
        } 
         
        protected MovieTDS(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["MovieInfo"] != null)) { 
                    this.Tables.Add(new MovieInfoDataTable(ds.Tables["MovieInfo"])); 
                } 
                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 MovieInfoDataTable MovieInfo { 
            get { 
                return this.tableMovieInfo; 
            } 
        } 
         
        public override DataSet Clone() { 
            MovieTDS cln = ((MovieTDS)(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["MovieInfo"] != null)) { 
                this.Tables.Add(new MovieInfoDataTable(ds.Tables["MovieInfo"])); 
            } 
            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.tableMovieInfo = ((MovieInfoDataTable)(this.Tables["MovieInfo"])); 
            if ((this.tableMovieInfo != null)) { 
                this.tableMovieInfo.InitVars(); 
            } 
        } 
         
        private void InitClass() { 
            this.DataSetName = "MovieTDS"; 
            this.Prefix = ""; 
            this.Namespace = "http://www.hooyeesoft.com/Demo/Data/MovieTDS.xsd"; 
            this.Locale = new System.Globalization.CultureInfo("en-US"); 
            this.CaseSensitive = false; 
            this.EnforceConstraints = true; 
            this.tableMovieInfo = new MovieInfoDataTable(); 
            this.Tables.Add(this.tableMovieInfo); 
        } 
         
        private bool ShouldSerializeMovieInfo() { 
            return false; 
        } 
         
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { 
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) { 
                this.InitVars(); 
            } 
        } 
         
        public delegate void MovieInfoRowChangeEventHandler(object sender, MovieInfoRowChangeEvent e); 
         
        [System.Diagnostics.DebuggerStepThrough()] 
        public class MovieInfoDataTable : DataTable, System.Collections.IEnumerable { 
             
            private DataColumn columnIndex; 
             
            private DataColumn columnName; 
             
            private DataColumn columnEnName; 
             
            private DataColumn columnType; 
             
            private DataColumn columnPlayerList; 
             
            private DataColumn columnDirectorList; 
             
            private DataColumn columnRegion; 
             
            private DataColumn columnQuality; 
             
            internal MovieInfoDataTable() :  
                    base("MovieInfo") { 
                this.InitClass(); 
            } 
             
            internal MovieInfoDataTable(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 IndexColumn { 
                get { 
                    return this.columnIndex; 
                } 
            } 
             
            internal DataColumn NameColumn { 
                get { 
                    return this.columnName; 
                } 
            } 
             
            internal DataColumn EnNameColumn { 
                get { 
                    return this.columnEnName; 
                } 
            } 
             
            internal DataColumn TypeColumn { 
                get { 
                    return this.columnType; 
                } 
            } 
             
            internal DataColumn PlayerListColumn { 
                get { 
                    return this.columnPlayerList; 
                } 
            } 
             
            internal DataColumn DirectorListColumn { 
                get { 
                    return this.columnDirectorList; 
                } 
            } 
             
            internal DataColumn RegionColumn { 
                get { 
                    return this.columnRegion; 
                } 
            } 
             
            internal DataColumn QualityColumn { 
                get { 
                    return this.columnQuality; 
                } 
            } 
             
            public MovieInfoRow this[int index] { 
                get { 
                    return ((MovieInfoRow)(this.Rows[index])); 
                } 
            } 
             
            public event MovieInfoRowChangeEventHandler MovieInfoRowChanged; 
             
            public event MovieInfoRowChangeEventHandler MovieInfoRowChanging; 
             
            public event MovieInfoRowChangeEventHandler MovieInfoRowDeleted; 
             
            public event MovieInfoRowChangeEventHandler MovieInfoRowDeleting; 
             
            public void AddMovieInfoRow(MovieInfoRow row) { 
                this.Rows.Add(row); 
            } 
             
            public MovieInfoRow AddMovieInfoRow(int Index, string Name, string EnName, string Type, string PlayerList, string DirectorList, string Region, string Quality) { 
                MovieInfoRow rowMovieInfoRow = ((MovieInfoRow)(this.NewRow())); 
                rowMovieInfoRow.ItemArray = new object[] { 
                        Index, 
                        Name, 
                        EnName, 
                        Type, 
                        PlayerList, 
                        DirectorList, 
                        Region, 
                        Quality}; 
                this.Rows.Add(rowMovieInfoRow); 
                return rowMovieInfoRow; 
            } 
             
            public System.Collections.IEnumerator GetEnumerator() { 
                return this.Rows.GetEnumerator(); 
            } 
             
            public override DataTable Clone() { 
                MovieInfoDataTable cln = ((MovieInfoDataTable)(base.Clone())); 
                cln.InitVars(); 
                return cln; 
            } 
             
            protected override DataTable CreateInstance() { 
                return new MovieInfoDataTable(); 
            } 
             
            internal void InitVars() { 
                this.columnIndex = this.Columns["Index"]; 
                this.columnName = this.Columns["Name"]; 
                this.columnEnName = this.Columns["EnName"]; 
                this.columnType = this.Columns["Type"]; 
                this.columnPlayerList = this.Columns["PlayerList"]; 
                this.columnDirectorList = this.Columns["DirectorList"]; 
                this.columnRegion = this.Columns["Region"]; 
                this.columnQuality = this.Columns["Quality"]; 
            } 
             
            private void InitClass() { 
                this.columnIndex = new DataColumn("Index", typeof(int), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnIndex); 
                this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnName); 
                this.columnEnName = new DataColumn("EnName", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnEnName); 
                this.columnType = new DataColumn("Type", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnType); 
                this.columnPlayerList = new DataColumn("PlayerList", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnPlayerList); 
                this.columnDirectorList = new DataColumn("DirectorList", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnDirectorList); 
                this.columnRegion = new DataColumn("Region", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnRegion); 
                this.columnQuality = new DataColumn("Quality", typeof(string), null, System.Data.MappingType.Element); 
                this.Columns.Add(this.columnQuality); 
            } 
             
            public MovieInfoRow NewMovieInfoRow() { 
                return ((MovieInfoRow)(this.NewRow())); 
            } 
             
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) { 
                return new MovieInfoRow(builder); 
            } 
             
            protected override System.Type GetRowType() { 
                return typeof(MovieInfoRow); 
            } 
             
            protected override void OnRowChanged(DataRowChangeEventArgs e) { 
                base.OnRowChanged(e); 
                if ((this.MovieInfoRowChanged != null)) { 
                    this.MovieInfoRowChanged(this, new MovieInfoRowChangeEvent(((MovieInfoRow)(e.Row)), e.Action)); 
                } 
            } 
             
            protected override void OnRowChanging(DataRowChangeEventArgs e) { 
                base.OnRowChanging(e); 
                if ((this.MovieInfoRowChanging != null)) { 
                    this.MovieInfoRowChanging(this, new MovieInfoRowChangeEvent(((MovieInfoRow)(e.Row)), e.Action)); 
                } 
            } 
             
            protected override void OnRowDeleted(DataRowChangeEventArgs e) { 
                base.OnRowDeleted(e); 
                if ((this.MovieInfoRowDeleted != null)) { 
                    this.MovieInfoRowDeleted(this, new MovieInfoRowChangeEvent(((MovieInfoRow)(e.Row)), e.Action)); 
                } 
            } 
             
            protected override void OnRowDeleting(DataRowChangeEventArgs e) { 
                base.OnRowDeleting(e); 
                if ((this.MovieInfoRowDeleting != null)) { 
                    this.MovieInfoRowDeleting(this, new MovieInfoRowChangeEvent(((MovieInfoRow)(e.Row)), e.Action)); 
                } 
            } 
             
            public void RemoveMovieInfoRow(MovieInfoRow row) { 
                this.Rows.Remove(row); 
            } 
        } 
         
        [System.Diagnostics.DebuggerStepThrough()] 
        public class MovieInfoRow : DataRow { 
             
            private MovieInfoDataTable tableMovieInfo; 
             
            internal MovieInfoRow(DataRowBuilder rb) :  
                    base(rb) { 
                this.tableMovieInfo = ((MovieInfoDataTable)(this.Table)); 
            } 
             
            public int Index { 
                get { 
                    try { 
                        return ((int)(this[this.tableMovieInfo.IndexColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.IndexColumn] = value; 
                } 
            } 
             
            public string Name { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.NameColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.NameColumn] = value; 
                } 
            } 
             
            public string EnName { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.EnNameColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.EnNameColumn] = value; 
                } 
            } 
             
            public string Type { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.TypeColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.TypeColumn] = value; 
                } 
            } 
             
            public string PlayerList { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.PlayerListColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.PlayerListColumn] = value; 
                } 
            } 
             
            public string DirectorList { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.DirectorListColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.DirectorListColumn] = value; 
                } 
            } 
             
            public string Region { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.RegionColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.RegionColumn] = value; 
                } 
            } 
             
            public string Quality { 
                get { 
                    try { 
                        return ((string)(this[this.tableMovieInfo.QualityColumn])); 
                    } 
                    catch (InvalidCastException e) { 
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e); 
                    } 
                } 
                set { 
                    this[this.tableMovieInfo.QualityColumn] = value; 
                } 
            } 
             
            public bool IsIndexNull() { 
                return this.IsNull(this.tableMovieInfo.IndexColumn); 
            } 
             
            public void SetIndexNull() { 
                this[this.tableMovieInfo.IndexColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsNameNull() { 
                return this.IsNull(this.tableMovieInfo.NameColumn); 
            } 
             
            public void SetNameNull() { 
                this[this.tableMovieInfo.NameColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsEnNameNull() { 
                return this.IsNull(this.tableMovieInfo.EnNameColumn); 
            } 
             
            public void SetEnNameNull() { 
                this[this.tableMovieInfo.EnNameColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsTypeNull() { 
                return this.IsNull(this.tableMovieInfo.TypeColumn); 
            } 
             
            public void SetTypeNull() { 
                this[this.tableMovieInfo.TypeColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsPlayerListNull() { 
                return this.IsNull(this.tableMovieInfo.PlayerListColumn); 
            } 
             
            public void SetPlayerListNull() { 
                this[this.tableMovieInfo.PlayerListColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsDirectorListNull() { 
                return this.IsNull(this.tableMovieInfo.DirectorListColumn); 
            } 
             
            public void SetDirectorListNull() { 
                this[this.tableMovieInfo.DirectorListColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsRegionNull() { 
                return this.IsNull(this.tableMovieInfo.RegionColumn); 
            } 
             
            public void SetRegionNull() { 
                this[this.tableMovieInfo.RegionColumn] = System.Convert.DBNull; 
            } 
             
            public bool IsQualityNull() { 
                return this.IsNull(this.tableMovieInfo.QualityColumn); 
            } 
             
            public void SetQualityNull() { 
                this[this.tableMovieInfo.QualityColumn] = System.Convert.DBNull; 
            } 
        } 
         
        [System.Diagnostics.DebuggerStepThrough()] 
        public class MovieInfoRowChangeEvent : EventArgs { 
             
            private MovieInfoRow eventRow; 
             
            private DataRowAction eventAction; 
             
            public MovieInfoRowChangeEvent(MovieInfoRow row, DataRowAction action) { 
                this.eventRow = row; 
                this.eventAction = action; 
            } 
             
            public MovieInfoRow Row { 
                get { 
                    return this.eventRow; 
                } 
            } 
             
            public DataRowAction Action { 
                get { 
                    return this.eventAction; 
                } 
            } 
        } 
    } 
}