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

📄 dataset6.cs

📁 简单的教师录入成绩系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public override DataTable Clone() {
                SeCourDataTable cln = ((SeCourDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new SeCourDataTable();
            }
            
            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(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(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column学分);
                this.column序号.AllowDBNull = false;
                this.column学号.AllowDBNull = false;
                this.column课程编号.AllowDBNull = false;
            }
            
            public SeCourRow NewSeCourRow() {
                return ((SeCourRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new SeCourRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SeCourRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SeCourRowChanged != null)) {
                    this.SeCourRowChanged(this, new SeCourRowChangeEvent(((SeCourRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SeCourRowChanging != null)) {
                    this.SeCourRowChanging(this, new SeCourRowChangeEvent(((SeCourRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SeCourRowDeleted != null)) {
                    this.SeCourRowDeleted(this, new SeCourRowChangeEvent(((SeCourRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SeCourRowDeleting != null)) {
                    this.SeCourRowDeleting(this, new SeCourRowChangeEvent(((SeCourRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSeCourRow(SeCourRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SeCourRow : DataRow {
            
            private SeCourDataTable tableSeCour;
            
            internal SeCourRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSeCour = ((SeCourDataTable)(this.Table));
            }
            
            public string 序号 {
                get {
                    return ((string)(this[this.tableSeCour.序号Column]));
                }
                set {
                    this[this.tableSeCour.序号Column] = value;
                }
            }
            
            public string 学号 {
                get {
                    return ((string)(this[this.tableSeCour.学号Column]));
                }
                set {
                    this[this.tableSeCour.学号Column] = value;
                }
            }
            
            public string 课程编号 {
                get {
                    return ((string)(this[this.tableSeCour.课程编号Column]));
                }
                set {
                    this[this.tableSeCour.课程编号Column] = value;
                }
            }
            
            public string 课程名称 {
                get {
                    try {
                        return ((string)(this[this.tableSeCour.课程名称Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSeCour.课程名称Column] = value;
                }
            }
            
            public string 开课教师 {
                get {
                    try {
                        return ((string)(this[this.tableSeCour.开课教师Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSeCour.开课教师Column] = value;
                }
            }
            
            public string 开课系别 {
                get {
                    try {
                        return ((string)(this[this.tableSeCour.开课系别Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSeCour.开课系别Column] = value;
                }
            }
            
            public int 学时 {
                get {
                    try {
                        return ((int)(this[this.tableSeCour.学时Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSeCour.学时Column] = value;
                }
            }
            
            public int 学分 {
                get {
                    try {
                        return ((int)(this[this.tableSeCour.学分Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSeCour.学分Column] = value;
                }
            }
            
            public bool Is课程名称Null() {
                return this.IsNull(this.tableSeCour.课程名称Column);
            }
            
            public void Set课程名称Null() {
                this[this.tableSeCour.课程名称Column] = System.Convert.DBNull;
            }
            
            public bool Is开课教师Null() {
                return this.IsNull(this.tableSeCour.开课教师Column);
            }
            
            public void Set开课教师Null() {
                this[this.tableSeCour.开课教师Column] = System.Convert.DBNull;
            }
            
            public bool Is开课系别Null() {
                return this.IsNull(this.tableSeCour.开课系别Column);
            }
            
            public void Set开课系别Null() {
                this[this.tableSeCour.开课系别Column] = System.Convert.DBNull;
            }
            
            public bool Is学时Null() {
                return this.IsNull(this.tableSeCour.学时Column);
            }
            
            public void Set学时Null() {
                this[this.tableSeCour.学时Column] = System.Convert.DBNull;
            }
            
            public bool Is学分Null() {
                return this.IsNull(this.tableSeCour.学分Column);
            }
            
            public void Set学分Null() {
                this[this.tableSeCour.学分Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SeCourRowChangeEvent : EventArgs {
            
            private SeCourRow eventRow;
            
            private DataRowAction eventAction;
            
            public SeCourRowChangeEvent(SeCourRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SeCourRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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