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

📄 dataset4.cs

📁 学生信息管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                studentRow rowstudentRow = ((studentRow)(this.NewRow()));
                rowstudentRow.ItemArray = new object[] {
                        学号,
                        姓名,
                        专业名,
                        性别,
                        出生时间,
                        总学分,
                        备注};
                this.Rows.Add(rowstudentRow);
                return rowstudentRow;
            }
            
            public studentRow FindBy学号(string 学号) {
                return ((studentRow)(this.Rows.Find(new object[] {
                            学号})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                studentDataTable cln = ((studentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new studentDataTable();
            }
            
            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["备注"];
            }
            
            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(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column出生时间);
                this.column总学分 = new DataColumn("总学分", typeof(System.Byte), 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;
                this.column姓名.AllowDBNull = false;
                this.column专业名.AllowDBNull = false;
                this.column性别.AllowDBNull = false;
                this.column出生时间.AllowDBNull = false;
            }
            
            public studentRow NewstudentRow() {
                return ((studentRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new studentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(studentRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.studentRowChanged != null)) {
                    this.studentRowChanged(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.studentRowChanging != null)) {
                    this.studentRowChanging(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.studentRowDeleted != null)) {
                    this.studentRowDeleted(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.studentRowDeleting != null)) {
                    this.studentRowDeleting(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovestudentRow(studentRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class studentRow : DataRow {
            
            private studentDataTable tablestudent;
            
            internal studentRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablestudent = ((studentDataTable)(this.Table));
            }
            
            public string 学号 {
                get {
                    return ((string)(this[this.tablestudent.学号Column]));
                }
                set {
                    this[this.tablestudent.学号Column] = value;
                }
            }
            
            public string 姓名 {
                get {
                    return ((string)(this[this.tablestudent.姓名Column]));
                }
                set {
                    this[this.tablestudent.姓名Column] = value;
                }
            }
            
            public string 专业名 {
                get {
                    return ((string)(this[this.tablestudent.专业名Column]));
                }
                set {
                    this[this.tablestudent.专业名Column] = value;
                }
            }
            
            public string 性别 {
                get {
                    return ((string)(this[this.tablestudent.性别Column]));
                }
                set {
                    this[this.tablestudent.性别Column] = value;
                }
            }
            
            public System.DateTime 出生时间 {
                get {
                    return ((System.DateTime)(this[this.tablestudent.出生时间Column]));
                }
                set {
                    this[this.tablestudent.出生时间Column] = value;
                }
            }
            
            public System.Byte 总学分 {
                get {
                    try {
                        return ((System.Byte)(this[this.tablestudent.总学分Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablestudent.总学分Column] = value;
                }
            }
            
            public string 备注 {
                get {
                    try {
                        return ((string)(this[this.tablestudent.备注Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablestudent.备注Column] = value;
                }
            }
            
            public bool Is总学分Null() {
                return this.IsNull(this.tablestudent.总学分Column);
            }
            
            public void Set总学分Null() {
                this[this.tablestudent.总学分Column] = System.Convert.DBNull;
            }
            
            public bool Is备注Null() {
                return this.IsNull(this.tablestudent.备注Column);
            }
            
            public void Set备注Null() {
                this[this.tablestudent.备注Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class studentRowChangeEvent : EventArgs {
            
            private studentRow eventRow;
            
            private DataRowAction eventAction;
            
            public studentRowChangeEvent(studentRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public studentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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