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

📄 dataset2.cs

📁 超市运行模拟软件源程序源代码,是一个用c#语言编写的C/S软件,开发环境是VS.NET 2003 登陆时可以看数据库中的姓名和密码,不然无法登陆,具体操作见里面的说明!
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public event goodpassRowChangeEventHandler goodpassRowChanging;
            
            public event goodpassRowChangeEventHandler goodpassRowDeleted;
            
            public event goodpassRowChangeEventHandler goodpassRowDeleting;
            
            public void AddgoodpassRow(goodpassRow row) {
                this.Rows.Add(row);
            }
            
            public goodpassRow AddgoodpassRow(string name, string password, int unit) {
                goodpassRow rowgoodpassRow = ((goodpassRow)(this.NewRow()));
                rowgoodpassRow.ItemArray = new object[] {
                        name,
                        password,
                        unit};
                this.Rows.Add(rowgoodpassRow);
                return rowgoodpassRow;
            }
            
            public goodpassRow FindByname(string name) {
                return ((goodpassRow)(this.Rows.Find(new object[] {
                            name})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                goodpassDataTable cln = ((goodpassDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new goodpassDataTable();
            }
            
            internal void InitVars() {
                this.columnname = this.Columns["name"];
                this.columnpassword = this.Columns["password"];
                this.columnunit = this.Columns["unit"];
            }
            
            private void InitClass() {
                this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnname);
                this.columnpassword = new DataColumn("password", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnpassword);
                this.columnunit = new DataColumn("unit", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnunit);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnname}, true));
                this.columnname.AllowDBNull = false;
                this.columnname.Unique = true;
            }
            
            public goodpassRow NewgoodpassRow() {
                return ((goodpassRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new goodpassRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(goodpassRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.goodpassRowChanged != null)) {
                    this.goodpassRowChanged(this, new goodpassRowChangeEvent(((goodpassRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.goodpassRowChanging != null)) {
                    this.goodpassRowChanging(this, new goodpassRowChangeEvent(((goodpassRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.goodpassRowDeleted != null)) {
                    this.goodpassRowDeleted(this, new goodpassRowChangeEvent(((goodpassRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.goodpassRowDeleting != null)) {
                    this.goodpassRowDeleting(this, new goodpassRowChangeEvent(((goodpassRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovegoodpassRow(goodpassRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class goodpassRow : DataRow {
            
            private goodpassDataTable tablegoodpass;
            
            internal goodpassRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablegoodpass = ((goodpassDataTable)(this.Table));
            }
            
            public string name {
                get {
                    return ((string)(this[this.tablegoodpass.nameColumn]));
                }
                set {
                    this[this.tablegoodpass.nameColumn] = value;
                }
            }
            
            public string password {
                get {
                    try {
                        return ((string)(this[this.tablegoodpass.passwordColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablegoodpass.passwordColumn] = value;
                }
            }
            
            public int unit {
                get {
                    try {
                        return ((int)(this[this.tablegoodpass.unitColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tablegoodpass.unitColumn] = value;
                }
            }
            
            public bool IspasswordNull() {
                return this.IsNull(this.tablegoodpass.passwordColumn);
            }
            
            public void SetpasswordNull() {
                this[this.tablegoodpass.passwordColumn] = System.Convert.DBNull;
            }
            
            public bool IsunitNull() {
                return this.IsNull(this.tablegoodpass.unitColumn);
            }
            
            public void SetunitNull() {
                this[this.tablegoodpass.unitColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class goodpassRowChangeEvent : EventArgs {
            
            private goodpassRow eventRow;
            
            private DataRowAction eventAction;
            
            public goodpassRowChangeEvent(goodpassRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public goodpassRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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