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

📄 conlist.cs

📁 一个基本的酒店管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        Discount,
                        Snumber,
                        Stotal,
                        Sdatetime,
                        Ename,
                        Aname};
                this.Rows.Add(rowview_ConListRow);
                return rowview_ConListRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                view_ConListDataTable cln = ((view_ConListDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new view_ConListDataTable();
            }
            
            internal void InitVars() {
                this.columnSid = this.Columns["Sid"];
                this.columnNrid = this.Columns["Nrid"];
                this.columnWname = this.Columns["Wname"];
                this.columnWprice = this.Columns["Wprice"];
                this.columnDiscount = this.Columns["Discount"];
                this.columnSnumber = this.Columns["Snumber"];
                this.columnStotal = this.Columns["Stotal"];
                this.columnSdatetime = this.Columns["Sdatetime"];
                this.columnEname = this.Columns["Ename"];
                this.columnAname = this.Columns["Aname"];
            }
            
            private void InitClass() {
                this.columnSid = new DataColumn("Sid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSid);
                this.columnNrid = new DataColumn("Nrid", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnNrid);
                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.columnDiscount = new DataColumn("Discount", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDiscount);
                this.columnSnumber = new DataColumn("Snumber", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSnumber);
                this.columnStotal = new DataColumn("Stotal", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStotal);
                this.columnSdatetime = new DataColumn("Sdatetime", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSdatetime);
                this.columnEname = new DataColumn("Ename", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEname);
                this.columnAname = new DataColumn("Aname", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAname);
                this.columnSid.AutoIncrement = true;
                this.columnSid.AllowDBNull = false;
                this.columnSid.ReadOnly = true;
                this.columnNrid.AllowDBNull = false;
                this.columnWname.AllowDBNull = false;
                this.columnWprice.AllowDBNull = false;
                this.columnDiscount.AllowDBNull = false;
                this.columnSnumber.AllowDBNull = false;
                this.columnStotal.ReadOnly = true;
                this.columnEname.AllowDBNull = false;
                this.columnAname.AllowDBNull = false;
            }
            
            public view_ConListRow Newview_ConListRow() {
                return ((view_ConListRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new view_ConListRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(view_ConListRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.view_ConListRowChanged != null)) {
                    this.view_ConListRowChanged(this, new view_ConListRowChangeEvent(((view_ConListRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.view_ConListRowChanging != null)) {
                    this.view_ConListRowChanging(this, new view_ConListRowChangeEvent(((view_ConListRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.view_ConListRowDeleted != null)) {
                    this.view_ConListRowDeleted(this, new view_ConListRowChangeEvent(((view_ConListRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.view_ConListRowDeleting != null)) {
                    this.view_ConListRowDeleting(this, new view_ConListRowChangeEvent(((view_ConListRow)(e.Row)), e.Action));
                }
            }
            
            public void Removeview_ConListRow(view_ConListRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class view_ConListRow : DataRow {
            
            private view_ConListDataTable tableview_ConList;
            
            internal view_ConListRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableview_ConList = ((view_ConListDataTable)(this.Table));
            }
            
            public int Sid {
                get {
                    return ((int)(this[this.tableview_ConList.SidColumn]));
                }
                set {
                    this[this.tableview_ConList.SidColumn] = value;
                }
            }
            
            public string Nrid {
                get {
                    return ((string)(this[this.tableview_ConList.NridColumn]));
                }
                set {
                    this[this.tableview_ConList.NridColumn] = value;
                }
            }
            
            public string Wname {
                get {
                    return ((string)(this[this.tableview_ConList.WnameColumn]));
                }
                set {
                    this[this.tableview_ConList.WnameColumn] = value;
                }
            }
            
            public System.Decimal Wprice {
                get {
                    return ((System.Decimal)(this[this.tableview_ConList.WpriceColumn]));
                }
                set {
                    this[this.tableview_ConList.WpriceColumn] = value;
                }
            }
            
            public System.Double Discount {
                get {
                    return ((System.Double)(this[this.tableview_ConList.DiscountColumn]));
                }
                set {
                    this[this.tableview_ConList.DiscountColumn] = value;
                }
            }
            
            public int Snumber {
                get {
                    return ((int)(this[this.tableview_ConList.SnumberColumn]));
                }
                set {
                    this[this.tableview_ConList.SnumberColumn] = value;
                }
            }
            
            public System.Double Stotal {
                get {
                    try {
                        return ((System.Double)(this[this.tableview_ConList.StotalColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableview_ConList.StotalColumn] = value;
                }
            }
            
            public System.DateTime Sdatetime {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableview_ConList.SdatetimeColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableview_ConList.SdatetimeColumn] = value;
                }
            }
            
            public string Ename {
                get {
                    return ((string)(this[this.tableview_ConList.EnameColumn]));
                }
                set {
                    this[this.tableview_ConList.EnameColumn] = value;
                }
            }
            
            public string Aname {
                get {
                    return ((string)(this[this.tableview_ConList.AnameColumn]));
                }
                set {
                    this[this.tableview_ConList.AnameColumn] = value;
                }
            }
            
            public bool IsStotalNull() {
                return this.IsNull(this.tableview_ConList.StotalColumn);
            }
            
            public void SetStotalNull() {
                this[this.tableview_ConList.StotalColumn] = System.Convert.DBNull;
            }
            
            public bool IsSdatetimeNull() {
                return this.IsNull(this.tableview_ConList.SdatetimeColumn);
            }
            
            public void SetSdatetimeNull() {
                this[this.tableview_ConList.SdatetimeColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class view_ConListRowChangeEvent : EventArgs {
            
            private view_ConListRow eventRow;
            
            private DataRowAction eventAction;
            
            public view_ConListRowChangeEvent(view_ConListRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public view_ConListRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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