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

📄 stud.cs

📁 C#示例代码,刚刚注册随便找了一个东西测试一下好不好用
💻 CS
📖 第 1 页 / 共 2 页
字号:
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                TABLE1DataTable cln = ((TABLE1DataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new TABLE1DataTable();
            }
            
            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(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.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.column编号}, true));
                this.column编号.AllowDBNull = false;
                this.column编号.Unique = true;
            }
            
            public TABLE1Row NewTABLE1Row() {
                return ((TABLE1Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new TABLE1Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(TABLE1Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.TABLE1RowChanged != null)) {
                    this.TABLE1RowChanged(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.TABLE1RowChanging != null)) {
                    this.TABLE1RowChanging(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.TABLE1RowDeleted != null)) {
                    this.TABLE1RowDeleted(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.TABLE1RowDeleting != null)) {
                    this.TABLE1RowDeleting(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
                }
            }
            
            public void RemoveTABLE1Row(TABLE1Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TABLE1Row : DataRow {
            
            private TABLE1DataTable tableTABLE1;
            
            internal TABLE1Row(DataRowBuilder rb) : 
                    base(rb) {
                this.tableTABLE1 = ((TABLE1DataTable)(this.Table));
            }
            
            public string 编号 {
                get {
                    return ((string)(this[this.tableTABLE1.编号Column]));
                }
                set {
                    this[this.tableTABLE1.编号Column] = value;
                }
            }
            
            public string 姓名 {
                get {
                    try {
                        return ((string)(this[this.tableTABLE1.姓名Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableTABLE1.姓名Column] = value;
                }
            }
            
            public string 学号 {
                get {
                    try {
                        return ((string)(this[this.tableTABLE1.学号Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableTABLE1.学号Column] = value;
                }
            }
            
            public string 课程 {
                get {
                    try {
                        return ((string)(this[this.tableTABLE1.课程Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableTABLE1.课程Column] = value;
                }
            }
            
            public string 分数 {
                get {
                    try {
                        return ((string)(this[this.tableTABLE1.分数Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableTABLE1.分数Column] = value;
                }
            }
            
            public string 学分 {
                get {
                    try {
                        return ((string)(this[this.tableTABLE1.学分Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableTABLE1.学分Column] = value;
                }
            }
            
            public bool Is姓名Null() {
                return this.IsNull(this.tableTABLE1.姓名Column);
            }
            
            public void Set姓名Null() {
                this[this.tableTABLE1.姓名Column] = System.Convert.DBNull;
            }
            
            public bool Is学号Null() {
                return this.IsNull(this.tableTABLE1.学号Column);
            }
            
            public void Set学号Null() {
                this[this.tableTABLE1.学号Column] = System.Convert.DBNull;
            }
            
            public bool Is课程Null() {
                return this.IsNull(this.tableTABLE1.课程Column);
            }
            
            public void Set课程Null() {
                this[this.tableTABLE1.课程Column] = System.Convert.DBNull;
            }
            
            public bool Is分数Null() {
                return this.IsNull(this.tableTABLE1.分数Column);
            }
            
            public void Set分数Null() {
                this[this.tableTABLE1.分数Column] = System.Convert.DBNull;
            }
            
            public bool Is学分Null() {
                return this.IsNull(this.tableTABLE1.学分Column);
            }
            
            public void Set学分Null() {
                this[this.tableTABLE1.学分Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TABLE1RowChangeEvent : EventArgs {
            
            private TABLE1Row eventRow;
            
            private DataRowAction eventAction;
            
            public TABLE1RowChangeEvent(TABLE1Row row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public TABLE1Row Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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