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

📄 dataset5.cs

📁 酒店管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                }
            }
            
            public newsRow this[int index] {
                get {
                    return ((newsRow)(this.Rows[index]));
                }
            }
            
            public event newsRowChangeEventHandler newsRowChanged;
            
            public event newsRowChangeEventHandler newsRowChanging;
            
            public event newsRowChangeEventHandler newsRowDeleted;
            
            public event newsRowChangeEventHandler newsRowDeleting;
            
            public void AddnewsRow(newsRow row) {
                this.Rows.Add(row);
            }
            
            public newsRow AddnewsRow(int newsid, string title, string content, string newtime, string source) {
                newsRow rownewsRow = ((newsRow)(this.NewRow()));
                rownewsRow.ItemArray = new object[] {
                        newsid,
                        title,
                        content,
                        newtime,
                        source};
                this.Rows.Add(rownewsRow);
                return rownewsRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                newsDataTable cln = ((newsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new newsDataTable();
            }
            
            internal void InitVars() {
                this.columnnewsid = this.Columns["newsid"];
                this.columntitle = this.Columns["title"];
                this.columncontent = this.Columns["content"];
                this.columnnewtime = this.Columns["newtime"];
                this.columnsource = this.Columns["source"];
            }
            
            private void InitClass() {
                this.columnnewsid = new DataColumn("newsid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnnewsid);
                this.columntitle = new DataColumn("title", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntitle);
                this.columncontent = new DataColumn("content", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columncontent);
                this.columnnewtime = new DataColumn("newtime", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnnewtime);
                this.columnsource = new DataColumn("source", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnsource);
                this.columnnewsid.AllowDBNull = false;
                this.columntitle.AllowDBNull = false;
                this.columncontent.AllowDBNull = false;
                this.columnnewtime.AllowDBNull = false;
                this.columnsource.AllowDBNull = false;
            }
            
            public newsRow NewnewsRow() {
                return ((newsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new newsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(newsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.newsRowChanged != null)) {
                    this.newsRowChanged(this, new newsRowChangeEvent(((newsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.newsRowChanging != null)) {
                    this.newsRowChanging(this, new newsRowChangeEvent(((newsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.newsRowDeleted != null)) {
                    this.newsRowDeleted(this, new newsRowChangeEvent(((newsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.newsRowDeleting != null)) {
                    this.newsRowDeleting(this, new newsRowChangeEvent(((newsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovenewsRow(newsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class newsRow : DataRow {
            
            private newsDataTable tablenews;
            
            internal newsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablenews = ((newsDataTable)(this.Table));
            }
            
            public int newsid {
                get {
                    return ((int)(this[this.tablenews.newsidColumn]));
                }
                set {
                    this[this.tablenews.newsidColumn] = value;
                }
            }
            
            public string title {
                get {
                    return ((string)(this[this.tablenews.titleColumn]));
                }
                set {
                    this[this.tablenews.titleColumn] = value;
                }
            }
            
            public string content {
                get {
                    return ((string)(this[this.tablenews.contentColumn]));
                }
                set {
                    this[this.tablenews.contentColumn] = value;
                }
            }
            
            public string newtime {
                get {
                    return ((string)(this[this.tablenews.newtimeColumn]));
                }
                set {
                    this[this.tablenews.newtimeColumn] = value;
                }
            }
            
            public string source {
                get {
                    return ((string)(this[this.tablenews.sourceColumn]));
                }
                set {
                    this[this.tablenews.sourceColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class newsRowChangeEvent : EventArgs {
            
            private newsRow eventRow;
            
            private DataRowAction eventAction;
            
            public newsRowChangeEvent(newsRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public newsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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