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

📄 typeroomdata.cs

📁 一个基本的酒店管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public event TypeRoomRowChangeEventHandler TypeRoomRowChanged;
            
            public event TypeRoomRowChangeEventHandler TypeRoomRowChanging;
            
            public event TypeRoomRowChangeEventHandler TypeRoomRowDeleted;
            
            public event TypeRoomRowChangeEventHandler TypeRoomRowDeleting;
            
            public void AddTypeRoomRow(TypeRoomRow row) {
                this.Rows.Add(row);
            }
            
            public TypeRoomRow AddTypeRoomRow(string TType, System.Double PriceByday, System.Double priceByhour, int IsTimeRoom, System.Double Tdeposit) {
                TypeRoomRow rowTypeRoomRow = ((TypeRoomRow)(this.NewRow()));
                rowTypeRoomRow.ItemArray = new object[] {
                        null,
                        TType,
                        PriceByday,
                        priceByhour,
                        IsTimeRoom,
                        Tdeposit};
                this.Rows.Add(rowTypeRoomRow);
                return rowTypeRoomRow;
            }
            
            public TypeRoomRow FindByTid(int Tid) {
                return ((TypeRoomRow)(this.Rows.Find(new object[] {
                            Tid})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                TypeRoomDataTable cln = ((TypeRoomDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new TypeRoomDataTable();
            }
            
            internal void InitVars() {
                this.columnTid = this.Columns["Tid"];
                this.columnTType = this.Columns["TType"];
                this.columnPriceByday = this.Columns["PriceByday"];
                this.columnpriceByhour = this.Columns["priceByhour"];
                this.columnIsTimeRoom = this.Columns["IsTimeRoom"];
                this.columnTdeposit = this.Columns["Tdeposit"];
            }
            
            private void InitClass() {
                this.columnTid = new DataColumn("Tid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTid);
                this.columnTType = new DataColumn("TType", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTType);
                this.columnPriceByday = new DataColumn("PriceByday", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPriceByday);
                this.columnpriceByhour = new DataColumn("priceByhour", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpriceByhour);
                this.columnIsTimeRoom = new DataColumn("IsTimeRoom", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIsTimeRoom);
                this.columnTdeposit = new DataColumn("Tdeposit", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTdeposit);
                this.Constraints.Add(new UniqueConstraint("DocumentKey1", new DataColumn[] {
                                this.columnTid}, true));
                this.columnTid.AutoIncrement = true;
                this.columnTid.AllowDBNull = false;
                this.columnTid.ReadOnly = true;
                this.columnTid.Unique = true;
                this.columnTType.AllowDBNull = false;
                this.columnPriceByday.AllowDBNull = false;
                this.columnpriceByhour.AllowDBNull = false;
                this.columnIsTimeRoom.AllowDBNull = false;
                this.columnTdeposit.AllowDBNull = false;
            }
            
            public TypeRoomRow NewTypeRoomRow() {
                return ((TypeRoomRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new TypeRoomRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(TypeRoomRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.TypeRoomRowChanged != null)) {
                    this.TypeRoomRowChanged(this, new TypeRoomRowChangeEvent(((TypeRoomRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.TypeRoomRowChanging != null)) {
                    this.TypeRoomRowChanging(this, new TypeRoomRowChangeEvent(((TypeRoomRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.TypeRoomRowDeleted != null)) {
                    this.TypeRoomRowDeleted(this, new TypeRoomRowChangeEvent(((TypeRoomRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.TypeRoomRowDeleting != null)) {
                    this.TypeRoomRowDeleting(this, new TypeRoomRowChangeEvent(((TypeRoomRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveTypeRoomRow(TypeRoomRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TypeRoomRow : DataRow {
            
            private TypeRoomDataTable tableTypeRoom;
            
            internal TypeRoomRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableTypeRoom = ((TypeRoomDataTable)(this.Table));
            }
            
            public int Tid {
                get {
                    return ((int)(this[this.tableTypeRoom.TidColumn]));
                }
                set {
                    this[this.tableTypeRoom.TidColumn] = value;
                }
            }
            
            public string TType {
                get {
                    return ((string)(this[this.tableTypeRoom.TTypeColumn]));
                }
                set {
                    this[this.tableTypeRoom.TTypeColumn] = value;
                }
            }
            
            public System.Double PriceByday {
                get {
                    return ((System.Double)(this[this.tableTypeRoom.PriceBydayColumn]));
                }
                set {
                    this[this.tableTypeRoom.PriceBydayColumn] = value;
                }
            }
            
            public System.Double priceByhour {
                get {
                    return ((System.Double)(this[this.tableTypeRoom.priceByhourColumn]));
                }
                set {
                    this[this.tableTypeRoom.priceByhourColumn] = value;
                }
            }
            
            public int IsTimeRoom {
                get {
                    return ((int)(this[this.tableTypeRoom.IsTimeRoomColumn]));
                }
                set {
                    this[this.tableTypeRoom.IsTimeRoomColumn] = value;
                }
            }
            
            public System.Double Tdeposit {
                get {
                    return ((System.Double)(this[this.tableTypeRoom.TdepositColumn]));
                }
                set {
                    this[this.tableTypeRoom.TdepositColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TypeRoomRowChangeEvent : EventArgs {
            
            private TypeRoomRow eventRow;
            
            private DataRowAction eventAction;
            
            public TypeRoomRowChangeEvent(TypeRoomRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public TypeRoomRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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