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

📄 dscustomers.cs

📁 专业实例开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
                    return ((BookerCustDetailsRow)(this.Rows[index]));
                }
            }
            
            public event BookerCustDetailsRowChangeEventHandler BookerCustDetailsRowChanged;
            
            public event BookerCustDetailsRowChangeEventHandler BookerCustDetailsRowChanging;
            
            public event BookerCustDetailsRowChangeEventHandler BookerCustDetailsRowDeleted;
            
            public event BookerCustDetailsRowChangeEventHandler BookerCustDetailsRowDeleting;
            
            public void AddBookerCustDetailsRow(BookerCustDetailsRow row) {
                this.Rows.Add(row);
            }
            
            public BookerCustDetailsRow AddBookerCustDetailsRow(string CustomerID, string CustomerName, string BillingAddress1, string BillingAddress2, string BillingAddressCity, string BillingAddressState) {
                BookerCustDetailsRow rowBookerCustDetailsRow = ((BookerCustDetailsRow)(this.NewRow()));
                rowBookerCustDetailsRow.ItemArray = new object[] {
                        CustomerID,
                        CustomerName,
                        BillingAddress1,
                        BillingAddress2,
                        BillingAddressCity,
                        BillingAddressState};
                this.Rows.Add(rowBookerCustDetailsRow);
                return rowBookerCustDetailsRow;
            }
            
            public BookerCustDetailsRow FindByCustomerID(string CustomerID) {
                return ((BookerCustDetailsRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                BookerCustDetailsDataTable cln = ((BookerCustDetailsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            internal void InitVars() {
                this.columnCustomerID = this.Columns["CustomerID"];
                this.columnCustomerName = this.Columns["CustomerName"];
                this.columnBillingAddress1 = this.Columns["BillingAddress1"];
                this.columnBillingAddress2 = this.Columns["BillingAddress2"];
                this.columnBillingAddressCity = this.Columns["BillingAddressCity"];
                this.columnBillingAddressState = this.Columns["BillingAddressState"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new DataColumn("CustomerID", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCustomerID);
                this.columnCustomerName = new DataColumn("CustomerName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCustomerName);
                this.columnBillingAddress1 = new DataColumn("BillingAddress1", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBillingAddress1);
                this.columnBillingAddress2 = new DataColumn("BillingAddress2", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBillingAddress2);
                this.columnBillingAddressCity = new DataColumn("BillingAddressCity", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBillingAddressCity);
                this.columnBillingAddressState = new DataColumn("BillingAddressState", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBillingAddressState);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnCustomerName.AllowDBNull = false;
                this.columnBillingAddress1.AllowDBNull = false;
                this.columnBillingAddress2.AllowDBNull = false;
                this.columnBillingAddressCity.AllowDBNull = false;
                this.columnBillingAddressState.AllowDBNull = false;
            }
            
            public BookerCustDetailsRow NewBookerCustDetailsRow() {
                return ((BookerCustDetailsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new BookerCustDetailsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(BookerCustDetailsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.BookerCustDetailsRowChanged != null)) {
                    this.BookerCustDetailsRowChanged(this, new BookerCustDetailsRowChangeEvent(((BookerCustDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.BookerCustDetailsRowChanging != null)) {
                    this.BookerCustDetailsRowChanging(this, new BookerCustDetailsRowChangeEvent(((BookerCustDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.BookerCustDetailsRowDeleted != null)) {
                    this.BookerCustDetailsRowDeleted(this, new BookerCustDetailsRowChangeEvent(((BookerCustDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.BookerCustDetailsRowDeleting != null)) {
                    this.BookerCustDetailsRowDeleting(this, new BookerCustDetailsRowChangeEvent(((BookerCustDetailsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveBookerCustDetailsRow(BookerCustDetailsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BookerCustDetailsRow : DataRow {
            
            private BookerCustDetailsDataTable tableBookerCustDetails;
            
            internal BookerCustDetailsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableBookerCustDetails = ((BookerCustDetailsDataTable)(this.Table));
            }
            
            public string CustomerID {
                get {
                    return ((string)(this[this.tableBookerCustDetails.CustomerIDColumn]));
                }
                set {
                    this[this.tableBookerCustDetails.CustomerIDColumn] = value;
                }
            }
            
            public string CustomerName {
                get {
                    return ((string)(this[this.tableBookerCustDetails.CustomerNameColumn]));
                }
                set {
                    this[this.tableBookerCustDetails.CustomerNameColumn] = value;
                }
            }
            
            public string BillingAddress1 {
                get {
                    return ((string)(this[this.tableBookerCustDetails.BillingAddress1Column]));
                }
                set {
                    this[this.tableBookerCustDetails.BillingAddress1Column] = value;
                }
            }
            
            public string BillingAddress2 {
                get {
                    return ((string)(this[this.tableBookerCustDetails.BillingAddress2Column]));
                }
                set {
                    this[this.tableBookerCustDetails.BillingAddress2Column] = value;
                }
            }
            
            public string BillingAddressCity {
                get {
                    return ((string)(this[this.tableBookerCustDetails.BillingAddressCityColumn]));
                }
                set {
                    this[this.tableBookerCustDetails.BillingAddressCityColumn] = value;
                }
            }
            
            public string BillingAddressState {
                get {
                    return ((string)(this[this.tableBookerCustDetails.BillingAddressStateColumn]));
                }
                set {
                    this[this.tableBookerCustDetails.BillingAddressStateColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class BookerCustDetailsRowChangeEvent : EventArgs {
            
            private BookerCustDetailsRow eventRow;
            
            private DataRowAction eventAction;
            
            public BookerCustDetailsRowChangeEvent(BookerCustDetailsRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public BookerCustDetailsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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