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

📄 dataset2.cs

📁 atm取款机,源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public event 银行卡RowChangeEventHandler 银行卡RowChanging;
            
            public event 银行卡RowChangeEventHandler 银行卡RowDeleted;
            
            public event 银行卡RowChangeEventHandler 银行卡RowDeleting;
            
            public void Add银行卡Row(银行卡Row row) {
                this.Rows.Add(row);
            }
            
            public 银行卡Row Add银行卡Row(string 金额, string 卡号, string 密码) {
                银行卡Row row银行卡Row = ((银行卡Row)(this.NewRow()));
                row银行卡Row.ItemArray = new object[] {
                        金额,
                        卡号,
                        密码};
                this.Rows.Add(row银行卡Row);
                return row银行卡Row;
            }
            
            public 银行卡Row FindBy卡号(string 卡号) {
                return ((银行卡Row)(this.Rows.Find(new object[] {
                            卡号})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                银行卡DataTable cln = ((银行卡DataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new 银行卡DataTable();
            }
            
            internal void InitVars() {
                this.column金额 = this.Columns["金额"];
                this.column卡号 = this.Columns["卡号"];
                this.column密码 = this.Columns["密码"];
            }
            
            private void InitClass() {
                this.column金额 = new DataColumn("金额", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column金额);
                this.column卡号 = new DataColumn("卡号", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column卡号);
                this.column密码 = new DataColumn("密码", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.column密码);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.column卡号}, true));
                this.column卡号.AllowDBNull = false;
                this.column卡号.Unique = true;
            }
            
            public 银行卡Row New银行卡Row() {
                return ((银行卡Row)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new 银行卡Row(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(银行卡Row);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.银行卡RowChanged != null)) {
                    this.银行卡RowChanged(this, new 银行卡RowChangeEvent(((银行卡Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.银行卡RowChanging != null)) {
                    this.银行卡RowChanging(this, new 银行卡RowChangeEvent(((银行卡Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.银行卡RowDeleted != null)) {
                    this.银行卡RowDeleted(this, new 银行卡RowChangeEvent(((银行卡Row)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.银行卡RowDeleting != null)) {
                    this.银行卡RowDeleting(this, new 银行卡RowChangeEvent(((银行卡Row)(e.Row)), e.Action));
                }
            }
            
            public void Remove银行卡Row(银行卡Row row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 银行卡Row : DataRow {
            
            private 银行卡DataTable table银行卡;
            
            internal 银行卡Row(DataRowBuilder rb) : 
                    base(rb) {
                this.table银行卡 = ((银行卡DataTable)(this.Table));
            }
            
            public string 金额 {
                get {
                    try {
                        return ((string)(this[this.table银行卡.金额Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table银行卡.金额Column] = value;
                }
            }
            
            public string 卡号 {
                get {
                    return ((string)(this[this.table银行卡.卡号Column]));
                }
                set {
                    this[this.table银行卡.卡号Column] = value;
                }
            }
            
            public string 密码 {
                get {
                    try {
                        return ((string)(this[this.table银行卡.密码Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.table银行卡.密码Column] = value;
                }
            }
            
            public bool Is金额Null() {
                return this.IsNull(this.table银行卡.金额Column);
            }
            
            public void Set金额Null() {
                this[this.table银行卡.金额Column] = System.Convert.DBNull;
            }
            
            public bool Is密码Null() {
                return this.IsNull(this.table银行卡.密码Column);
            }
            
            public void Set密码Null() {
                this[this.table银行卡.密码Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class 银行卡RowChangeEvent : EventArgs {
            
            private 银行卡Row eventRow;
            
            private DataRowAction eventAction;
            
            public 银行卡RowChangeEvent(银行卡Row row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public 银行卡Row Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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