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

📄 dataset1.cs

📁 简单的教师录入成绩系统
💻 CS
📖 第 1 页 / 共 5 页
字号:
            
            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学时;
            
            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学时;
                }
            }
            
            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 开课教师, int 学分, string 开课系别, 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["学时"];
            }
            
            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(int), 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.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 {
            
            private 课程基本信息DataTable table课程基本信息;
            
            internal 课程基本信息Row(DataRowBuilder rb) : 
                    base(rb) {
                this.table课程基本信息 = ((课程基本信息DataTable)(this.Table));
            }
            
            public string 课程名称 {
                get {
                    try {
                        return ((string)(this[this.table课程基本信息.课程名称Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table课程基本信息.课程名称Column] = value;
                }
            }
            
            public string 课程编号 {
                get {
                    return ((string)(this[this.table课程基本信息.课程编号Column]));
                }
                set {
                    this[this.table课程基本信息.课程编号Column] = value;
                }
            }
            
            public string 开课教师 {
                get {
                    try {
                        return ((string)(this[this.table课程基本信息.开课教师Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table课程基本信息.开课教师Column] = value;
                }
            }
            
            public int 学分 {
                get {
                    try {
                        return ((int)(this[this.table课程基本信息.学分Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table课程基本信息.学分Column] = value;
                }
            }
            
            public string 开课系别 {
                get {
                    try {
                        return ((string)(this[this.table课程基本信息.开课系别Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table课程基本信息.开课系别Column] = value;
                }
            }
            
            public int 学时 {
                get {
                    try {
                        return ((int)(this[this.table课程基本信息.学时Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table课程基本信息.学时Column] = value;
                }
            }
            
            public bool Is课程名称Null() {
                return this.IsNull(this.table课程基本信息.课程名称Column);
            }

⌨️ 快捷键说明

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