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

📄 dspublisherstitles.cs

📁 C#150例
💻 CS
📖 第 1 页 / 共 2 页
字号:
                set {
                    this[this.tablepublishers.pub_idColumn] = value;
                }
            }
            
            public string pub_name {
                get {
                    try {
                        return ((string)(this[this.tablepublishers.pub_nameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablepublishers.pub_nameColumn] = value;
                }
            }
            
            public bool Ispub_nameNull() {
                return this.IsNull(this.tablepublishers.pub_nameColumn);
            }
            
            public void Setpub_nameNull() {
                this[this.tablepublishers.pub_nameColumn] = System.Convert.DBNull;
            }
            
            public titlesRow[] GettitlesRows() {
                return ((titlesRow[])(this.GetChildRows(this.Table.ChildRelations["publisherstitles"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class publishersRowChangeEvent : EventArgs {
            
            private publishersRow eventRow;
            
            private DataRowAction eventAction;
            
            public publishersRowChangeEvent(publishersRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public publishersRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class titlesDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columntitle_id;
            
            private DataColumn columntitle;
            
            private DataColumn columnpub_id;
            
            private DataColumn columnprice;
            
            internal titlesDataTable() : 
                    base("titles") {
                this.InitClass();
            }
            
            internal titlesDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn title_idColumn {
                get {
                    return this.columntitle_id;
                }
            }
            
            internal DataColumn titleColumn {
                get {
                    return this.columntitle;
                }
            }
            
            internal DataColumn pub_idColumn {
                get {
                    return this.columnpub_id;
                }
            }
            
            internal DataColumn priceColumn {
                get {
                    return this.columnprice;
                }
            }
            
            public titlesRow this[int index] {
                get {
                    return ((titlesRow)(this.Rows[index]));
                }
            }
            
            public event titlesRowChangeEventHandler titlesRowChanged;
            
            public event titlesRowChangeEventHandler titlesRowChanging;
            
            public event titlesRowChangeEventHandler titlesRowDeleted;
            
            public event titlesRowChangeEventHandler titlesRowDeleting;
            
            public void AddtitlesRow(titlesRow row) {
                this.Rows.Add(row);
            }
            
            public titlesRow AddtitlesRow(string title_id, string title, publishersRow parentpublishersRowBypublisherstitles, System.Decimal price) {
                titlesRow rowtitlesRow = ((titlesRow)(this.NewRow()));
                rowtitlesRow.ItemArray = new object[] {
                        title_id,
                        title,
                        parentpublishersRowBypublisherstitles[0],
                        price};
                this.Rows.Add(rowtitlesRow);
                return rowtitlesRow;
            }
            
            public titlesRow FindBytitle_id(string title_id) {
                return ((titlesRow)(this.Rows.Find(new object[] {
                            title_id})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                titlesDataTable cln = ((titlesDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new titlesDataTable();
            }
            
            internal void InitVars() {
                this.columntitle_id = this.Columns["title_id"];
                this.columntitle = this.Columns["title"];
                this.columnpub_id = this.Columns["pub_id"];
                this.columnprice = this.Columns["price"];
            }
            
            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.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.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;
            }
            
            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 pub_id {
                get {
                    try {
                        return ((string)(this[this.tabletitles.pub_idColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 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("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tabletitles.priceColumn] = value;
                }
            }
            
            public publishersRow publishersRow {
                get {
                    return ((publishersRow)(this.GetParentRow(this.Table.ParentRelations["publisherstitles"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["publisherstitles"]);
                }
            }
            
            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;
            }
        }
        
        [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 + -