📄 entityinventory.cs
字号:
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn NameColumn {
get {
return this.columnName;
}
}
internal DataColumn ProductInventory_IdColumn {
get {
return this.columnProductInventory_Id;
}
}
public ProductInventoryRow this[int index] {
get {
return ((ProductInventoryRow)(this.Rows[index]));
}
}
public event ProductInventoryRowChangeEventHandler ProductInventoryRowChanged;
public event ProductInventoryRowChangeEventHandler ProductInventoryRowChanging;
public event ProductInventoryRowChangeEventHandler ProductInventoryRowDeleted;
public event ProductInventoryRowChangeEventHandler ProductInventoryRowDeleting;
public void AddProductInventoryRow(ProductInventoryRow row) {
this.Rows.Add(row);
}
public ProductInventoryRow AddProductInventoryRow(string Name) {
ProductInventoryRow rowProductInventoryRow = ((ProductInventoryRow)(this.NewRow()));
rowProductInventoryRow.ItemArray = new object[] {
Name,
null};
this.Rows.Add(rowProductInventoryRow);
return rowProductInventoryRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
ProductInventoryDataTable cln = ((ProductInventoryDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ProductInventoryDataTable();
}
internal void InitVars() {
this.columnName = this.Columns["Name"];
this.columnProductInventory_Id = this.Columns["ProductInventory_Id"];
}
private void InitClass() {
this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Attribute);
this.Columns.Add(this.columnName);
this.columnProductInventory_Id = new DataColumn("ProductInventory_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnProductInventory_Id);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnProductInventory_Id}, true));
this.columnName.Namespace = "";
this.columnProductInventory_Id.AutoIncrement = true;
this.columnProductInventory_Id.AllowDBNull = false;
this.columnProductInventory_Id.Unique = true;
}
public ProductInventoryRow NewProductInventoryRow() {
return ((ProductInventoryRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ProductInventoryRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ProductInventoryRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.ProductInventoryRowChanged != null)) {
this.ProductInventoryRowChanged(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.ProductInventoryRowChanging != null)) {
this.ProductInventoryRowChanging(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.ProductInventoryRowDeleted != null)) {
this.ProductInventoryRowDeleted(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.ProductInventoryRowDeleting != null)) {
this.ProductInventoryRowDeleting(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
}
}
public void RemoveProductInventoryRow(ProductInventoryRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ProductInventoryRow : DataRow {
private ProductInventoryDataTable tableProductInventory;
internal ProductInventoryRow(DataRowBuilder rb) :
base(rb) {
this.tableProductInventory = ((ProductInventoryDataTable)(this.Table));
}
public string Name {
get {
try {
return ((string)(this[this.tableProductInventory.NameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableProductInventory.NameColumn] = value;
}
}
public bool IsNameNull() {
return this.IsNull(this.tableProductInventory.NameColumn);
}
public void SetNameNull() {
this[this.tableProductInventory.NameColumn] = System.Convert.DBNull;
}
public InventoryLevelRow[] GetInventoryLevelRows() {
return ((InventoryLevelRow[])(this.GetChildRows(this.Table.ChildRelations["ProductInventory_InventoryLevel"])));
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ProductInventoryRowChangeEvent : EventArgs {
private ProductInventoryRow eventRow;
private DataRowAction eventAction;
public ProductInventoryRowChangeEvent(ProductInventoryRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public ProductInventoryRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class InventoryLevelDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnInventoryLevel_Id;
private DataColumn columnProductInventory_Id;
internal InventoryLevelDataTable() :
base("InventoryLevel") {
this.InitClass();
}
internal InventoryLevelDataTable(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;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn InventoryLevel_IdColumn {
get {
return this.columnInventoryLevel_Id;
}
}
internal DataColumn ProductInventory_IdColumn {
get {
return this.columnProductInventory_Id;
}
}
public InventoryLevelRow this[int index] {
get {
return ((InventoryLevelRow)(this.Rows[index]));
}
}
public event InventoryLevelRowChangeEventHandler InventoryLevelRowChanged;
public event InventoryLevelRowChangeEventHandler InventoryLevelRowChanging;
public event InventoryLevelRowChangeEventHandler InventoryLevelRowDeleted;
public event InventoryLevelRowChangeEventHandler InventoryLevelRowDeleting;
public void AddInventoryLevelRow(InventoryLevelRow row) {
this.Rows.Add(row);
}
public InventoryLevelRow AddInventoryLevelRow(ProductInventoryRow parentProductInventoryRowByProductInventory_InventoryLevel) {
InventoryLevelRow rowInventoryLevelRow = ((InventoryLevelRow)(this.NewRow()));
rowInventoryLevelRow.ItemArray = new object[] {
null,
parentProductInventoryRowByProductInventory_InventoryLevel[1]};
this.Rows.Add(rowInventoryLevelRow);
return rowInventoryLevelRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
InventoryLevelDataTable cln = ((InventoryLevelDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new InventoryLevelDataTable();
}
internal void InitVars() {
this.columnInventoryLevel_Id = this.Columns["InventoryLevel_Id"];
this.columnProductInventory_Id = this.Columns["ProductInventory_Id"];
}
private void InitClass() {
this.columnInventoryLevel_Id = new DataColumn("InventoryLevel_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnInventoryLevel_Id);
this.columnProductInventory_Id = new DataColumn("ProductInventory_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnProductInventory_Id);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnInventoryLevel_Id}, true));
this.columnInventoryLevel_Id.AutoIncrement = true;
this.columnInventoryLevel_Id.AllowDBNull = false;
this.columnInventoryLevel_Id.Unique = true;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -