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

📄 dataset1.cs

📁 《SQLServer2000宝典》—包括本书中的所有代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        Code,
                        Name,
                        ProductDescription,
                        ActiveDate,
                        DiscontinueDate,
                        ProductCategoryName,
                        RowVersion};
                this.Rows.Add(rowpProduct_FetchRow);
                return rowpProduct_FetchRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                pProduct_FetchDataTable cln = ((pProduct_FetchDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new pProduct_FetchDataTable();
            }
            
            internal void InitVars() {
                this.columnCode = this.Columns["Code"];
                this.columnName = this.Columns["Name"];
                this.columnProductDescription = this.Columns["ProductDescription"];
                this.columnActiveDate = this.Columns["ActiveDate"];
                this.columnDiscontinueDate = this.Columns["DiscontinueDate"];
                this.columnProductCategoryName = this.Columns["ProductCategoryName"];
                this.columnRowVersion = this.Columns["RowVersion"];
            }
            
            private void InitClass() {
                this.columnCode = new DataColumn("Code", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCode);
                this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnName);
                this.columnProductDescription = new DataColumn("ProductDescription", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnProductDescription);
                this.columnActiveDate = new DataColumn("ActiveDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnActiveDate);
                this.columnDiscontinueDate = new DataColumn("DiscontinueDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDiscontinueDate);
                this.columnProductCategoryName = new DataColumn("ProductCategoryName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnProductCategoryName);
                this.columnRowVersion = new DataColumn("RowVersion", typeof(System.Byte[]), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRowVersion);
                this.columnCode.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnActiveDate.AllowDBNull = false;
                this.columnProductCategoryName.AllowDBNull = false;
                this.columnRowVersion.ReadOnly = true;
            }
            
            public pProduct_FetchRow NewpProduct_FetchRow() {
                return ((pProduct_FetchRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new pProduct_FetchRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(pProduct_FetchRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.pProduct_FetchRowChanged != null)) {
                    this.pProduct_FetchRowChanged(this, new pProduct_FetchRowChangeEvent(((pProduct_FetchRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.pProduct_FetchRowChanging != null)) {
                    this.pProduct_FetchRowChanging(this, new pProduct_FetchRowChangeEvent(((pProduct_FetchRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.pProduct_FetchRowDeleted != null)) {
                    this.pProduct_FetchRowDeleted(this, new pProduct_FetchRowChangeEvent(((pProduct_FetchRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.pProduct_FetchRowDeleting != null)) {
                    this.pProduct_FetchRowDeleting(this, new pProduct_FetchRowChangeEvent(((pProduct_FetchRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovepProduct_FetchRow(pProduct_FetchRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class pProduct_FetchRow : DataRow {
            
            private pProduct_FetchDataTable tablepProduct_Fetch;
            
            internal pProduct_FetchRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablepProduct_Fetch = ((pProduct_FetchDataTable)(this.Table));
            }
            
            public string Code {
                get {
                    return ((string)(this[this.tablepProduct_Fetch.CodeColumn]));
                }
                set {
                    this[this.tablepProduct_Fetch.CodeColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablepProduct_Fetch.NameColumn]));
                }
                set {
                    this[this.tablepProduct_Fetch.NameColumn] = value;
                }
            }
            
            public string ProductDescription {
                get {
                    try {
                        return ((string)(this[this.tablepProduct_Fetch.ProductDescriptionColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tablepProduct_Fetch.ProductDescriptionColumn] = value;
                }
            }
            
            public System.DateTime ActiveDate {
                get {
                    return ((System.DateTime)(this[this.tablepProduct_Fetch.ActiveDateColumn]));
                }
                set {
                    this[this.tablepProduct_Fetch.ActiveDateColumn] = value;
                }
            }
            
            public System.DateTime DiscontinueDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablepProduct_Fetch.DiscontinueDateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tablepProduct_Fetch.DiscontinueDateColumn] = value;
                }
            }
            
            public string ProductCategoryName {
                get {
                    return ((string)(this[this.tablepProduct_Fetch.ProductCategoryNameColumn]));
                }
                set {
                    this[this.tablepProduct_Fetch.ProductCategoryNameColumn] = value;
                }
            }
            
            public System.Byte[] RowVersion {
                get {
                    try {
                        return ((System.Byte[])(this[this.tablepProduct_Fetch.RowVersionColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tablepProduct_Fetch.RowVersionColumn] = value;
                }
            }
            
            public bool IsProductDescriptionNull() {
                return this.IsNull(this.tablepProduct_Fetch.ProductDescriptionColumn);
            }
            
            public void SetProductDescriptionNull() {
                this[this.tablepProduct_Fetch.ProductDescriptionColumn] = System.Convert.DBNull;
            }
            
            public bool IsDiscontinueDateNull() {
                return this.IsNull(this.tablepProduct_Fetch.DiscontinueDateColumn);
            }
            
            public void SetDiscontinueDateNull() {
                this[this.tablepProduct_Fetch.DiscontinueDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsRowVersionNull() {
                return this.IsNull(this.tablepProduct_Fetch.RowVersionColumn);
            }
            
            public void SetRowVersionNull() {
                this[this.tablepProduct_Fetch.RowVersionColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class pProduct_FetchRowChangeEvent : EventArgs {
            
            private pProduct_FetchRow eventRow;
            
            private DataRowAction eventAction;
            
            public pProduct_FetchRowChangeEvent(pProduct_FetchRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public pProduct_FetchRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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