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

📄 aa.cs

📁 CSHARP下编写的数据库设备管理系统 SQL SERVER
💻 CS
📖 第 1 页 / 共 2 页
字号:
            public event 设备表RowChangeEventHandler 设备表RowDeleted;
            
            public event 设备表RowChangeEventHandler 设备表RowDeleting;
            
            public void Add设备表Row(设备表Row row) {
                this.Rows.Add(row);
            }
            
            public 设备表Row Add设备表Row(string 种类编号, string 设备号, string 设备名, string 状态) {
                设备表Row row设备表Row = ((设备表Row)(this.NewRow()));
                row设备表Row.ItemArray = new object[] {
                        种类编号,
                        设备号,
                        设备名,
                        状态};
                this.Rows.Add(row设备表Row);
                return row设备表Row;
            }
            
            public 设备表Row FindBy设备号(string 设备号) {
                return ((设备表Row)(this.Rows.Find(new object[] {
                            设备号})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                设备表DataTable cln = ((设备表DataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new 设备表DataTable();
            }
            
            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;
            }
            
            public 设备表Row New设备表Row() {
                return ((设备表Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new 设备表Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(设备表Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.设备表RowChanged != null)) {
                    this.设备表RowChanged(this, new 设备表RowChangeEvent(((设备表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.设备表RowChanging != null)) {
                    this.设备表RowChanging(this, new 设备表RowChangeEvent(((设备表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.设备表RowDeleted != null)) {
                    this.设备表RowDeleted(this, new 设备表RowChangeEvent(((设备表Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.设备表RowDeleting != null)) {
                    this.设备表RowDeleting(this, new 设备表RowChangeEvent(((设备表Row)(e.Row)), e.Action));
                }
            }
            
            public void Remove设备表Row(设备表Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 设备表Row : DataRow {
            
            private 设备表DataTable table设备表;
            
            internal 设备表Row(DataRowBuilder rb) : 
                    base(rb) {
                this.table设备表 = ((设备表DataTable)(this.Table));
            }
            
            public string 种类编号 {
                get {
                    try {
                        return ((string)(this[this.table设备表.种类编号Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table设备表.种类编号Column] = value;
                }
            }
            
            public string 设备号 {
                get {
                    return ((string)(this[this.table设备表.设备号Column]));
                }
                set {
                    this[this.table设备表.设备号Column] = value;
                }
            }
            
            public string 设备名 {
                get {
                    return ((string)(this[this.table设备表.设备名Column]));
                }
                set {
                    this[this.table设备表.设备名Column] = value;
                }
            }
            
            public string 状态 {
                get {
                    try {
                        return ((string)(this[this.table设备表.状态Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table设备表.状态Column] = value;
                }
            }
            
            public bool Is种类编号Null() {
                return this.IsNull(this.table设备表.种类编号Column);
            }
            
            public void Set种类编号Null() {
                this[this.table设备表.种类编号Column] = System.Convert.DBNull;
            }
            
            public bool Is状态Null() {
                return this.IsNull(this.table设备表.状态Column);
            }
            
            public void Set状态Null() {
                this[this.table设备表.状态Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 设备表RowChangeEvent : EventArgs {
            
            private 设备表Row eventRow;
            
            private DataRowAction eventAction;
            
            public 设备表RowChangeEvent(设备表Row row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public 设备表Row Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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