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

📄 dataset1.cs

📁 酒店管理系统
💻 CS
📖 第 1 页 / 共 4 页
字号:
            }
            
            internal DataColumn nameColumn {
                get {
                    return this.columnname;
                }
            }
            
            internal DataColumn sexColumn {
                get {
                    return this.columnsex;
                }
            }
            
            internal DataColumn ageColumn {
                get {
                    return this.columnage;
                }
            }
            
            internal DataColumn pictureColumn {
                get {
                    return this.columnpicture;
                }
            }
            
            internal DataColumn telephoneColumn {
                get {
                    return this.columntelephone;
                }
            }
            
            internal DataColumn levelColumn {
                get {
                    return this.columnlevel;
                }
            }
            
            public ciceroniRow this[int index] {
                get {
                    return ((ciceroniRow)(this.Rows[index]));
                }
            }
            
            public event ciceroniRowChangeEventHandler ciceroniRowChanged;
            
            public event ciceroniRowChangeEventHandler ciceroniRowChanging;
            
            public event ciceroniRowChangeEventHandler ciceroniRowDeleted;
            
            public event ciceroniRowChangeEventHandler ciceroniRowDeleting;
            
            public void AddciceroniRow(ciceroniRow row) {
                this.Rows.Add(row);
            }
            
            public ciceroniRow AddciceroniRow(int ciceroniid, string name, string sex, int age, string picture, string telephone, string level) {
                ciceroniRow rowciceroniRow = ((ciceroniRow)(this.NewRow()));
                rowciceroniRow.ItemArray = new object[] {
                        ciceroniid,
                        name,
                        sex,
                        age,
                        picture,
                        telephone,
                        level};
                this.Rows.Add(rowciceroniRow);
                return rowciceroniRow;
            }
            
            public ciceroniRow FindByciceroniid(int ciceroniid) {
                return ((ciceroniRow)(this.Rows.Find(new object[] {
                            ciceroniid})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ciceroniDataTable cln = ((ciceroniDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ciceroniDataTable();
            }
            
            internal void InitVars() {
                this.columnciceroniid = this.Columns["ciceroniid"];
                this.columnname = this.Columns["name"];
                this.columnsex = this.Columns["sex"];
                this.columnage = this.Columns["age"];
                this.columnpicture = this.Columns["picture"];
                this.columntelephone = this.Columns["telephone"];
                this.columnlevel = this.Columns["level"];
            }
            
            private void InitClass() {
                this.columnciceroniid = new DataColumn("ciceroniid", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnciceroniid);
                this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnname);
                this.columnsex = new DataColumn("sex", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnsex);
                this.columnage = new DataColumn("age", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnage);
                this.columnpicture = new DataColumn("picture", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpicture);
                this.columntelephone = new DataColumn("telephone", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columntelephone);
                this.columnlevel = new DataColumn("level", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnlevel);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnciceroniid}, true));
                this.columnciceroniid.AllowDBNull = false;
                this.columnciceroniid.Unique = true;
                this.columnname.AllowDBNull = false;
                this.columnsex.AllowDBNull = false;
            }
            
            public ciceroniRow NewciceroniRow() {
                return ((ciceroniRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ciceroniRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ciceroniRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ciceroniRowChanged != null)) {
                    this.ciceroniRowChanged(this, new ciceroniRowChangeEvent(((ciceroniRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ciceroniRowChanging != null)) {
                    this.ciceroniRowChanging(this, new ciceroniRowChangeEvent(((ciceroniRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ciceroniRowDeleted != null)) {
                    this.ciceroniRowDeleted(this, new ciceroniRowChangeEvent(((ciceroniRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ciceroniRowDeleting != null)) {
                    this.ciceroniRowDeleting(this, new ciceroniRowChangeEvent(((ciceroniRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveciceroniRow(ciceroniRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ciceroniRow : DataRow {
            
            private ciceroniDataTable tableciceroni;
            
            internal ciceroniRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableciceroni = ((ciceroniDataTable)(this.Table));
            }
            
            public int ciceroniid {
                get {
                    return ((int)(this[this.tableciceroni.ciceroniidColumn]));
                }
                set {
                    this[this.tableciceroni.ciceroniidColumn] = value;
                }
            }
            
            public string name {
                get {
                    return ((string)(this[this.tableciceroni.nameColumn]));
                }
                set {
                    this[this.tableciceroni.nameColumn] = value;
                }
            }
            
            public string sex {
                get {
                    return ((string)(this[this.tableciceroni.sexColumn]));
                }
                set {
                    this[this.tableciceroni.sexColumn] = value;
                }
            }
            
            public int age {
                get {
                    try {
                        return ((int)(this[this.tableciceroni.ageColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableciceroni.ageColumn] = value;
                }
            }
            
            public string picture {
                get {
                    try {
                        return ((string)(this[this.tableciceroni.pictureColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableciceroni.pictureColumn] = value;
                }
            }
            
            public string telephone {
                get {
                    try {
                        return ((string)(this[this.tableciceroni.telephoneColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableciceroni.telephoneColumn] = value;
                }
            }
            
            public string level {
                get {
                    try {
                        return ((string)(this[this.tableciceroni.levelColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableciceroni.levelColumn] = value;
                }
            }
            
            public bool IsageNull() {
                return this.IsNull(this.tableciceroni.ageColumn);
            }
            
            public void SetageNull() {
                this[this.tableciceroni.ageColumn] = System.Convert.DBNull;
            }
            
            public bool IspictureNull() {
                return this.IsNull(this.tableciceroni.pictureColumn);
            }
            
            public void SetpictureNull() {
                this[this.tableciceroni.pictureColumn] = System.Convert.DBNull;
            }
            
            public bool IstelephoneNull() {
                return this.IsNull(this.tableciceroni.telephoneColumn);
            }
            
            public void SettelephoneNull() {
                this[this.tableciceroni.telephoneColumn] = System.Convert.DBNull;
            }
            
            public bool IslevelNull() {
                return this.IsNull(this.tableciceroni.levelColumn);
            }
            
            public void SetlevelNull() {
                this[this.tableciceroni.levelColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ciceroniRowChangeEvent : EventArgs {
            
            private ciceroniRow eventRow;
            
            private DataRowAction eventAction;
            
            public ciceroniRowChangeEvent(ciceroniRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ciceroniRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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