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

📄 wareinfodata.cs

📁 一个基本的酒店管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
            public event WareInfo_viewRowChangeEventHandler WareInfo_viewRowDeleting;
            
            public void AddWareInfo_viewRow(WareInfo_viewRow row) {
                this.Rows.Add(row);
            }
            
            public WareInfo_viewRow AddWareInfo_viewRow(int wid, string type, string wname, System.Decimal wprice, string wchar, string wunit) {
                WareInfo_viewRow rowWareInfo_viewRow = ((WareInfo_viewRow)(this.NewRow()));
                rowWareInfo_viewRow.ItemArray = new object[] {
                        wid,
                        type,
                        wname,
                        wprice,
                        wchar,
                        wunit};
                this.Rows.Add(rowWareInfo_viewRow);
                return rowWareInfo_viewRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                WareInfo_viewDataTable cln = ((WareInfo_viewDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new WareInfo_viewDataTable();
            }
            
            internal void InitVars() {
                this.columnwid = this.Columns["wid"];
                this.columntype = this.Columns["type"];
                this.columnwname = this.Columns["wname"];
                this.columnwprice = this.Columns["wprice"];
                this.columnwchar = this.Columns["wchar"];
                this.columnwunit = this.Columns["wunit"];
            }
            
            private void InitClass() {
                this.columnwid = new DataColumn("wid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnwid);
                this.columntype = new DataColumn("type", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntype);
                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.columnwunit = new DataColumn("wunit", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnwunit);
                this.columnwid.AllowDBNull = false;
                this.columnwname.AllowDBNull = false;
                this.columnwprice.AllowDBNull = false;
                this.columnwchar.AllowDBNull = false;
            }
            
            public WareInfo_viewRow NewWareInfo_viewRow() {
                return ((WareInfo_viewRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new WareInfo_viewRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(WareInfo_viewRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.WareInfo_viewRowChanged != null)) {
                    this.WareInfo_viewRowChanged(this, new WareInfo_viewRowChangeEvent(((WareInfo_viewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.WareInfo_viewRowChanging != null)) {
                    this.WareInfo_viewRowChanging(this, new WareInfo_viewRowChangeEvent(((WareInfo_viewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.WareInfo_viewRowDeleted != null)) {
                    this.WareInfo_viewRowDeleted(this, new WareInfo_viewRowChangeEvent(((WareInfo_viewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.WareInfo_viewRowDeleting != null)) {
                    this.WareInfo_viewRowDeleting(this, new WareInfo_viewRowChangeEvent(((WareInfo_viewRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveWareInfo_viewRow(WareInfo_viewRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class WareInfo_viewRow : DataRow {
            
            private WareInfo_viewDataTable tableWareInfo_view;
            
            internal WareInfo_viewRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableWareInfo_view = ((WareInfo_viewDataTable)(this.Table));
            }
            
            public int wid {
                get {
                    return ((int)(this[this.tableWareInfo_view.widColumn]));
                }
                set {
                    this[this.tableWareInfo_view.widColumn] = value;
                }
            }
            
            public string type {
                get {
                    try {
                        return ((string)(this[this.tableWareInfo_view.typeColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableWareInfo_view.typeColumn] = value;
                }
            }
            
            public string wname {
                get {
                    return ((string)(this[this.tableWareInfo_view.wnameColumn]));
                }
                set {
                    this[this.tableWareInfo_view.wnameColumn] = value;
                }
            }
            
            public System.Decimal wprice {
                get {
                    return ((System.Decimal)(this[this.tableWareInfo_view.wpriceColumn]));
                }
                set {
                    this[this.tableWareInfo_view.wpriceColumn] = value;
                }
            }
            
            public string wchar {
                get {
                    return ((string)(this[this.tableWareInfo_view.wcharColumn]));
                }
                set {
                    this[this.tableWareInfo_view.wcharColumn] = value;
                }
            }
            
            public string wunit {
                get {
                    try {
                        return ((string)(this[this.tableWareInfo_view.wunitColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableWareInfo_view.wunitColumn] = value;
                }
            }
            
            public bool IstypeNull() {
                return this.IsNull(this.tableWareInfo_view.typeColumn);
            }
            
            public void SettypeNull() {
                this[this.tableWareInfo_view.typeColumn] = System.Convert.DBNull;
            }
            
            public bool IswunitNull() {
                return this.IsNull(this.tableWareInfo_view.wunitColumn);
            }
            
            public void SetwunitNull() {
                this[this.tableWareInfo_view.wunitColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class WareInfo_viewRowChangeEvent : EventArgs {
            
            private WareInfo_viewRow eventRow;
            
            private DataRowAction eventAction;
            
            public WareInfo_viewRowChangeEvent(WareInfo_viewRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public WareInfo_viewRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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