📄 warehouse.designer.cs
字号:
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3521
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
[System.Data.Linq.Mapping.DatabaseAttribute(Name="Database")]
public partial class WarehouseDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertProduct(Product instance);
partial void UpdateProduct(Product instance);
partial void DeleteProduct(Product instance);
#endregion
public WarehouseDataContext() :
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString, mappingSource)
{
OnCreated();
}
public WarehouseDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public WarehouseDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public WarehouseDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public WarehouseDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table<Product> Products
{
get
{
return this.GetTable<Product>();
}
}
}
[Table(Name="dbo.Product")]
public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _ProductCode;
private string _ProductName;
private string _UnitCode;
private string _CountryCode;
private string _CurrCode;
private System.Nullable<decimal> _Qty;
private System.Nullable<decimal> _Price;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnProductCodeChanging(string value);
partial void OnProductCodeChanged();
partial void OnProductNameChanging(string value);
partial void OnProductNameChanged();
partial void OnUnitCodeChanging(string value);
partial void OnUnitCodeChanged();
partial void OnCountryCodeChanging(string value);
partial void OnCountryCodeChanged();
partial void OnCurrCodeChanging(string value);
partial void OnCurrCodeChanged();
partial void OnQtyChanging(System.Nullable<decimal> value);
partial void OnQtyChanged();
partial void OnPriceChanging(System.Nullable<decimal> value);
partial void OnPriceChanged();
#endregion
public Product()
{
OnCreated();
}
[Column(Storage="_ProductCode", DbType="VarChar(10) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string ProductCode
{
get
{
return this._ProductCode;
}
set
{
if ((this._ProductCode != value))
{
this.OnProductCodeChanging(value);
this.SendPropertyChanging();
this._ProductCode = value;
this.SendPropertyChanged("ProductCode");
this.OnProductCodeChanged();
}
}
}
[Column(Storage="_ProductName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string ProductName
{
get
{
return this._ProductName;
}
set
{
if ((this._ProductName != value))
{
this.OnProductNameChanging(value);
this.SendPropertyChanging();
this._ProductName = value;
this.SendPropertyChanged("ProductName");
this.OnProductNameChanged();
}
}
}
[Column(Storage="_UnitCode", DbType="VarChar(3)")]
public string UnitCode
{
get
{
return this._UnitCode;
}
set
{
if ((this._UnitCode != value))
{
this.OnUnitCodeChanging(value);
this.SendPropertyChanging();
this._UnitCode = value;
this.SendPropertyChanged("UnitCode");
this.OnUnitCodeChanged();
}
}
}
[Column(Storage="_CountryCode", DbType="VarChar(3)")]
public string CountryCode
{
get
{
return this._CountryCode;
}
set
{
if ((this._CountryCode != value))
{
this.OnCountryCodeChanging(value);
this.SendPropertyChanging();
this._CountryCode = value;
this.SendPropertyChanged("CountryCode");
this.OnCountryCodeChanged();
}
}
}
[Column(Storage="_CurrCode", DbType="VarChar(3)")]
public string CurrCode
{
get
{
return this._CurrCode;
}
set
{
if ((this._CurrCode != value))
{
this.OnCurrCodeChanging(value);
this.SendPropertyChanging();
this._CurrCode = value;
this.SendPropertyChanged("CurrCode");
this.OnCurrCodeChanged();
}
}
}
[Column(Storage="_Qty", DbType="Decimal(18,0)")]
public System.Nullable<decimal> Qty
{
get
{
return this._Qty;
}
set
{
if ((this._Qty != value))
{
this.OnQtyChanging(value);
this.SendPropertyChanging();
this._Qty = value;
this.SendPropertyChanged("Qty");
this.OnQtyChanged();
}
}
}
[Column(Storage="_Price", DbType="Decimal(18,2)")]
public System.Nullable<decimal> Price
{
get
{
return this._Price;
}
set
{
if ((this._Price != value))
{
this.OnPriceChanging(value);
this.SendPropertyChanging();
this._Price = value;
this.SendPropertyChanged("Price");
this.OnPriceChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
#pragma warning restore 1591
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -