📄 entityinventory.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace AWC.Reporter.Web.Entities {
using System;
using System.Data;
using System.Xml;
using System.Runtime.Serialization;
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Diagnostics.DebuggerStepThrough()]
[System.ComponentModel.ToolboxItem(true)]
public class EntityInventory : DataSet {
private ProductInventoryDataTable tableProductInventory;
private InventoryLevelDataTable tableInventoryLevel;
private ProductsDataTable tableProducts;
private ProductDataTable tableProduct;
private DataRelation relationProducts_Product;
private DataRelation relationInventoryLevel_Products;
private DataRelation relationProductInventory_InventoryLevel;
public EntityInventory() {
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
protected EntityInventory(SerializationInfo info, StreamingContext context) {
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
if ((strSchema != null)) {
DataSet ds = new DataSet();
ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
if ((ds.Tables["ProductInventory"] != null)) {
this.Tables.Add(new ProductInventoryDataTable(ds.Tables["ProductInventory"]));
}
if ((ds.Tables["InventoryLevel"] != null)) {
this.Tables.Add(new InventoryLevelDataTable(ds.Tables["InventoryLevel"]));
}
if ((ds.Tables["Products"] != null)) {
this.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
}
if ((ds.Tables["Product"] != null)) {
this.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
}
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.InitClass();
}
this.GetSerializationData(info, context);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public ProductInventoryDataTable ProductInventory {
get {
return this.tableProductInventory;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public InventoryLevelDataTable InventoryLevel {
get {
return this.tableInventoryLevel;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public ProductsDataTable Products {
get {
return this.tableProducts;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public ProductDataTable Product {
get {
return this.tableProduct;
}
}
public override DataSet Clone() {
EntityInventory cln = ((EntityInventory)(base.Clone()));
cln.InitVars();
return cln;
}
protected override bool ShouldSerializeTables() {
return false;
}
protected override bool ShouldSerializeRelations() {
return false;
}
protected override void ReadXmlSerializable(XmlReader reader) {
this.Reset();
DataSet ds = new DataSet();
ds.ReadXml(reader);
if ((ds.Tables["ProductInventory"] != null)) {
this.Tables.Add(new ProductInventoryDataTable(ds.Tables["ProductInventory"]));
}
if ((ds.Tables["InventoryLevel"] != null)) {
this.Tables.Add(new InventoryLevelDataTable(ds.Tables["InventoryLevel"]));
}
if ((ds.Tables["Products"] != null)) {
this.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
}
if ((ds.Tables["Product"] != null)) {
this.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
}
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();
}
protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
System.IO.MemoryStream stream = new System.IO.MemoryStream();
this.WriteXmlSchema(new XmlTextWriter(stream, null));
stream.Position = 0;
return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
}
internal void InitVars() {
this.tableProductInventory = ((ProductInventoryDataTable)(this.Tables["ProductInventory"]));
if ((this.tableProductInventory != null)) {
this.tableProductInventory.InitVars();
}
this.tableInventoryLevel = ((InventoryLevelDataTable)(this.Tables["InventoryLevel"]));
if ((this.tableInventoryLevel != null)) {
this.tableInventoryLevel.InitVars();
}
this.tableProducts = ((ProductsDataTable)(this.Tables["Products"]));
if ((this.tableProducts != null)) {
this.tableProducts.InitVars();
}
this.tableProduct = ((ProductDataTable)(this.Tables["Product"]));
if ((this.tableProduct != null)) {
this.tableProduct.InitVars();
}
this.relationProducts_Product = this.Relations["Products_Product"];
this.relationInventoryLevel_Products = this.Relations["InventoryLevel_Products"];
this.relationProductInventory_InventoryLevel = this.Relations["ProductInventory_InventoryLevel"];
}
private void InitClass() {
this.DataSetName = "EntityInventory";
this.Prefix = "";
this.Namespace = "www.adventure-works.com";
this.Locale = new System.Globalization.CultureInfo("en-US");
this.CaseSensitive = false;
this.EnforceConstraints = false;
this.tableProductInventory = new ProductInventoryDataTable();
this.Tables.Add(this.tableProductInventory);
this.tableInventoryLevel = new InventoryLevelDataTable();
this.Tables.Add(this.tableInventoryLevel);
this.tableProducts = new ProductsDataTable();
this.Tables.Add(this.tableProducts);
this.tableProduct = new ProductDataTable();
this.Tables.Add(this.tableProduct);
ForeignKeyConstraint fkc;
fkc = new ForeignKeyConstraint("ProductInventory_InventoryLevel", new DataColumn[] {
this.tableProductInventory.ProductInventory_IdColumn}, new DataColumn[] {
this.tableInventoryLevel.ProductInventory_IdColumn});
this.tableInventoryLevel.Constraints.Add(fkc);
fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
fkc.DeleteRule = System.Data.Rule.Cascade;
fkc.UpdateRule = System.Data.Rule.Cascade;
fkc = new ForeignKeyConstraint("InventoryLevel_Products", new DataColumn[] {
this.tableInventoryLevel.InventoryLevel_IdColumn}, new DataColumn[] {
this.tableProducts.InventoryLevel_IdColumn});
this.tableProducts.Constraints.Add(fkc);
fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
fkc.DeleteRule = System.Data.Rule.Cascade;
fkc.UpdateRule = System.Data.Rule.Cascade;
fkc = new ForeignKeyConstraint("Products_Product", new DataColumn[] {
this.tableProducts.Products_IdColumn}, new DataColumn[] {
this.tableProduct.Products_IdColumn});
this.tableProduct.Constraints.Add(fkc);
fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
fkc.DeleteRule = System.Data.Rule.Cascade;
fkc.UpdateRule = System.Data.Rule.Cascade;
this.relationProducts_Product = new DataRelation("Products_Product", new DataColumn[] {
this.tableProducts.Products_IdColumn}, new DataColumn[] {
this.tableProduct.Products_IdColumn}, false);
this.relationProducts_Product.Nested = true;
this.Relations.Add(this.relationProducts_Product);
this.relationInventoryLevel_Products = new DataRelation("InventoryLevel_Products", new DataColumn[] {
this.tableInventoryLevel.InventoryLevel_IdColumn}, new DataColumn[] {
this.tableProducts.InventoryLevel_IdColumn}, false);
this.relationInventoryLevel_Products.Nested = true;
this.Relations.Add(this.relationInventoryLevel_Products);
this.relationProductInventory_InventoryLevel = new DataRelation("ProductInventory_InventoryLevel", new DataColumn[] {
this.tableProductInventory.ProductInventory_IdColumn}, new DataColumn[] {
this.tableInventoryLevel.ProductInventory_IdColumn}, false);
this.relationProductInventory_InventoryLevel.Nested = true;
this.Relations.Add(this.relationProductInventory_InventoryLevel);
}
private bool ShouldSerializeProductInventory() {
return false;
}
private bool ShouldSerializeInventoryLevel() {
return false;
}
private bool ShouldSerializeProducts() {
return false;
}
private bool ShouldSerializeProduct() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public delegate void ProductInventoryRowChangeEventHandler(object sender, ProductInventoryRowChangeEvent e);
public delegate void InventoryLevelRowChangeEventHandler(object sender, InventoryLevelRowChangeEvent e);
public delegate void ProductsRowChangeEventHandler(object sender, ProductsRowChangeEvent e);
public delegate void ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e);
[System.Diagnostics.DebuggerStepThrough()]
public class ProductInventoryDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnName;
private DataColumn columnProductInventory_Id;
internal ProductInventoryDataTable() :
base("ProductInventory") {
this.InitClass();
}
internal ProductInventoryDataTable(DataTable table) :
base(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;
this.DisplayExpression = table.DisplayExpression;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -