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

📄 dataset1.cs

📁 数据库的课程设计作业。管理有关学生、课程的基本信息
💻 CS
📖 第 1 页 / 共 5 页
字号:
            }
            
            private void InitClass() {
                this.column学号 = new DataColumn("学号", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column学号);
                this.column学号.AllowDBNull = false;
            }
            
            public 过渡表Row New过渡表Row() {
                return ((过渡表Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new 过渡表Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(过渡表Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.过渡表RowChanged != null)) {
                    this.过渡表RowChanged(this, new 过渡表RowChangeEvent(((过渡表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.过渡表RowChanging != null)) {
                    this.过渡表RowChanging(this, new 过渡表RowChangeEvent(((过渡表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.过渡表RowDeleted != null)) {
                    this.过渡表RowDeleted(this, new 过渡表RowChangeEvent(((过渡表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.过渡表RowDeleting != null)) {
                    this.过渡表RowDeleting(this, new 过渡表RowChangeEvent(((过渡表Row)(e.Row)), e.Action));
                }
            }
            
            public void Remove过渡表Row(过渡表Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 过渡表Row : DataRow {
            
            private 过渡表DataTable table过渡表;
            
            internal 过渡表Row(DataRowBuilder rb) : 
                    base(rb) {
                this.table过渡表 = ((过渡表DataTable)(this.Table));
            }
            
            public string 学号 {
                get {
                    return ((string)(this[this.table过渡表.学号Column]));
                }
                set {
                    this[this.table过渡表.学号Column] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 过渡表RowChangeEvent : EventArgs {
            
            private 过渡表Row eventRow;
            
            private DataRowAction eventAction;
            
            public 过渡表RowChangeEvent(过渡表Row row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public 过渡表Row Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 学生表DataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn column学号;
            
            private DataColumn column姓名;
            
            private DataColumn column性别;
            
            private DataColumn column出生日期;
            
            private DataColumn column班级名称;
            
            private DataColumn column所属院系;
            
            private DataColumn column年级;
            
            private DataColumn column学制;
            
            internal 学生表DataTable() : 
                    base("学生表") {
                this.InitClass();
            }
            
            internal 学生表DataTable(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 学号Column {
                get {
                    return this.column学号;
                }
            }
            
            internal DataColumn 姓名Column {
                get {
                    return this.column姓名;
                }
            }
            
            internal DataColumn 性别Column {
                get {
                    return this.column性别;
                }
            }
            
            internal DataColumn 出生日期Column {
                get {
                    return this.column出生日期;
                }
            }
            
            internal DataColumn 班级名称Column {
                get {
                    return this.column班级名称;
                }
            }
            
            internal DataColumn 所属院系Column {
                get {
                    return this.column所属院系;
                }
            }
            
            internal DataColumn 年级Column {
                get {
                    return this.column年级;
                }
            }
            
            internal DataColumn 学制Column {
                get {
                    return this.column学制;
                }
            }
            
            public 学生表Row this[int index] {
                get {
                    return ((学生表Row)(this.Rows[index]));
                }
            }
            
            public event 学生表RowChangeEventHandler 学生表RowChanged;
            
            public event 学生表RowChangeEventHandler 学生表RowChanging;
            
            public event 学生表RowChangeEventHandler 学生表RowDeleted;
            
            public event 学生表RowChangeEventHandler 学生表RowDeleting;
            
            public void Add学生表Row(学生表Row row) {
                this.Rows.Add(row);
            }
            
            public 学生表Row Add学生表Row(string 学号, string 姓名, string 性别, System.DateTime 出生日期, string 班级名称, string 所属院系, int 年级, int 学制) {
                学生表Row row学生表Row = ((学生表Row)(this.NewRow()));
                row学生表Row.ItemArray = new object[] {
                        学号,
                        姓名,
                        性别,
                        出生日期,
                        班级名称,
                        所属院系,
                        年级,
                        学制};
                this.Rows.Add(row学生表Row);
                return row学生表Row;
            }
            
            public 学生表Row FindBy学号(string 学号) {
                return ((学生表Row)(this.Rows.Find(new object[] {
                            学号})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                学生表DataTable cln = ((学生表DataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new 学生表DataTable();
            }
            
            internal void InitVars() {
                this.column学号 = this.Columns["学号"];
                this.column姓名 = this.Columns["姓名"];
                this.column性别 = this.Columns["性别"];
                this.column出生日期 = this.Columns["出生日期"];
                this.column班级名称 = this.Columns["班级名称"];
                this.column所属院系 = this.Columns["所属院系"];
                this.column年级 = this.Columns["年级"];
                this.column学制 = this.Columns["学制"];
            }
            
            private void InitClass() {
                this.column学号 = new DataColumn("学号", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column学号);
                this.column姓名 = new DataColumn("姓名", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column姓名);
                this.column性别 = new DataColumn("性别", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column性别);
                this.column出生日期 = new DataColumn("出生日期", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column出生日期);
                this.column班级名称 = new DataColumn("班级名称", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column班级名称);
                this.column所属院系 = new DataColumn("所属院系", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column所属院系);
                this.column年级 = new DataColumn("年级", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column年级);
                this.column学制 = new DataColumn("学制", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column学制);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.column学号}, true));
                this.column学号.AllowDBNull = false;
                this.column学号.Unique = true;
            }
            
            public 学生表Row New学生表Row() {
                return ((学生表Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new 学生表Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(学生表Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.学生表RowChanged != null)) {
                    this.学生表RowChanged(this, new 学生表RowChangeEvent(((学生表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.学生表RowChanging != null)) {
                    this.学生表RowChanging(this, new 学生表RowChangeEvent(((学生表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.学生表RowDeleted != null)) {
                    this.学生表RowDeleted(this, new 学生表RowChangeEvent(((学生表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.学生表RowDeleting != null)) {
                    this.学生表RowDeleting(this, new 学生表RowChangeEvent(((学生表Row)(e.Row)), e.Action));
                }
            }
            
            public void Remove学生表Row(学生表Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 学生表Row : DataRow {
            

⌨️ 快捷键说明

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