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

📄 titledataset.cs

📁 Microsoft?ASP.NET Programming with Microsoft Visual C#?.NET Version 2003 Step By Step
💻 CS
📖 第 1 页 / 共 2 页
字号:
            }
            
            internal void InitVars() {
                this.columntitle_id = this.Columns["title_id"];
                this.columntitle = this.Columns["title"];
                this.columntype = this.Columns["type"];
                this.columnpub_id = this.Columns["pub_id"];
                this.columnprice = this.Columns["price"];
                this.columnadvance = this.Columns["advance"];
                this.columnroyalty = this.Columns["royalty"];
                this.columnytd_sales = this.Columns["ytd_sales"];
                this.columnnotes = this.Columns["notes"];
                this.columnpubdate = this.Columns["pubdate"];
            }
            
            private void InitClass() {
                this.columntitle_id = new DataColumn("title_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntitle_id);
                this.columntitle = new DataColumn("title", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntitle);
                this.columntype = new DataColumn("type", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntype);
                this.columnpub_id = new DataColumn("pub_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpub_id);
                this.columnprice = new DataColumn("price", typeof(System.Decimal), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnprice);
                this.columnadvance = new DataColumn("advance", typeof(System.Decimal), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnadvance);
                this.columnroyalty = new DataColumn("royalty", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnroyalty);
                this.columnytd_sales = new DataColumn("ytd_sales", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnytd_sales);
                this.columnnotes = new DataColumn("notes", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnnotes);
                this.columnpubdate = new DataColumn("pubdate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpubdate);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columntitle_id}, true));
                this.columntitle_id.AllowDBNull = false;
                this.columntitle_id.Unique = true;
                this.columntitle.AllowDBNull = false;
                this.columntype.AllowDBNull = false;
                this.columnpubdate.AllowDBNull = false;
            }
            
            public titlesRow NewtitlesRow() {
                return ((titlesRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new titlesRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(titlesRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.titlesRowChanged != null)) {
                    this.titlesRowChanged(this, new titlesRowChangeEvent(((titlesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.titlesRowChanging != null)) {
                    this.titlesRowChanging(this, new titlesRowChangeEvent(((titlesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.titlesRowDeleted != null)) {
                    this.titlesRowDeleted(this, new titlesRowChangeEvent(((titlesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.titlesRowDeleting != null)) {
                    this.titlesRowDeleting(this, new titlesRowChangeEvent(((titlesRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovetitlesRow(titlesRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class titlesRow : DataRow {
            
            private titlesDataTable tabletitles;
            
            internal titlesRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tabletitles = ((titlesDataTable)(this.Table));
            }
            
            public string title_id {
                get {
                    return ((string)(this[this.tabletitles.title_idColumn]));
                }
                set {
                    this[this.tabletitles.title_idColumn] = value;
                }
            }
            
            public string title {
                get {
                    return ((string)(this[this.tabletitles.titleColumn]));
                }
                set {
                    this[this.tabletitles.titleColumn] = value;
                }
            }
            
            public string type {
                get {
                    return ((string)(this[this.tabletitles.typeColumn]));
                }
                set {
                    this[this.tabletitles.typeColumn] = value;
                }
            }
            
            public string pub_id {
                get {
                    try {
                        return ((string)(this[this.tabletitles.pub_idColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.pub_idColumn] = value;
                }
            }
            
            public System.Decimal price {
                get {
                    try {
                        return ((System.Decimal)(this[this.tabletitles.priceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.priceColumn] = value;
                }
            }
            
            public System.Decimal advance {
                get {
                    try {
                        return ((System.Decimal)(this[this.tabletitles.advanceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.advanceColumn] = value;
                }
            }
            
            public int royalty {
                get {
                    try {
                        return ((int)(this[this.tabletitles.royaltyColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.royaltyColumn] = value;
                }
            }
            
            public int ytd_sales {
                get {
                    try {
                        return ((int)(this[this.tabletitles.ytd_salesColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.ytd_salesColumn] = value;
                }
            }
            
            public string notes {
                get {
                    try {
                        return ((string)(this[this.tabletitles.notesColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletitles.notesColumn] = value;
                }
            }
            
            public System.DateTime pubdate {
                get {
                    return ((System.DateTime)(this[this.tabletitles.pubdateColumn]));
                }
                set {
                    this[this.tabletitles.pubdateColumn] = value;
                }
            }
            
            public bool Ispub_idNull() {
                return this.IsNull(this.tabletitles.pub_idColumn);
            }
            
            public void Setpub_idNull() {
                this[this.tabletitles.pub_idColumn] = System.Convert.DBNull;
            }
            
            public bool IspriceNull() {
                return this.IsNull(this.tabletitles.priceColumn);
            }
            
            public void SetpriceNull() {
                this[this.tabletitles.priceColumn] = System.Convert.DBNull;
            }
            
            public bool IsadvanceNull() {
                return this.IsNull(this.tabletitles.advanceColumn);
            }
            
            public void SetadvanceNull() {
                this[this.tabletitles.advanceColumn] = System.Convert.DBNull;
            }
            
            public bool IsroyaltyNull() {
                return this.IsNull(this.tabletitles.royaltyColumn);
            }
            
            public void SetroyaltyNull() {
                this[this.tabletitles.royaltyColumn] = System.Convert.DBNull;
            }
            
            public bool Isytd_salesNull() {
                return this.IsNull(this.tabletitles.ytd_salesColumn);
            }
            
            public void Setytd_salesNull() {
                this[this.tabletitles.ytd_salesColumn] = System.Convert.DBNull;
            }
            
            public bool IsnotesNull() {
                return this.IsNull(this.tabletitles.notesColumn);
            }
            
            public void SetnotesNull() {
                this[this.tabletitles.notesColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class titlesRowChangeEvent : EventArgs {
            
            private titlesRow eventRow;
            
            private DataRowAction eventAction;
            
            public titlesRowChangeEvent(titlesRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public titlesRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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