📄 northwinddataset.designer.cs
字号:
}
}
public string Country {
get {
try {
return ((string)(this[this.tableSuppliers.CountryColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'Country\' in table \'Suppliers\' is DBNull.", e);
}
}
set {
this[this.tableSuppliers.CountryColumn] = value;
}
}
public string Phone {
get {
try {
return ((string)(this[this.tableSuppliers.PhoneColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Suppliers\' is DBNull.", e);
}
}
set {
this[this.tableSuppliers.PhoneColumn] = value;
}
}
public string Fax {
get {
try {
return ((string)(this[this.tableSuppliers.FaxColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'Fax\' in table \'Suppliers\' is DBNull.", e);
}
}
set {
this[this.tableSuppliers.FaxColumn] = value;
}
}
public string HomePage {
get {
try {
return ((string)(this[this.tableSuppliers.HomePageColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'HomePage\' in table \'Suppliers\' is DBNull.", e);
}
}
set {
this[this.tableSuppliers.HomePageColumn] = value;
}
}
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 IsRegionNull() {
return this.IsNull(this.tableSuppliers.RegionColumn);
}
public void SetRegionNull() {
this[this.tableSuppliers.RegionColumn] = 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 bool IsHomePageNull() {
return this.IsNull(this.tableSuppliers.HomePageColumn);
}
public void SetHomePageNull() {
this[this.tableSuppliers.HomePageColumn] = System.Convert.DBNull;
}
public ProductsRow[] GetProductsRows() {
return ((ProductsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Products_Suppliers"])));
}
}
public class ProductsRowChangeEvent : System.EventArgs {
private ProductsRow eventRow;
private System.Data.DataRowAction eventAction;
public ProductsRowChangeEvent(ProductsRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public ProductsRow Row {
get {
return this.eventRow;
}
}
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
public class SuppliersRowChangeEvent : System.EventArgs {
private SuppliersRow eventRow;
private System.Data.DataRowAction eventAction;
public SuppliersRowChangeEvent(SuppliersRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public SuppliersRow Row {
get {
return this.eventRow;
}
}
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
namespace DisplayProducts.NorthwindDataSetTableAdapters {
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.ComponentModel.DataObjectAttribute(true)]
[System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class ProductsTableAdapter : System.ComponentModel.Component {
private System.Data.SqlClient.SqlDataAdapter m_adapter;
private System.Data.SqlClient.SqlConnection m_connection;
private System.Data.SqlClient.SqlCommand[] m_commandCollection;
private bool m_clearBeforeFill;
public ProductsTableAdapter() {
this.m_clearBeforeFill = true;
}
private System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this.m_adapter == null)) {
this.InitAdapter();
}
return this.m_adapter;
}
}
internal System.Data.SqlClient.SqlConnection Connection {
get {
if ((this.m_connection == null)) {
this.InitConnection();
}
return this.m_connection;
}
set {
this.m_connection = value;
if ((this.Adapter.InsertCommand != null)) {
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null)) {
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null)) {
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
if ((this.CommandCollection[i] != null)) {
((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}
protected System.Data.SqlClient.SqlCommand[] CommandCollection {
get {
if ((this.m_commandCollection == null)) {
this.InitCommandCollection();
}
return this.m_commandCollection;
}
}
public bool ClearBeforeFill {
get {
return this.m_clearBeforeFill;
}
set {
this.m_clearBeforeFill = value;
}
}
private void InitAdapter() {
this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "Products";
tableMapping.ColumnMappings.Add("ProductID", "ProductID");
tableMapping.ColumnMappings.Add("ProductName", "ProductName");
tableMapping.ColumnMappings.Add("SupplierID", "SupplierID");
tableMapping.ColumnMappings.Add("CategoryID", "CategoryID");
tableMapping.ColumnMappings.Add("QuantityPerUnit", "QuantityPerUnit");
tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice");
tableMapping.ColumnMappings.Add("UnitsInStock", "UnitsInStock");
tableMapping.ColumnMappings.Add("UnitsOnOrder", "UnitsOnOrder");
tableMapping.ColumnMappings.Add("ReorderLevel", "ReorderLevel");
tableMapping.ColumnMappings.Add("Discontinued", "Discontinued");
this.m_adapter.TableMappings.Add(tableMapping);
this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
this.m_adapter.DeleteCommand.Connection = this.Connection;
this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Products] WHERE (([ProductID] = @Original_ProductID) AND ([ProductName] = @Original_ProductName) AND ((@IsNull_SupplierID = 1 AND [SupplierID] IS NULL) OR ([SupplierID] = @Original_SupplierID)) AND ((@IsNull_CategoryID = 1 AND [CategoryID] IS NULL) OR ([CategoryID] = @Original_CategoryID)) AND ((@IsNull_QuantityPerUnit = 1 AND [QuantityPerUnit] IS NULL) OR ([QuantityPerUnit] = @Original_QuantityPerUnit)) AND ((@IsNull_UnitPrice = 1 AND [UnitPrice] IS NULL) OR ([UnitPrice] = @Original_UnitPrice)) AND ((@IsNull_UnitsInStock = 1 AND [UnitsInStock] IS NULL) OR ([UnitsInStock] = @Original_UnitsInStock)) AND ((@IsNull_UnitsOnOrder = 1 AND [UnitsOnOrder] IS NULL) OR ([UnitsOnOrder] = @Original_UnitsOnOrder)) AND ((@IsNull_ReorderLevel = 1 AND [ReorderLevel] IS NULL) OR ([ReorderLevel] = @Original_ReorderLevel)) AND ([Discontinued] = @Original_Discontinued))";
this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -