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

📄 dsbookord.cs

📁 是一个教材管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        null,
                        BookName,
                        Author,
                        Price,
                        Publish,
                        Storage};
                this.Rows.Add(rowBookOrd_ViewRow);
                return rowBookOrd_ViewRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                BookOrd_ViewDataTable cln = ((BookOrd_ViewDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new BookOrd_ViewDataTable();
            }
            
            internal void InitVars() {
                this.columnBookAttribute = this.Columns["BookAttribute"];
                this.columnID = this.Columns["ID"];
                this.columnBookName = this.Columns["BookName"];
                this.columnAuthor = this.Columns["Author"];
                this.columnPrice = this.Columns["Price"];
                this.columnPublish = this.Columns["Publish"];
                this.columnStorage = this.Columns["Storage"];
            }
            
            private void InitClass() {
                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.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.columnStorage = new DataColumn("Storage", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStorage);
                this.columnID.AutoIncrement = true;
                this.columnID.AllowDBNull = false;
                this.columnID.ReadOnly = true;
                this.columnBookName.AllowDBNull = false;
                this.columnAuthor.AllowDBNull = false;
                this.columnStorage.AllowDBNull = false;
            }
            
            public BookOrd_ViewRow NewBookOrd_ViewRow() {
                return ((BookOrd_ViewRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new BookOrd_ViewRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(BookOrd_ViewRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.BookOrd_ViewRowChanged != null)) {
                    this.BookOrd_ViewRowChanged(this, new BookOrd_ViewRowChangeEvent(((BookOrd_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.BookOrd_ViewRowChanging != null)) {
                    this.BookOrd_ViewRowChanging(this, new BookOrd_ViewRowChangeEvent(((BookOrd_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.BookOrd_ViewRowDeleted != null)) {
                    this.BookOrd_ViewRowDeleted(this, new BookOrd_ViewRowChangeEvent(((BookOrd_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.BookOrd_ViewRowDeleting != null)) {
                    this.BookOrd_ViewRowDeleting(this, new BookOrd_ViewRowChangeEvent(((BookOrd_ViewRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveBookOrd_ViewRow(BookOrd_ViewRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BookOrd_ViewRow : DataRow {
            
            private BookOrd_ViewDataTable tableBookOrd_View;
            
            internal BookOrd_ViewRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableBookOrd_View = ((BookOrd_ViewDataTable)(this.Table));
            }
            
            public string BookAttribute {
                get {
                    try {
                        return ((string)(this[this.tableBookOrd_View.BookAttributeColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBookOrd_View.BookAttributeColumn] = value;
                }
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableBookOrd_View.IDColumn]));
                }
                set {
                    this[this.tableBookOrd_View.IDColumn] = value;
                }
            }
            
            public string BookName {
                get {
                    return ((string)(this[this.tableBookOrd_View.BookNameColumn]));
                }
                set {
                    this[this.tableBookOrd_View.BookNameColumn] = value;
                }
            }
            
            public string Author {
                get {
                    return ((string)(this[this.tableBookOrd_View.AuthorColumn]));
                }
                set {
                    this[this.tableBookOrd_View.AuthorColumn] = value;
                }
            }
            
            public string Price {
                get {
                    try {
                        return ((string)(this[this.tableBookOrd_View.PriceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBookOrd_View.PriceColumn] = value;
                }
            }
            
            public string Publish {
                get {
                    try {
                        return ((string)(this[this.tableBookOrd_View.PublishColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBookOrd_View.PublishColumn] = value;
                }
            }
            
            public int Storage {
                get {
                    return ((int)(this[this.tableBookOrd_View.StorageColumn]));
                }
                set {
                    this[this.tableBookOrd_View.StorageColumn] = value;
                }
            }
            
            public bool IsBookAttributeNull() {
                return this.IsNull(this.tableBookOrd_View.BookAttributeColumn);
            }
            
            public void SetBookAttributeNull() {
                this[this.tableBookOrd_View.BookAttributeColumn] = System.Convert.DBNull;
            }
            
            public bool IsPriceNull() {
                return this.IsNull(this.tableBookOrd_View.PriceColumn);
            }
            
            public void SetPriceNull() {
                this[this.tableBookOrd_View.PriceColumn] = System.Convert.DBNull;
            }
            
            public bool IsPublishNull() {
                return this.IsNull(this.tableBookOrd_View.PublishColumn);
            }
            
            public void SetPublishNull() {
                this[this.tableBookOrd_View.PublishColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BookOrd_ViewRowChangeEvent : EventArgs {
            
            private BookOrd_ViewRow eventRow;
            
            private DataRowAction eventAction;
            
            public BookOrd_ViewRowChangeEvent(BookOrd_ViewRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public BookOrd_ViewRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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