📄 order.designer.cs
字号:
{
get
{
return this._ShipAddress;
}
set
{
if ((this._ShipAddress != value))
{
this.OnShipAddressChanging(value);
this.SendPropertyChanging();
this._ShipAddress = value;
this.SendPropertyChanged("ShipAddress");
this.OnShipAddressChanged();
}
}
}
[Column(Storage="_ShipCity", DbType="NVarChar(15)")]
public string ShipCity
{
get
{
return this._ShipCity;
}
set
{
if ((this._ShipCity != value))
{
this.OnShipCityChanging(value);
this.SendPropertyChanging();
this._ShipCity = value;
this.SendPropertyChanged("ShipCity");
this.OnShipCityChanged();
}
}
}
[Column(Storage="_ShipRegion", DbType="NVarChar(15)")]
public string ShipRegion
{
get
{
return this._ShipRegion;
}
set
{
if ((this._ShipRegion != value))
{
this.OnShipRegionChanging(value);
this.SendPropertyChanging();
this._ShipRegion = value;
this.SendPropertyChanged("ShipRegion");
this.OnShipRegionChanged();
}
}
}
[Column(Storage="_ShipPostalCode", DbType="NVarChar(10)")]
public string ShipPostalCode
{
get
{
return this._ShipPostalCode;
}
set
{
if ((this._ShipPostalCode != value))
{
this.OnShipPostalCodeChanging(value);
this.SendPropertyChanging();
this._ShipPostalCode = value;
this.SendPropertyChanged("ShipPostalCode");
this.OnShipPostalCodeChanged();
}
}
}
[Column(Storage="_ShipCountry", DbType="NVarChar(15)")]
public string ShipCountry
{
get
{
return this._ShipCountry;
}
set
{
if ((this._ShipCountry != value))
{
this.OnShipCountryChanging(value);
this.SendPropertyChanging();
this._ShipCountry = value;
this.SendPropertyChanged("ShipCountry");
this.OnShipCountryChanged();
}
}
}
[Association(Name="Order_Order_Detail", Storage="_Order_Details", OtherKey="OrderID")]
public EntitySet<Order_Detail> Order_Details
{
get
{
return this._Order_Details;
}
set
{
this._Order_Details.Assign(value);
}
}
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));
}
}
private void attach_Order_Details(Order_Detail entity)
{
this.SendPropertyChanging();
entity.Order = this;
}
private void detach_Order_Details(Order_Detail entity)
{
this.SendPropertyChanging();
entity.Order = null;
}
}
[Table(Name="dbo.[Order Details]")]
public partial class Order_Detail : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _OrderID;
private int _ProductID;
private decimal _UnitPrice;
private short _Quantity;
private float _Discount;
private EntityRef<Order> _Order;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnOrderIDChanging(int value);
partial void OnOrderIDChanged();
partial void OnProductIDChanging(int value);
partial void OnProductIDChanged();
partial void OnUnitPriceChanging(decimal value);
partial void OnUnitPriceChanged();
partial void OnQuantityChanging(short value);
partial void OnQuantityChanged();
partial void OnDiscountChanging(float value);
partial void OnDiscountChanged();
#endregion
public Order_Detail()
{
this._Order = default(EntityRef<Order>);
OnCreated();
}
[Column(Storage="_OrderID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int OrderID
{
get
{
return this._OrderID;
}
set
{
if ((this._OrderID != value))
{
if (this._Order.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnOrderIDChanging(value);
this.SendPropertyChanging();
this._OrderID = value;
this.SendPropertyChanged("OrderID");
this.OnOrderIDChanged();
}
}
}
[Column(Storage="_ProductID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int ProductID
{
get
{
return this._ProductID;
}
set
{
if ((this._ProductID != value))
{
this.OnProductIDChanging(value);
this.SendPropertyChanging();
this._ProductID = value;
this.SendPropertyChanged("ProductID");
this.OnProductIDChanged();
}
}
}
[Column(Storage="_UnitPrice", DbType="Money NOT NULL")]
public decimal UnitPrice
{
get
{
return this._UnitPrice;
}
set
{
if ((this._UnitPrice != value))
{
this.OnUnitPriceChanging(value);
this.SendPropertyChanging();
this._UnitPrice = value;
this.SendPropertyChanged("UnitPrice");
this.OnUnitPriceChanged();
}
}
}
[Column(Storage="_Quantity", DbType="SmallInt NOT NULL")]
public short Quantity
{
get
{
return this._Quantity;
}
set
{
if ((this._Quantity != value))
{
this.OnQuantityChanging(value);
this.SendPropertyChanging();
this._Quantity = value;
this.SendPropertyChanged("Quantity");
this.OnQuantityChanged();
}
}
}
[Column(Storage="_Discount", DbType="Real NOT NULL")]
public float Discount
{
get
{
return this._Discount;
}
set
{
if ((this._Discount != value))
{
this.OnDiscountChanging(value);
this.SendPropertyChanging();
this._Discount = value;
this.SendPropertyChanged("Discount");
this.OnDiscountChanged();
}
}
}
[Association(Name="Order_Order_Detail", Storage="_Order", ThisKey="OrderID", IsForeignKey=true)]
public Order Order
{
get
{
return this._Order.Entity;
}
set
{
Order previousValue = this._Order.Entity;
if (((previousValue != value)
|| (this._Order.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Order.Entity = null;
previousValue.Order_Details.Remove(this);
}
this._Order.Entity = value;
if ((value != null))
{
value.Order_Details.Add(this);
this._OrderID = value.OrderID;
}
else
{
this._OrderID = default(int);
}
this.SendPropertyChanged("Order");
}
}
}
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 + -