usertableset.cs

来自「独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 」· CS 代码 · 共 389 行 · 第 1/2 页

CS
389
字号
            }
            
            public System_UserTableRow this[int index] {
                get {
                    return ((System_UserTableRow)(this.Rows[index]));
                }
            }
            
            public event System_UserTableRowChangeEventHandler System_UserTableRowChanged;
            
            public event System_UserTableRowChangeEventHandler System_UserTableRowChanging;
            
            public event System_UserTableRowChangeEventHandler System_UserTableRowDeleted;
            
            public event System_UserTableRowChangeEventHandler System_UserTableRowDeleting;
            
            public void AddSystem_UserTableRow(System_UserTableRow row) {
                this.Rows.Add(row);
            }
            
            public System_UserTableRow AddSystem_UserTableRow(string 用户号, string 用户名称, string 密码, string 用户类型) {
                System_UserTableRow rowSystem_UserTableRow = ((System_UserTableRow)(this.NewRow()));
                rowSystem_UserTableRow.ItemArray = new object[] {
                        用户号,
                        用户名称,
                        密码,
                        用户类型};
                this.Rows.Add(rowSystem_UserTableRow);
                return rowSystem_UserTableRow;
            }
            
            public System_UserTableRow FindBy用户号(string 用户号) {
                return ((System_UserTableRow)(this.Rows.Find(new object[] {
                            用户号})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                System_UserTableDataTable cln = ((System_UserTableDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new System_UserTableDataTable();
            }
            
            internal void InitVars() {
                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.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;
            }
            
            public System_UserTableRow NewSystem_UserTableRow() {
                return ((System_UserTableRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new System_UserTableRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(System_UserTableRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.System_UserTableRowChanged != null)) {
                    this.System_UserTableRowChanged(this, new System_UserTableRowChangeEvent(((System_UserTableRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.System_UserTableRowChanging != null)) {
                    this.System_UserTableRowChanging(this, new System_UserTableRowChangeEvent(((System_UserTableRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.System_UserTableRowDeleted != null)) {
                    this.System_UserTableRowDeleted(this, new System_UserTableRowChangeEvent(((System_UserTableRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.System_UserTableRowDeleting != null)) {
                    this.System_UserTableRowDeleting(this, new System_UserTableRowChangeEvent(((System_UserTableRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSystem_UserTableRow(System_UserTableRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class System_UserTableRow : DataRow {
            
            private System_UserTableDataTable tableSystem_UserTable;
            
            internal System_UserTableRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSystem_UserTable = ((System_UserTableDataTable)(this.Table));
            }
            
            public string 用户号 {
                get {
                    return ((string)(this[this.tableSystem_UserTable.用户号Column]));
                }
                set {
                    this[this.tableSystem_UserTable.用户号Column] = value;
                }
            }
            
            public string 用户名称 {
                get {
                    return ((string)(this[this.tableSystem_UserTable.用户名称Column]));
                }
                set {
                    this[this.tableSystem_UserTable.用户名称Column] = value;
                }
            }
            
            public string 密码 {
                get {
                    return ((string)(this[this.tableSystem_UserTable.密码Column]));
                }
                set {
                    this[this.tableSystem_UserTable.密码Column] = value;
                }
            }
            
            public string 用户类型 {
                get {
                    return ((string)(this[this.tableSystem_UserTable.用户类型Column]));
                }
                set {
                    this[this.tableSystem_UserTable.用户类型Column] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class System_UserTableRowChangeEvent : EventArgs {
            
            private System_UserTableRow eventRow;
            
            private DataRowAction eventAction;
            
            public System_UserTableRowChangeEvent(System_UserTableRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public System_UserTableRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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