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

📄 dataset1.cs

📁 数据库课程设计__选修课管理系统__含有SQL数据库和全部源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
            
            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(int 课程编号, string 课程名称, string 本学期课程, string 教师, string 开课系别, int 学分) {
                课程信息Row row课程信息Row = ((课程信息Row)(this.NewRow()));
                row课程信息Row.ItemArray = new object[] {
                        课程编号,
                        课程名称,
                        本学期课程,
                        教师,
                        开课系别,
                        学分};
                this.Rows.Add(row课程信息Row);
                return row课程信息Row;
            }
            
            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(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(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课程编号.AllowDBNull = false;
                this.column课程名称.AllowDBNull = false;
                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 int 课程编号 {
                get {
                    return ((int)(this[this.table课程信息.课程编号Column]));
                }
                set {
                    this[this.table课程信息.课程编号Column] = value;
                }
            }
            
            public string 课程名称 {
                get {
                    return ((string)(this[this.table课程信息.课程名称Column]));
                }
                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 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);
            }
            
            public void Set教师Null() {
                this[this.table课程信息.教师Column] = System.Convert.DBNull;
            }
            
            public bool Is开课系别Null() {
                return this.IsNull(this.table课程信息.开课系别Column);
            }
            
            public void Set开课系别Null() {
                this[this.table课程信息.开课系别Column] = System.Convert.DBNull;
            }
            
            public bool Is学分Null() {
                return this.IsNull(this.table课程信息.学分Column);
            }
            
            public void Set学分Null() {
                this[this.table课程信息.学分Column] = System.Convert.DBNull;
            }
        }
        
        [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;
                }
            }
            

⌨️ 快捷键说明

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