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

📄 dataset1.cs

📁 网上购物中介
💻 CS
📖 第 1 页 / 共 4 页
字号:
                this.InitClass();
            }
            
            internal 提供商DataTable(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 IDColumn {
                get {
                    return this.columnID;
                }
            }
            
            internal DataColumn 备注Column {
                get {
                    return this.column备注;
                }
            }
            
            internal DataColumn 地址Column {
                get {
                    return this.column地址;
                }
            }
            
            internal DataColumn 电话Column {
                get {
                    return this.column电话;
                }
            }
            
            internal DataColumn 联系人Column {
                get {
                    return this.column联系人;
                }
            }
            
            internal DataColumn 名称Column {
                get {
                    return this.column名称;
                }
            }
            
            internal DataColumn 提供类别Column {
                get {
                    return this.column提供类别;
                }
            }
            
            public 提供商Row this[int index] {
                get {
                    return ((提供商Row)(this.Rows[index]));
                }
            }
            
            public event 提供商RowChangeEventHandler 提供商RowChanged;
            
            public event 提供商RowChangeEventHandler 提供商RowChanging;
            
            public event 提供商RowChangeEventHandler 提供商RowDeleted;
            
            public event 提供商RowChangeEventHandler 提供商RowDeleting;
            
            public void Add提供商Row(提供商Row row) {
                this.Rows.Add(row);
            }
            
            public 提供商Row Add提供商Row(string 备注, string 地址, string 电话, string 联系人, string 名称, string 提供类别) {
                提供商Row row提供商Row = ((提供商Row)(this.NewRow()));
                row提供商Row.ItemArray = new object[] {
                        null,
                        备注,
                        地址,
                        电话,
                        联系人,
                        名称,
                        提供类别};
                this.Rows.Add(row提供商Row);
                return row提供商Row;
            }
            
            public 提供商Row FindByID(int ID) {
                return ((提供商Row)(this.Rows.Find(new object[] {
                            ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                提供商DataTable cln = ((提供商DataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new 提供商DataTable();
            }
            
            internal void InitVars() {
                this.columnID = this.Columns["ID"];
                this.column备注 = this.Columns["备注"];
                this.column地址 = this.Columns["地址"];
                this.column电话 = this.Columns["电话"];
                this.column联系人 = this.Columns["联系人"];
                this.column名称 = this.Columns["名称"];
                this.column提供类别 = this.Columns["提供类别"];
            }
            
            private void InitClass() {
                this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnID);
                this.column备注 = new DataColumn("备注", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column备注);
                this.column地址 = new DataColumn("地址", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column地址);
                this.column电话 = new DataColumn("电话", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column电话);
                this.column联系人 = new DataColumn("联系人", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column联系人);
                this.column名称 = new DataColumn("名称", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column名称);
                this.column提供类别 = new DataColumn("提供类别", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column提供类别);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnID}, true));
                this.columnID.AutoIncrement = true;
                this.columnID.AllowDBNull = false;
                this.columnID.Unique = true;
            }
            
            public 提供商Row New提供商Row() {
                return ((提供商Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new 提供商Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(提供商Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.提供商RowChanged != null)) {
                    this.提供商RowChanged(this, new 提供商RowChangeEvent(((提供商Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.提供商RowChanging != null)) {
                    this.提供商RowChanging(this, new 提供商RowChangeEvent(((提供商Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.提供商RowDeleted != null)) {
                    this.提供商RowDeleted(this, new 提供商RowChangeEvent(((提供商Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.提供商RowDeleting != null)) {
                    this.提供商RowDeleting(this, new 提供商RowChangeEvent(((提供商Row)(e.Row)), e.Action));
                }
            }
            
            public void Remove提供商Row(提供商Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 提供商Row : DataRow {
            
            private 提供商DataTable table提供商;
            
            internal 提供商Row(DataRowBuilder rb) : 
                    base(rb) {
                this.table提供商 = ((提供商DataTable)(this.Table));
            }
            
            public int ID {
                get {
                    return ((int)(this[this.table提供商.IDColumn]));
                }
                set {
                    this[this.table提供商.IDColumn] = value;
                }
            }
            
            public string 备注 {
                get {
                    try {
                        return ((string)(this[this.table提供商.备注Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.备注Column] = value;
                }
            }
            
            public string 地址 {
                get {
                    try {
                        return ((string)(this[this.table提供商.地址Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.地址Column] = value;
                }
            }
            
            public string 电话 {
                get {
                    try {
                        return ((string)(this[this.table提供商.电话Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.电话Column] = value;
                }
            }
            
            public string 联系人 {
                get {
                    try {
                        return ((string)(this[this.table提供商.联系人Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.联系人Column] = value;
                }
            }
            
            public string 名称 {
                get {
                    try {
                        return ((string)(this[this.table提供商.名称Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.名称Column] = value;
                }
            }
            
            public string 提供类别 {
                get {
                    try {
                        return ((string)(this[this.table提供商.提供类别Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table提供商.提供类别Column] = value;
                }
            }
            
            public bool Is备注Null() {
                return this.IsNull(this.table提供商.备注Column);
            }
            
            public void Set备注Null() {
                this[this.table提供商.备注Column] = System.Convert.DBNull;
            }
            
            public bool Is地址Null() {
                return this.IsNull(this.table提供商.地址Column);
            }
            
            public void Set地址Null() {
                this[this.table提供商.地址Column] = System.Convert.DBNull;
            }
            
            public bool Is电话Null() {
                return this.IsNull(this.table提供商.电话Column);
            }
            
            public void Set电话Null() {
                this[this.table提供商.电话Column] = System.Convert.DBNull;
            }
            
            public bool Is联系人Null() {
                return this.IsNull(this.table提供商.联系人Column);
            }
            
            public void Set联系人Null() {
                this[this.table提供商.联系人Column] = System.Convert.DBNull;
            }
            
            public bool Is名称Null() {
                return this.IsNull(this.table提供商.名称Column);
            }

⌨️ 快捷键说明

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