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

📄 dsbookback.cs

📁 是一个教材管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                this.columnMemo = this.Columns["Memo"];
                this.columnStor = this.Columns["Stor"];
                this.columnAttr = this.Columns["Attr"];
            }
            
            private void InitClass() {
                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.columnPublishData = new DataColumn("PublishData", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPublishData);
                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.columnPic = new DataColumn("Pic", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPic);
                this.columnAttribute = new DataColumn("Attribute", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAttribute);
                this.columnMemo = new DataColumn("Memo", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnMemo);
                this.columnStor = new DataColumn("Stor", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStor);
                this.columnAttr = new DataColumn("Attr", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAttr);
                this.columnID.AutoIncrement = true;
                this.columnID.AllowDBNull = false;
                this.columnID.ReadOnly = true;
                this.columnBookName.AllowDBNull = false;
                this.columnAuthor.AllowDBNull = false;
                this.columnAttribute.AllowDBNull = false;
                this.columnStor.AllowDBNull = false;
            }
            
            public BackBook_ViewRow NewBackBook_ViewRow() {
                return ((BackBook_ViewRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new BackBook_ViewRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(BackBook_ViewRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.BackBook_ViewRowChanged != null)) {
                    this.BackBook_ViewRowChanged(this, new BackBook_ViewRowChangeEvent(((BackBook_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.BackBook_ViewRowChanging != null)) {
                    this.BackBook_ViewRowChanging(this, new BackBook_ViewRowChangeEvent(((BackBook_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.BackBook_ViewRowDeleted != null)) {
                    this.BackBook_ViewRowDeleted(this, new BackBook_ViewRowChangeEvent(((BackBook_ViewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.BackBook_ViewRowDeleting != null)) {
                    this.BackBook_ViewRowDeleting(this, new BackBook_ViewRowChangeEvent(((BackBook_ViewRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveBackBook_ViewRow(BackBook_ViewRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BackBook_ViewRow : DataRow {
            
            private BackBook_ViewDataTable tableBackBook_View;
            
            internal BackBook_ViewRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableBackBook_View = ((BackBook_ViewDataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.tableBackBook_View.IDColumn]));
                }
                set {
                    this[this.tableBackBook_View.IDColumn] = value;
                }
            }
            
            public string BookName {
                get {
                    return ((string)(this[this.tableBackBook_View.BookNameColumn]));
                }
                set {
                    this[this.tableBackBook_View.BookNameColumn] = value;
                }
            }
            
            public string Author {
                get {
                    return ((string)(this[this.tableBackBook_View.AuthorColumn]));
                }
                set {
                    this[this.tableBackBook_View.AuthorColumn] = value;
                }
            }
            
            public System.DateTime PublishData {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableBackBook_View.PublishDataColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.PublishDataColumn] = value;
                }
            }
            
            public string Price {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.PriceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.PriceColumn] = value;
                }
            }
            
            public string Publish {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.PublishColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.PublishColumn] = value;
                }
            }
            
            public string BookMark {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.BookMarkColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.BookMarkColumn] = value;
                }
            }
            
            public string Pic {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.PicColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.PicColumn] = value;
                }
            }
            
            public int Attribute {
                get {
                    return ((int)(this[this.tableBackBook_View.AttributeColumn]));
                }
                set {
                    this[this.tableBackBook_View.AttributeColumn] = value;
                }
            }
            
            public string Memo {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.MemoColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.MemoColumn] = value;
                }
            }
            
            public int Stor {
                get {
                    return ((int)(this[this.tableBackBook_View.StorColumn]));
                }
                set {
                    this[this.tableBackBook_View.StorColumn] = value;
                }
            }
            
            public string Attr {
                get {
                    try {
                        return ((string)(this[this.tableBackBook_View.AttrColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableBackBook_View.AttrColumn] = value;
                }
            }
            
            public bool IsPublishDataNull() {
                return this.IsNull(this.tableBackBook_View.PublishDataColumn);
            }
            
            public void SetPublishDataNull() {
                this[this.tableBackBook_View.PublishDataColumn] = System.Convert.DBNull;
            }
            
            public bool IsPriceNull() {
                return this.IsNull(this.tableBackBook_View.PriceColumn);
            }
            
            public void SetPriceNull() {
                this[this.tableBackBook_View.PriceColumn] = System.Convert.DBNull;
            }
            
            public bool IsPublishNull() {
                return this.IsNull(this.tableBackBook_View.PublishColumn);
            }
            
            public void SetPublishNull() {
                this[this.tableBackBook_View.PublishColumn] = System.Convert.DBNull;
            }
            
            public bool IsBookMarkNull() {
                return this.IsNull(this.tableBackBook_View.BookMarkColumn);
            }
            
            public void SetBookMarkNull() {
                this[this.tableBackBook_View.BookMarkColumn] = System.Convert.DBNull;
            }
            
            public bool IsPicNull() {
                return this.IsNull(this.tableBackBook_View.PicColumn);
            }
            
            public void SetPicNull() {
                this[this.tableBackBook_View.PicColumn] = System.Convert.DBNull;
            }
            
            public bool IsMemoNull() {
                return this.IsNull(this.tableBackBook_View.MemoColumn);
            }
            
            public void SetMemoNull() {
                this[this.tableBackBook_View.MemoColumn] = System.Convert.DBNull;
            }
            
            public bool IsAttrNull() {
                return this.IsNull(this.tableBackBook_View.AttrColumn);
            }
            
            public void SetAttrNull() {
                this[this.tableBackBook_View.AttrColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BackBook_ViewRowChangeEvent : EventArgs {
            
            private BackBook_ViewRow eventRow;
            
            private DataRowAction eventAction;
            
            public BackBook_ViewRowChangeEvent(BackBook_ViewRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public BackBook_ViewRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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