📄 northwinddataset.designer.cs
字号:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DisplayProducts {
using System;
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
[System.Xml.Serialization.XmlRootAttribute("NorthwindDataSet")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2240:ImplementISerializableCorrectly")]
public partial class NorthwindDataSet : System.Data.DataSet {
private ProductsDataTable tableProducts;
private SuppliersDataTable tableSuppliers;
private System.Data.DataRelation relationFK_Products_Suppliers;
private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public NorthwindDataSet() {
this.BeginInit();
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
base.Relations.CollectionChanged += schemaChangedHandler;
this.EndInit();
}
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
protected NorthwindDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
base(info, context) {
if ((this.IsBinarySerialized(info, context) == true)) {
this.InitVars(false);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler1;
this.Relations.CollectionChanged += schemaChangedHandler1;
return;
}
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) {
System.Data.DataSet ds = new System.Data.DataSet();
ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
if ((ds.Tables["Products"] != null)) {
base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
}
if ((ds.Tables["Suppliers"] != null)) {
base.Tables.Add(new SuppliersDataTable(ds.Tables["Suppliers"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
this.InitVars();
}
else {
this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
}
this.GetSerializationData(info, context);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public ProductsDataTable Products {
get {
return this.tableProducts;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public SuppliersDataTable Suppliers {
get {
return this.tableSuppliers;
}
}
public override System.Data.SchemaSerializationMode SchemaSerializationMode {
get {
return this._schemaSerializationMode;
}
set {
this._schemaSerializationMode = value;
}
}
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new System.Data.DataTableCollection Tables {
get {
return base.Tables;
}
}
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new System.Data.DataRelationCollection Relations {
get {
return base.Relations;
}
}
[System.ComponentModel.DefaultValueAttribute(true)]
public new bool EnforceConstraints {
get {
return base.EnforceConstraints;
}
set {
base.EnforceConstraints = value;
}
}
protected override void InitializeDerivedDataSet() {
this.BeginInit();
this.InitClass();
this.EndInit();
}
public override System.Data.DataSet Clone() {
NorthwindDataSet cln = ((NorthwindDataSet)(base.Clone()));
cln.InitVars();
return cln;
}
protected override bool ShouldSerializeTables() {
return false;
}
protected override bool ShouldSerializeRelations() {
return false;
}
protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
this.Reset();
System.Data.DataSet ds = new System.Data.DataSet();
ds.ReadXml(reader);
if ((ds.Tables["Products"] != null)) {
base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
}
if ((ds.Tables["Suppliers"] != null)) {
base.Tables.Add(new SuppliersDataTable(ds.Tables["Suppliers"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
this.InitVars();
}
else {
this.ReadXml(reader);
this.InitVars();
}
}
protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
System.IO.MemoryStream stream = new System.IO.MemoryStream();
this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
stream.Position = 0;
return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
}
internal void InitVars() {
this.InitVars(true);
}
internal void InitVars(bool initTable) {
this.tableProducts = ((ProductsDataTable)(base.Tables["Products"]));
if ((initTable == true)) {
if ((this.tableProducts != null)) {
this.tableProducts.InitVars();
}
}
this.tableSuppliers = ((SuppliersDataTable)(base.Tables["Suppliers"]));
if ((initTable == true)) {
if ((this.tableSuppliers != null)) {
this.tableSuppliers.InitVars();
}
}
this.relationFK_Products_Suppliers = this.Relations["FK_Products_Suppliers"];
}
private void InitClass() {
this.DataSetName = "NorthwindDataSet";
this.Prefix = "";
this.Namespace = "http://tempuri.org/NorthwindDataSet.xsd";
this.EnforceConstraints = true;
this.tableProducts = new ProductsDataTable();
base.Tables.Add(this.tableProducts);
this.tableSuppliers = new SuppliersDataTable();
base.Tables.Add(this.tableSuppliers);
this.relationFK_Products_Suppliers = new System.Data.DataRelation("FK_Products_Suppliers", new System.Data.DataColumn[] {
this.tableSuppliers.SupplierIDColumn}, new System.Data.DataColumn[] {
this.tableProducts.SupplierIDColumn}, false);
this.Relations.Add(this.relationFK_Products_Suppliers);
}
private bool ShouldSerializeProducts() {
return false;
}
private bool ShouldSerializeSuppliers() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
NorthwindDataSet ds = new NorthwindDataSet();
System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
xs.Add(ds.GetSchemaSerializable());
System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
any.Namespace = ds.Namespace;
sequence.Items.Add(any);
type.Particle = sequence;
return type;
}
public delegate void ProductsRowChangeEventHandler(object sender, ProductsRowChangeEvent e);
public delegate void SuppliersRowChangeEventHandler(object sender, SuppliersRowChangeEvent e);
[System.Serializable()]
[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class ProductsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
private System.Data.DataColumn columnProductID;
private System.Data.DataColumn columnProductName;
private System.Data.DataColumn columnSupplierID;
private System.Data.DataColumn columnCategoryID;
private System.Data.DataColumn columnQuantityPerUnit;
private System.Data.DataColumn columnUnitPrice;
private System.Data.DataColumn columnUnitsInStock;
private System.Data.DataColumn columnUnitsOnOrder;
private System.Data.DataColumn columnReorderLevel;
private System.Data.DataColumn columnDiscontinued;
public ProductsDataTable() {
this.TableName = "Products";
this.BeginInit();
this.InitClass();
this.EndInit();
}
internal ProductsDataTable(System.Data.DataTable table) {
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -