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

📄 dataset1.cs

📁 c#网络编程及应用-刘瑞新
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public event salesRowChangeEventHandler salesRowChanged;
            
            public event salesRowChangeEventHandler salesRowChanging;
            
            public event salesRowChangeEventHandler salesRowDeleted;
            
            public event salesRowChangeEventHandler salesRowDeleting;
            
            public void AddsalesRow(salesRow row) {
                this.Rows.Add(row);
            }
            
            public salesRow AddsalesRow(string stor_id, string ord_num, System.DateTime ord_date, short qty, string payterms, string title_id) {
                salesRow rowsalesRow = ((salesRow)(this.NewRow()));
                rowsalesRow.ItemArray = new object[] {
                        stor_id,
                        ord_num,
                        ord_date,
                        qty,
                        payterms,
                        title_id};
                this.Rows.Add(rowsalesRow);
                return rowsalesRow;
            }
            
            public salesRow FindBystor_idord_numtitle_id(string stor_id, string ord_num, string title_id) {
                return ((salesRow)(this.Rows.Find(new object[] {
                            stor_id,
                            ord_num,
                            title_id})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                salesDataTable cln = ((salesDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new salesDataTable();
            }
            
            internal void InitVars() {
                this.columnstor_id = this.Columns["stor_id"];
                this.columnord_num = this.Columns["ord_num"];
                this.columnord_date = this.Columns["ord_date"];
                this.columnqty = this.Columns["qty"];
                this.columnpayterms = this.Columns["payterms"];
                this.columntitle_id = this.Columns["title_id"];
            }
            
            private void InitClass() {
                this.columnstor_id = new DataColumn("stor_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnstor_id);
                this.columnord_num = new DataColumn("ord_num", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnord_num);
                this.columnord_date = new DataColumn("ord_date", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnord_date);
                this.columnqty = new DataColumn("qty", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnqty);
                this.columnpayterms = new DataColumn("payterms", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpayterms);
                this.columntitle_id = new DataColumn("title_id", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntitle_id);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnstor_id,
                                this.columnord_num,
                                this.columntitle_id}, true));
                this.columnstor_id.AllowDBNull = false;
                this.columnord_num.AllowDBNull = false;
                this.columnord_date.AllowDBNull = false;
                this.columnqty.AllowDBNull = false;
                this.columnpayterms.AllowDBNull = false;
                this.columntitle_id.AllowDBNull = false;
            }
            
            public salesRow NewsalesRow() {
                return ((salesRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new salesRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(salesRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.salesRowChanged != null)) {
                    this.salesRowChanged(this, new salesRowChangeEvent(((salesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.salesRowChanging != null)) {
                    this.salesRowChanging(this, new salesRowChangeEvent(((salesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.salesRowDeleted != null)) {
                    this.salesRowDeleted(this, new salesRowChangeEvent(((salesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.salesRowDeleting != null)) {
                    this.salesRowDeleting(this, new salesRowChangeEvent(((salesRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovesalesRow(salesRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class salesRow : DataRow {
            
            private salesDataTable tablesales;
            
            internal salesRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablesales = ((salesDataTable)(this.Table));
            }
            
            public string stor_id {
                get {
                    return ((string)(this[this.tablesales.stor_idColumn]));
                }
                set {
                    this[this.tablesales.stor_idColumn] = value;
                }
            }
            
            public string ord_num {
                get {
                    return ((string)(this[this.tablesales.ord_numColumn]));
                }
                set {
                    this[this.tablesales.ord_numColumn] = value;
                }
            }
            
            public System.DateTime ord_date {
                get {
                    return ((System.DateTime)(this[this.tablesales.ord_dateColumn]));
                }
                set {
                    this[this.tablesales.ord_dateColumn] = value;
                }
            }
            
            public short qty {
                get {
                    return ((short)(this[this.tablesales.qtyColumn]));
                }
                set {
                    this[this.tablesales.qtyColumn] = value;
                }
            }
            
            public string payterms {
                get {
                    return ((string)(this[this.tablesales.paytermsColumn]));
                }
                set {
                    this[this.tablesales.paytermsColumn] = value;
                }
            }
            
            public string title_id {
                get {
                    return ((string)(this[this.tablesales.title_idColumn]));
                }
                set {
                    this[this.tablesales.title_idColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class salesRowChangeEvent : EventArgs {
            
            private salesRow eventRow;
            
            private DataRowAction eventAction;
            
            public salesRowChangeEvent(salesRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public salesRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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