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

📄 dsbuyingview.cs

📁 是一个教材管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
            public override DataTable Clone() {
                tblBookStorageDataTable cln = ((tblBookStorageDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new tblBookStorageDataTable();
            }
            
            internal void InitVars() {
                this.columnStorage = this.Columns["Storage"];
                this.columnBookName = this.Columns["BookName"];
                this.columnAuthor = this.Columns["Author"];
                this.columnPrice = this.Columns["Price"];
                this.columnPublish = this.Columns["Publish"];
                this.columnBookMark = this.Columns["BookMark"];
                this.columnAttribute = this.Columns["Attribute"];
                this.columnBookAttribute = this.Columns["BookAttribute"];
                this.columnID = this.Columns["ID"];
                this.columnExpr1 = this.Columns["Expr1"];
                this.columnExpr2 = this.Columns["Expr2"];
            }
            
            private void InitClass() {
                this.columnStorage = new DataColumn("Storage", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStorage);
                this.columnBookName = new DataColumn("BookName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBookName);
                this.columnAuthor = new DataColumn("Author", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAuthor);
                this.columnPrice = new DataColumn("Price", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPrice);
                this.columnPublish = new DataColumn("Publish", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPublish);
                this.columnBookMark = new DataColumn("BookMark", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBookMark);
                this.columnAttribute = new DataColumn("Attribute", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAttribute);
                this.columnBookAttribute = new DataColumn("BookAttribute", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBookAttribute);
                this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnID);
                this.columnExpr1 = new DataColumn("Expr1", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnExpr1);
                this.columnExpr2 = new DataColumn("Expr2", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnExpr2);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnID,
                                this.columnExpr1,
                                this.columnExpr2}, true));
                this.columnStorage.AllowDBNull = false;
                this.columnBookName.AllowDBNull = false;
                this.columnAuthor.AllowDBNull = false;
                this.columnAttribute.AllowDBNull = false;
                this.columnID.AutoIncrement = true;
                this.columnID.AllowDBNull = false;
                this.columnID.ReadOnly = true;
                this.columnExpr1.AutoIncrement = true;
                this.columnExpr1.AllowDBNull = false;
                this.columnExpr1.ReadOnly = true;
                this.columnExpr2.AutoIncrement = true;
                this.columnExpr2.AllowDBNull = false;
                this.columnExpr2.ReadOnly = true;
            }
            
            public tblBookStorageRow NewtblBookStorageRow() {
                return ((tblBookStorageRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new tblBookStorageRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(tblBookStorageRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.tblBookStorageRowChanged != null)) {
                    this.tblBookStorageRowChanged(this, new tblBookStorageRowChangeEvent(((tblBookStorageRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.tblBookStorageRowChanging != null)) {
                    this.tblBookStorageRowChanging(this, new tblBookStorageRowChangeEvent(((tblBookStorageRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.tblBookStorageRowDeleted != null)) {
                    this.tblBookStorageRowDeleted(this, new tblBookStorageRowChangeEvent(((tblBookStorageRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.tblBookStorageRowDeleting != null)) {
                    this.tblBookStorageRowDeleting(this, new tblBookStorageRowChangeEvent(((tblBookStorageRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovetblBookStorageRow(tblBookStorageRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class tblBookStorageRow : DataRow {
            
            private tblBookStorageDataTable tabletblBookStorage;
            
            internal tblBookStorageRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tabletblBookStorage = ((tblBookStorageDataTable)(this.Table));
            }
            
            public int Storage {
                get {
                    return ((int)(this[this.tabletblBookStorage.StorageColumn]));
                }
                set {
                    this[this.tabletblBookStorage.StorageColumn] = value;
                }
            }
            
            public string BookName {
                get {
                    return ((string)(this[this.tabletblBookStorage.BookNameColumn]));
                }
                set {
                    this[this.tabletblBookStorage.BookNameColumn] = value;
                }
            }
            
            public string Author {
                get {
                    return ((string)(this[this.tabletblBookStorage.AuthorColumn]));
                }
                set {
                    this[this.tabletblBookStorage.AuthorColumn] = value;
                }
            }
            
            public string Price {
                get {
                    try {
                        return ((string)(this[this.tabletblBookStorage.PriceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tabletblBookStorage.PriceColumn] = value;
                }
            }
            
            public string Publish {
                get {
                    try {
                        return ((string)(this[this.tabletblBookStorage.PublishColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tabletblBookStorage.PublishColumn] = value;
                }
            }
            
            public string BookMark {
                get {
                    try {
                        return ((string)(this[this.tabletblBookStorage.BookMarkColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tabletblBookStorage.BookMarkColumn] = value;
                }
            }
            
            public int Attribute {
                get {
                    return ((int)(this[this.tabletblBookStorage.AttributeColumn]));
                }
                set {
                    this[this.tabletblBookStorage.AttributeColumn] = value;
                }
            }
            
            public string BookAttribute {
                get {
                    try {
                        return ((string)(this[this.tabletblBookStorage.BookAttributeColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tabletblBookStorage.BookAttributeColumn] = value;
                }
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tabletblBookStorage.IDColumn]));
                }
                set {
                    this[this.tabletblBookStorage.IDColumn] = value;
                }
            }
            
            public int Expr1 {
                get {
                    return ((int)(this[this.tabletblBookStorage.Expr1Column]));
                }
                set {
                    this[this.tabletblBookStorage.Expr1Column] = value;
                }
            }
            
            public int Expr2 {
                get {
                    return ((int)(this[this.tabletblBookStorage.Expr2Column]));
                }
                set {
                    this[this.tabletblBookStorage.Expr2Column] = value;
                }
            }
            
            public bool IsPriceNull() {
                return this.IsNull(this.tabletblBookStorage.PriceColumn);
            }
            
            public void SetPriceNull() {
                this[this.tabletblBookStorage.PriceColumn] = System.Convert.DBNull;
            }
            
            public bool IsPublishNull() {
                return this.IsNull(this.tabletblBookStorage.PublishColumn);
            }
            
            public void SetPublishNull() {
                this[this.tabletblBookStorage.PublishColumn] = System.Convert.DBNull;
            }
            
            public bool IsBookMarkNull() {
                return this.IsNull(this.tabletblBookStorage.BookMarkColumn);
            }
            
            public void SetBookMarkNull() {
                this[this.tabletblBookStorage.BookMarkColumn] = System.Convert.DBNull;
            }
            
            public bool IsBookAttributeNull() {
                return this.IsNull(this.tabletblBookStorage.BookAttributeColumn);
            }
            
            public void SetBookAttributeNull() {
                this[this.tabletblBookStorage.BookAttributeColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class tblBookStorageRowChangeEvent : EventArgs {
            
            private tblBookStorageRow eventRow;
            
            private DataRowAction eventAction;
            
            public tblBookStorageRowChangeEvent(tblBookStorageRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public tblBookStorageRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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