⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataset_xyxk.cs

📁 一个很简单的考试系统。实用性很强啊!数据库在里面
💻 CS
📖 第 1 页 / 共 3 页
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace bizdb {
    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 Dataset_xyxk : DataSet {
        
        private subjectDataTable tablesubject;
        
        private specialityDataTable tablespeciality;
        
        private CourseDataTable tableCourse;
        
        private knowledgeSystemDataTable tableknowledgeSystem;
        
        public Dataset_xyxk() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected Dataset_xyxk(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["subject"] != null)) {
                    this.Tables.Add(new subjectDataTable(ds.Tables["subject"]));
                }
                if ((ds.Tables["speciality"] != null)) {
                    this.Tables.Add(new specialityDataTable(ds.Tables["speciality"]));
                }
                if ((ds.Tables["Course"] != null)) {
                    this.Tables.Add(new CourseDataTable(ds.Tables["Course"]));
                }
                if ((ds.Tables["knowledgeSystem"] != null)) {
                    this.Tables.Add(new knowledgeSystemDataTable(ds.Tables["knowledgeSystem"]));
                }
                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 subjectDataTable subject {
            get {
                return this.tablesubject;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public specialityDataTable speciality {
            get {
                return this.tablespeciality;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CourseDataTable Course {
            get {
                return this.tableCourse;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public knowledgeSystemDataTable knowledgeSystem {
            get {
                return this.tableknowledgeSystem;
            }
        }
        
        public override DataSet Clone() {
            Dataset_xyxk cln = ((Dataset_xyxk)(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["subject"] != null)) {
                this.Tables.Add(new subjectDataTable(ds.Tables["subject"]));
            }
            if ((ds.Tables["speciality"] != null)) {
                this.Tables.Add(new specialityDataTable(ds.Tables["speciality"]));
            }
            if ((ds.Tables["Course"] != null)) {
                this.Tables.Add(new CourseDataTable(ds.Tables["Course"]));
            }
            if ((ds.Tables["knowledgeSystem"] != null)) {
                this.Tables.Add(new knowledgeSystemDataTable(ds.Tables["knowledgeSystem"]));
            }
            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.tablesubject = ((subjectDataTable)(this.Tables["subject"]));
            if ((this.tablesubject != null)) {
                this.tablesubject.InitVars();
            }
            this.tablespeciality = ((specialityDataTable)(this.Tables["speciality"]));
            if ((this.tablespeciality != null)) {
                this.tablespeciality.InitVars();
            }
            this.tableCourse = ((CourseDataTable)(this.Tables["Course"]));
            if ((this.tableCourse != null)) {
                this.tableCourse.InitVars();
            }
            this.tableknowledgeSystem = ((knowledgeSystemDataTable)(this.Tables["knowledgeSystem"]));
            if ((this.tableknowledgeSystem != null)) {
                this.tableknowledgeSystem.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "Dataset_xyxk";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/Dataset_xyxk.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tablesubject = new subjectDataTable();
            this.Tables.Add(this.tablesubject);
            this.tablespeciality = new specialityDataTable();
            this.Tables.Add(this.tablespeciality);
            this.tableCourse = new CourseDataTable();
            this.Tables.Add(this.tableCourse);
            this.tableknowledgeSystem = new knowledgeSystemDataTable();
            this.Tables.Add(this.tableknowledgeSystem);
        }
        
        private bool ShouldSerializesubject() {
            return false;
        }
        
        private bool ShouldSerializespeciality() {
            return false;
        }
        
        private bool ShouldSerializeCourse() {
            return false;
        }
        
        private bool ShouldSerializeknowledgeSystem() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void subjectRowChangeEventHandler(object sender, subjectRowChangeEvent e);
        
        public delegate void specialityRowChangeEventHandler(object sender, specialityRowChangeEvent e);
        
        public delegate void CourseRowChangeEventHandler(object sender, CourseRowChangeEvent e);
        
        public delegate void knowledgeSystemRowChangeEventHandler(object sender, knowledgeSystemRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class subjectDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnsub_no;
            
            private DataColumn columnsub_name;
            
            internal subjectDataTable() : 
                    base("subject") {
                this.InitClass();
            }
            
            internal subjectDataTable(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 sub_noColumn {
                get {
                    return this.columnsub_no;
                }
            }
            
            internal DataColumn sub_nameColumn {
                get {
                    return this.columnsub_name;
                }
            }
            
            public subjectRow this[int index] {
                get {
                    return ((subjectRow)(this.Rows[index]));
                }
            }
            
            public event subjectRowChangeEventHandler subjectRowChanged;
            
            public event subjectRowChangeEventHandler subjectRowChanging;
            
            public event subjectRowChangeEventHandler subjectRowDeleted;
            
            public event subjectRowChangeEventHandler subjectRowDeleting;
            
            public void AddsubjectRow(subjectRow row) {
                this.Rows.Add(row);
            }
            
            public subjectRow AddsubjectRow(int sub_no, string sub_name) {
                subjectRow rowsubjectRow = ((subjectRow)(this.NewRow()));
                rowsubjectRow.ItemArray = new object[] {
                        sub_no,
                        sub_name};
                this.Rows.Add(rowsubjectRow);
                return rowsubjectRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                subjectDataTable cln = ((subjectDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new subjectDataTable();
            }
            
            internal void InitVars() {
                this.columnsub_no = this.Columns["sub_no"];
                this.columnsub_name = this.Columns["sub_name"];
            }
            
            private void InitClass() {
                this.columnsub_no = new DataColumn("sub_no", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnsub_no);
                this.columnsub_name = new DataColumn("sub_name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnsub_name);
            }
            
            public subjectRow NewsubjectRow() {
                return ((subjectRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new subjectRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(subjectRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.subjectRowChanged != null)) {
                    this.subjectRowChanged(this, new subjectRowChangeEvent(((subjectRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.subjectRowChanging != null)) {
                    this.subjectRowChanging(this, new subjectRowChangeEvent(((subjectRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.subjectRowDeleted != null)) {
                    this.subjectRowDeleted(this, new subjectRowChangeEvent(((subjectRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.subjectRowDeleting != null)) {
                    this.subjectRowDeleting(this, new subjectRowChangeEvent(((subjectRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovesubjectRow(subjectRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class subjectRow : DataRow {
            
            private subjectDataTable tablesubject;
            
            internal subjectRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablesubject = ((subjectDataTable)(this.Table));
            }
            
            public int sub_no {
                get {
                    try {
                        return ((int)(this[this.tablesubject.sub_noColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablesubject.sub_noColumn] = value;
                }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -