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

📄 dataset1.cs

📁 聊天系统的经
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        fname,
                        minit,
                        lname,
                        job_id,
                        job_lvl,
                        pub_id,
                        hire_date};
                this.Rows.Add(rowemployeeRow);
                return rowemployeeRow;
            }
            
            public employeeRow FindByemp_id(string emp_id) {
                return ((employeeRow)(this.Rows.Find(new object[] {
                            emp_id})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                employeeDataTable cln = ((employeeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new employeeDataTable();
            }
            
            internal void InitVars() {
                this.columnemp_id = this.Columns["emp_id"];
                this.columnfname = this.Columns["fname"];
                this.columnminit = this.Columns["minit"];
                this.columnlname = this.Columns["lname"];
                this.columnjob_id = this.Columns["job_id"];
                this.columnjob_lvl = this.Columns["job_lvl"];
                this.columnpub_id = this.Columns["pub_id"];
                this.columnhire_date = this.Columns["hire_date"];
            }
            
            private void InitClass() {
                this.columnemp_id = new DataColumn("emp_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnemp_id);
                this.columnfname = new DataColumn("fname", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnfname);
                this.columnminit = new DataColumn("minit", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnminit);
                this.columnlname = new DataColumn("lname", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnlname);
                this.columnjob_id = new DataColumn("job_id", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnjob_id);
                this.columnjob_lvl = new DataColumn("job_lvl", typeof(System.Byte), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnjob_lvl);
                this.columnpub_id = new DataColumn("pub_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpub_id);
                this.columnhire_date = new DataColumn("hire_date", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnhire_date);
                this.Constraints.Add(new UniqueConstraint("Dataset1Key1", new DataColumn[] {
                                this.columnemp_id}, true));
                this.columnemp_id.AllowDBNull = false;
                this.columnemp_id.Unique = true;
                this.columnfname.AllowDBNull = false;
                this.columnlname.AllowDBNull = false;
                this.columnjob_id.AllowDBNull = false;
                this.columnpub_id.AllowDBNull = false;
                this.columnhire_date.AllowDBNull = false;
            }
            
            public employeeRow NewemployeeRow() {
                return ((employeeRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new employeeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(employeeRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.employeeRowChanged != null)) {
                    this.employeeRowChanged(this, new employeeRowChangeEvent(((employeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.employeeRowChanging != null)) {
                    this.employeeRowChanging(this, new employeeRowChangeEvent(((employeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.employeeRowDeleted != null)) {
                    this.employeeRowDeleted(this, new employeeRowChangeEvent(((employeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.employeeRowDeleting != null)) {
                    this.employeeRowDeleting(this, new employeeRowChangeEvent(((employeeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveemployeeRow(employeeRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class employeeRow : DataRow {
            
            private employeeDataTable tableemployee;
            
            internal employeeRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableemployee = ((employeeDataTable)(this.Table));
            }
            
            public string emp_id {
                get {
                    return ((string)(this[this.tableemployee.emp_idColumn]));
                }
                set {
                    this[this.tableemployee.emp_idColumn] = value;
                }
            }
            
            public string fname {
                get {
                    return ((string)(this[this.tableemployee.fnameColumn]));
                }
                set {
                    this[this.tableemployee.fnameColumn] = value;
                }
            }
            
            public string minit {
                get {
                    try {
                        return ((string)(this[this.tableemployee.minitColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableemployee.minitColumn] = value;
                }
            }
            
            public string lname {
                get {
                    return ((string)(this[this.tableemployee.lnameColumn]));
                }
                set {
                    this[this.tableemployee.lnameColumn] = value;
                }
            }
            
            public short job_id {
                get {
                    return ((short)(this[this.tableemployee.job_idColumn]));
                }
                set {
                    this[this.tableemployee.job_idColumn] = value;
                }
            }
            
            public System.Byte job_lvl {
                get {
                    try {
                        return ((System.Byte)(this[this.tableemployee.job_lvlColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableemployee.job_lvlColumn] = value;
                }
            }
            
            public string pub_id {
                get {
                    return ((string)(this[this.tableemployee.pub_idColumn]));
                }
                set {
                    this[this.tableemployee.pub_idColumn] = value;
                }
            }
            
            public System.DateTime hire_date {
                get {
                    return ((System.DateTime)(this[this.tableemployee.hire_dateColumn]));
                }
                set {
                    this[this.tableemployee.hire_dateColumn] = value;
                }
            }
            
            public bool IsminitNull() {
                return this.IsNull(this.tableemployee.minitColumn);
            }
            
            public void SetminitNull() {
                this[this.tableemployee.minitColumn] = System.Convert.DBNull;
            }
            
            public bool Isjob_lvlNull() {
                return this.IsNull(this.tableemployee.job_lvlColumn);
            }
            
            public void Setjob_lvlNull() {
                this[this.tableemployee.job_lvlColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class employeeRowChangeEvent : EventArgs {
            
            private employeeRow eventRow;
            
            private DataRowAction eventAction;
            
            public employeeRowChangeEvent(employeeRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public employeeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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