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

📄 empdataset.cs

📁 独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        住址};
                this.Rows.Add(rowEmployeeRow);
                return rowEmployeeRow;
            }
            
            public EmployeeRow FindBy职工号(string 职工号) {
                return ((EmployeeRow)(this.Rows.Find(new object[] {
                            职工号})));
            }
            
            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.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.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.column职工号}, true));
                this.column职工号.AllowDBNull = false;
                this.column职工号.Unique = true;
            }
            
            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 职工号 {
                get {
                    return ((string)(this[this.tableEmployee.职工号Column]));
                }
                set {
                    this[this.tableEmployee.职工号Column] = value;
                }
            }
            
            public string 职工名称 {
                get {
                    try {
                        return ((string)(this[this.tableEmployee.职工名称Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableEmployee.职工名称Column] = value;
                }
            }
            
            public string 性别 {
                get {
                    try {
                        return ((string)(this[this.tableEmployee.性别Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableEmployee.性别Column] = value;
                }
            }
            
            public string 部门号 {
                get {
                    try {
                        return ((string)(this[this.tableEmployee.部门号Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableEmployee.部门号Column] = value;
                }
            }
            
            public string 住址 {
                get {
                    try {
                        return ((string)(this[this.tableEmployee.住址Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableEmployee.住址Column] = value;
                }
            }
            
            public bool Is职工名称Null() {
                return this.IsNull(this.tableEmployee.职工名称Column);
            }
            
            public void Set职工名称Null() {
                this[this.tableEmployee.职工名称Column] = System.Convert.DBNull;
            }
            
            public bool Is性别Null() {
                return this.IsNull(this.tableEmployee.性别Column);
            }
            
            public void Set性别Null() {
                this[this.tableEmployee.性别Column] = System.Convert.DBNull;
            }
            
            public bool Is部门号Null() {
                return this.IsNull(this.tableEmployee.部门号Column);
            }
            
            public void Set部门号Null() {
                this[this.tableEmployee.部门号Column] = System.Convert.DBNull;
            }
            
            public bool Is住址Null() {
                return this.IsNull(this.tableEmployee.住址Column);
            }
            
            public void Set住址Null() {
                this[this.tableEmployee.住址Column] = 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 + -