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

📄 dssuppliers.cs

📁 进销存
💻 CS
📖 第 1 页 / 共 4 页
字号:
                this.Columns.Add(this.columnPhone);
                this.columnFax = new DataColumn("Fax", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnFax);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnSupplierID}, true));
                this.columnSupplierID.AutoIncrement = true;
                this.columnSupplierID.AllowDBNull = false;
                this.columnSupplierID.ReadOnly = true;
                this.columnSupplierID.Unique = true;
            }
            
            public SuppliersRow NewSuppliersRow() {
                return ((SuppliersRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new SuppliersRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SuppliersRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SuppliersRowChanged != null)) {
                    this.SuppliersRowChanged(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SuppliersRowChanging != null)) {
                    this.SuppliersRowChanging(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SuppliersRowDeleted != null)) {
                    this.SuppliersRowDeleted(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SuppliersRowDeleting != null)) {
                    this.SuppliersRowDeleting(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSuppliersRow(SuppliersRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SuppliersRow : DataRow {
            
            private SuppliersDataTable tableSuppliers;
            
            internal SuppliersRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSuppliers = ((SuppliersDataTable)(this.Table));
            }
            
            public int SupplierID {
                get {
                    return ((int)(this[this.tableSuppliers.SupplierIDColumn]));
                }
                set {
                    this[this.tableSuppliers.SupplierIDColumn] = value;
                }
            }
            
            public string CompanyName {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.CompanyNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.CompanyNameColumn] = value;
                }
            }
            
            public string ContactName {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.ContactNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.ContactNameColumn] = value;
                }
            }
            
            public string ContactTitle {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.ContactTitleColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.ContactTitleColumn] = value;
                }
            }
            
            public string Address {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.AddressColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.AddressColumn] = value;
                }
            }
            
            public string City {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.CityColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.CityColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.PostalCodeColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.PostalCodeColumn] = value;
                }
            }
            
            public string Country {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.CountryColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.CountryColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.PhoneColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.PhoneColumn] = value;
                }
            }
            
            public string Fax {
                get {
                    try {
                        return ((string)(this[this.tableSuppliers.FaxColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableSuppliers.FaxColumn] = value;
                }
            }
            
            public bool IsCompanyNameNull() {
                return this.IsNull(this.tableSuppliers.CompanyNameColumn);
            }
            
            public void SetCompanyNameNull() {
                this[this.tableSuppliers.CompanyNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsContactNameNull() {
                return this.IsNull(this.tableSuppliers.ContactNameColumn);
            }
            
            public void SetContactNameNull() {
                this[this.tableSuppliers.ContactNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsContactTitleNull() {
                return this.IsNull(this.tableSuppliers.ContactTitleColumn);
            }
            
            public void SetContactTitleNull() {
                this[this.tableSuppliers.ContactTitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressNull() {
                return this.IsNull(this.tableSuppliers.AddressColumn);
            }
            
            public void SetAddressNull() {
                this[this.tableSuppliers.AddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsCityNull() {
                return this.IsNull(this.tableSuppliers.CityColumn);
            }
            
            public void SetCityNull() {
                this[this.tableSuppliers.CityColumn] = System.Convert.DBNull;
            }
            
            public bool IsPostalCodeNull() {
                return this.IsNull(this.tableSuppliers.PostalCodeColumn);
            }
            
            public void SetPostalCodeNull() {
                this[this.tableSuppliers.PostalCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsCountryNull() {
                return this.IsNull(this.tableSuppliers.CountryColumn);
            }
            
            public void SetCountryNull() {
                this[this.tableSuppliers.CountryColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tableSuppliers.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tableSuppliers.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsFaxNull() {
                return this.IsNull(this.tableSuppliers.FaxColumn);
            }
            
            public void SetFaxNull() {
                this[this.tableSuppliers.FaxColumn] = System.Convert.DBNull;
            }
            
            public ProductsRow[] GetProductsRows() {
                return ((ProductsRow[])(this.GetChildRows(this.Table.ChildRelations["SuppliersProducts"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SuppliersRowChangeEvent : EventArgs {
            
            private SuppliersRow eventRow;
            
            private DataRowAction eventAction;
            
            public SuppliersRowChangeEvent(SuppliersRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SuppliersRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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