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

📄 warelookupdata.cs

📁 真的很不错哦 用了c#开发 面向对象过程
💻 CS
📖 第 1 页 / 共 2 页
字号:
            public event view_WareListLookupRowChangeEventHandler view_WareListLookupRowChanging;
            
            public event view_WareListLookupRowChangeEventHandler view_WareListLookupRowDeleted;
            
            public event view_WareListLookupRowChangeEventHandler view_WareListLookupRowDeleting;
            
            public void Addview_WareListLookupRow(view_WareListLookupRow row) {
                this.Rows.Add(row);
            }
            
            public view_WareListLookupRow Addview_WareListLookupRow(string Wname, System.Decimal Wprice, string Wchar, int Wstorage) {
                view_WareListLookupRow rowview_WareListLookupRow = ((view_WareListLookupRow)(this.NewRow()));
                rowview_WareListLookupRow.ItemArray = new object[] {
                        null,
                        Wname,
                        Wprice,
                        Wchar,
                        Wstorage};
                this.Rows.Add(rowview_WareListLookupRow);
                return rowview_WareListLookupRow;
            }
            
            public view_WareListLookupRow FindByWid(int Wid) {
                return ((view_WareListLookupRow)(this.Rows.Find(new object[] {
                            Wid})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                view_WareListLookupDataTable cln = ((view_WareListLookupDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new view_WareListLookupDataTable();
            }
            
            internal void InitVars() {
                this.columnWid = this.Columns["Wid"];
                this.columnWname = this.Columns["Wname"];
                this.columnWprice = this.Columns["Wprice"];
                this.columnWchar = this.Columns["Wchar"];
                this.columnWstorage = this.Columns["Wstorage"];
            }
            
            private void InitClass() {
                this.columnWid = new DataColumn("Wid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWid);
                this.columnWname = new DataColumn("Wname", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWname);
                this.columnWprice = new DataColumn("Wprice", typeof(System.Decimal), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWprice);
                this.columnWchar = new DataColumn("Wchar", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWchar);
                this.columnWstorage = new DataColumn("Wstorage", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWstorage);
                this.Constraints.Add(new UniqueConstraint("DocumentKey1", new DataColumn[] {
                                this.columnWid}, true));
                this.columnWid.AutoIncrement = true;
                this.columnWid.AllowDBNull = false;
                this.columnWid.ReadOnly = true;
                this.columnWid.Unique = true;
                this.columnWname.AllowDBNull = false;
                this.columnWprice.AllowDBNull = false;
                this.columnWchar.AllowDBNull = false;
            }
            
            public view_WareListLookupRow Newview_WareListLookupRow() {
                return ((view_WareListLookupRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new view_WareListLookupRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(view_WareListLookupRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.view_WareListLookupRowChanged != null)) {
                    this.view_WareListLookupRowChanged(this, new view_WareListLookupRowChangeEvent(((view_WareListLookupRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.view_WareListLookupRowChanging != null)) {
                    this.view_WareListLookupRowChanging(this, new view_WareListLookupRowChangeEvent(((view_WareListLookupRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.view_WareListLookupRowDeleted != null)) {
                    this.view_WareListLookupRowDeleted(this, new view_WareListLookupRowChangeEvent(((view_WareListLookupRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.view_WareListLookupRowDeleting != null)) {
                    this.view_WareListLookupRowDeleting(this, new view_WareListLookupRowChangeEvent(((view_WareListLookupRow)(e.Row)), e.Action));
                }
            }
            
            public void Removeview_WareListLookupRow(view_WareListLookupRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class view_WareListLookupRow : DataRow {
            
            private view_WareListLookupDataTable tableview_WareListLookup;
            
            internal view_WareListLookupRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableview_WareListLookup = ((view_WareListLookupDataTable)(this.Table));
            }
            
            public int Wid {
                get {
                    return ((int)(this[this.tableview_WareListLookup.WidColumn]));
                }
                set {
                    this[this.tableview_WareListLookup.WidColumn] = value;
                }
            }
            
            public string Wname {
                get {
                    return ((string)(this[this.tableview_WareListLookup.WnameColumn]));
                }
                set {
                    this[this.tableview_WareListLookup.WnameColumn] = value;
                }
            }
            
            public System.Decimal Wprice {
                get {
                    return ((System.Decimal)(this[this.tableview_WareListLookup.WpriceColumn]));
                }
                set {
                    this[this.tableview_WareListLookup.WpriceColumn] = value;
                }
            }
            
            public string Wchar {
                get {
                    return ((string)(this[this.tableview_WareListLookup.WcharColumn]));
                }
                set {
                    this[this.tableview_WareListLookup.WcharColumn] = value;
                }
            }
            
            public int Wstorage {
                get {
                    try {
                        return ((int)(this[this.tableview_WareListLookup.WstorageColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableview_WareListLookup.WstorageColumn] = value;
                }
            }
            
            public bool IsWstorageNull() {
                return this.IsNull(this.tableview_WareListLookup.WstorageColumn);
            }
            
            public void SetWstorageNull() {
                this[this.tableview_WareListLookup.WstorageColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class view_WareListLookupRowChangeEvent : EventArgs {
            
            private view_WareListLookupRow eventRow;
            
            private DataRowAction eventAction;
            
            public view_WareListLookupRowChangeEvent(view_WareListLookupRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public view_WareListLookupRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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