⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 northwind.designer.cs

📁 数据库连接查询
💻 CS
📖 第 1 页 / 共 4 页
字号:
			if ((this._ProductName != value))
			{
				this.OnProductNameChanging(value);
				this.SendPropertyChanging();
				this._ProductName = value;
				this.SendPropertyChanged("ProductName");
				this.OnProductNameChanged();
			}
		}
	}
	
	[Column(Storage="_SupplierID", DbType="Int")]
	public System.Nullable<int> SupplierID
	{
		get
		{
			return this._SupplierID;
		}
		set
		{
			if ((this._SupplierID != value))
			{
				this.OnSupplierIDChanging(value);
				this.SendPropertyChanging();
				this._SupplierID = value;
				this.SendPropertyChanged("SupplierID");
				this.OnSupplierIDChanged();
			}
		}
	}
	
	[Column(Storage="_CategoryID", DbType="Int")]
	public System.Nullable<int> CategoryID
	{
		get
		{
			return this._CategoryID;
		}
		set
		{
			if ((this._CategoryID != value))
			{
				if (this._Category.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnCategoryIDChanging(value);
				this.SendPropertyChanging();
				this._CategoryID = value;
				this.SendPropertyChanged("CategoryID");
				this.OnCategoryIDChanged();
			}
		}
	}
	
	[Column(Storage="_QuantityPerUnit", DbType="NVarChar(20)")]
	public string QuantityPerUnit
	{
		get
		{
			return this._QuantityPerUnit;
		}
		set
		{
			if ((this._QuantityPerUnit != value))
			{
				this.OnQuantityPerUnitChanging(value);
				this.SendPropertyChanging();
				this._QuantityPerUnit = value;
				this.SendPropertyChanged("QuantityPerUnit");
				this.OnQuantityPerUnitChanged();
			}
		}
	}
	
	[Column(Storage="_UnitPrice", DbType="Money")]
	public System.Nullable<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="_UnitsInStock", DbType="SmallInt")]
	public System.Nullable<short> UnitsInStock
	{
		get
		{
			return this._UnitsInStock;
		}
		set
		{
			if ((this._UnitsInStock != value))
			{
				this.OnUnitsInStockChanging(value);
				this.SendPropertyChanging();
				this._UnitsInStock = value;
				this.SendPropertyChanged("UnitsInStock");
				this.OnUnitsInStockChanged();
			}
		}
	}
	
	[Column(Storage="_UnitsOnOrder", DbType="SmallInt")]
	public System.Nullable<short> UnitsOnOrder
	{
		get
		{
			return this._UnitsOnOrder;
		}
		set
		{
			if ((this._UnitsOnOrder != value))
			{
				this.OnUnitsOnOrderChanging(value);
				this.SendPropertyChanging();
				this._UnitsOnOrder = value;
				this.SendPropertyChanged("UnitsOnOrder");
				this.OnUnitsOnOrderChanged();
			}
		}
	}
	
	[Column(Storage="_ReorderLevel", DbType="SmallInt")]
	public System.Nullable<short> ReorderLevel
	{
		get
		{
			return this._ReorderLevel;
		}
		set
		{
			if ((this._ReorderLevel != value))
			{
				this.OnReorderLevelChanging(value);
				this.SendPropertyChanging();
				this._ReorderLevel = value;
				this.SendPropertyChanged("ReorderLevel");
				this.OnReorderLevelChanged();
			}
		}
	}
	
	[Column(Storage="_Discontinued", DbType="Bit NOT NULL")]
	public bool Discontinued
	{
		get
		{
			return this._Discontinued;
		}
		set
		{
			if ((this._Discontinued != value))
			{
				this.OnDiscontinuedChanging(value);
				this.SendPropertyChanging();
				this._Discontinued = value;
				this.SendPropertyChanged("Discontinued");
				this.OnDiscontinuedChanged();
			}
		}
	}
	
	[Association(Name="Product_Order_Detail", Storage="_Order_Details", OtherKey="ProductID")]
	public EntitySet<Order_Detail> Order_Details
	{
		get
		{
			return this._Order_Details;
		}
		set
		{
			this._Order_Details.Assign(value);
		}
	}
	
	[Association(Name="Category_Product", Storage="_Category", ThisKey="CategoryID", IsForeignKey=true)]
	public Category Category
	{
		get
		{
			return this._Category.Entity;
		}
		set
		{
			Category previousValue = this._Category.Entity;
			if (((previousValue != value) 
						|| (this._Category.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._Category.Entity = null;
					previousValue.Products.Remove(this);
				}
				this._Category.Entity = value;
				if ((value != null))
				{
					value.Products.Add(this);
					this._CategoryID = value.CategoryID;
				}
				else
				{
					this._CategoryID = default(Nullable<int>);
				}
				this.SendPropertyChanged("Category");
			}
		}
	}
	
	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.Product = this;
		this.SendPropertyChanged("Order_Details");
	}
	
	private void detach_Order_Details(Order_Detail entity)
	{
		this.SendPropertyChanging();
		entity.Product = null;
		this.SendPropertyChanged("Order_Details");
	}
}

[Table(Name="dbo.Categories")]
public partial class Category : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _CategoryID;
	
	private string _CategoryName;
	
	private string _Description;
	
	private byte[] _Picture;
	
	private EntitySet<Product> _Products;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate();
    partial void OnCreated();
    partial void OnCategoryIDChanging(int value);
    partial void OnCategoryIDChanged();
    partial void OnCategoryNameChanging(string value);
    partial void OnCategoryNameChanged();
    partial void OnDescriptionChanging(string value);
    partial void OnDescriptionChanged();
    partial void OnPictureChanging(byte[] value);
    partial void OnPictureChanged();
    #endregion
	
	public Category()
	{
		OnCreated();
		this._Products = new EntitySet<Product>(new Action<Product>(this.attach_Products), new Action<Product>(this.detach_Products));
	}
	
	[Column(Storage="_CategoryID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int CategoryID
	{
		get
		{
			return this._CategoryID;
		}
		set
		{
			if ((this._CategoryID != value))
			{
				this.OnCategoryIDChanging(value);
				this.SendPropertyChanging();
				this._CategoryID = value;
				this.SendPropertyChanged("CategoryID");
				this.OnCategoryIDChanged();
			}
		}
	}
	
	[Column(Storage="_CategoryName", DbType="NVarChar(15) NOT NULL", CanBeNull=false)]
	public string CategoryName
	{
		get
		{
			return this._CategoryName;
		}
		set
		{
			if ((this._CategoryName != value))
			{
				this.OnCategoryNameChanging(value);
				this.SendPropertyChanging();
				this._CategoryName = value;
				this.SendPropertyChanged("CategoryName");
				this.OnCategoryNameChanged();
			}
		}
	}
	
	[Column(Storage="_Description", DbType="NText", UpdateCheck=UpdateCheck.Never)]
	public string Description
	{
		get
		{
			return this._Description;
		}
		set
		{
			if ((this._Description != value))
			{
				this.OnDescriptionChanging(value);
				this.SendPropertyChanging();
				this._Description = value;
				this.SendPropertyChanged("Description");
				this.OnDescriptionChanged();
			}
		}
	}
	
	[Column(Storage="_Picture", DbType="Image", UpdateCheck=UpdateCheck.Never)]
	public byte[] Picture
	{
		get
		{
			return this._Picture;
		}
		set
		{
			if ((this._Picture != value))
			{
				this.OnPictureChanging(value);
				this.SendPropertyChanging();
				this._Picture = value;
				this.SendPropertyChanged("Picture");
				this.OnPictureChanged();
			}
		}
	}
	
	[Association(Name="Category_Product", Storage="_Products", OtherKey="CategoryID")]
	public EntitySet<Product> Products
	{
		get
		{
			return this._Products;
		}
		set
		{
			this._Products.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_Products(Product entity)
	{
		this.SendPropertyChanging();
		entity.Category = this;
		this.SendPropertyChanged("Products");
	}
	
	private void detach_Products(Product entity)
	{
		this.SendPropertyChanging();
		entity.Category = null;
		this.SendPropertyChanged("Products");
	}
}

public partial class sp_multiresultsetResult
{
	
	private string _CustomerID;
	
	private string _CompanyName;
	
	private string _ContactName;
	
	private string _ContactTitle;
	
	private string _Address;
	
	private string _City;
	
	private string _Region;
	
	private string _PostalCode;
	
	private string _Country;
	
	private string _Phone;
	
	private string _Fax;
	
	public sp_multiresultsetResult()
	{
	}
	
	[Column(Storage="_CustomerID", DbType="NChar(5) NOT NULL", CanBeNull=false)]
	public string CustomerID
	{
		get
		{
			return this._CustomerID;
		}
		set
		{
			if ((this._CustomerID != value))
			{
				this._CustomerID = value;
			}
		}
	}
	
	[Column(Storage="_CompanyName", DbType="NVarChar(40) NOT NULL", CanBeNull=false)]
	public string CompanyName
	{
		get
		{
			return this._CompanyName;
		}
		set
		{
			if ((this._CompanyName != value))
			{
				this._CompanyName = value;
			}
		}
	}
	
	[Column(Storage="_ContactName", DbType="NVarChar(30)")]
	public string ContactName
	{
		get
		{
			return this._ContactName;
		}
		set
		{
			if ((this._ContactName != value))
			{
				this._ContactName = value;
			}
		}
	}
	
	[Column(Storage="_ContactTitle", DbType="NVarChar(30)")]
	public string ContactTitle
	{
		get
		{
			return this._ContactTitle;
		}
		set
		{
			if ((this._ContactTitle != value))
			{
				this._ContactTitle = value;
			}
		}
	}
	
	[Column(Storage="_Address", DbType="NVarChar(60)")]
	public string Address
	{
		get
		{
			return this._Address;
		}
		set
		{
			if ((this._Address != value))
			{
				this._Address = value;
			}
		}
	}
	
	[Column(Storage="_City", DbType="NVarChar(15)")]
	public string City
	{
		get
		{
			return this._City;
		}
		set
		{
			if ((this._City != value))
			{
				this._City = value;
			}
		}
	}
	
	[Column(Storage="_Region", DbType="NVarChar(15)")]
	public string Region
	{
		get
		{
			return this._Region;
		}
		set
		{
			if ((this._Region != value))
			{
				this._Region = value;
			}
		}
	}
	
	[Column(Storage="_PostalCode", DbType="NVarChar(10)")]
	public string PostalCode
	{
		get
		{
			return this._PostalCode;
		}
		set
		{
			if ((this._PostalCode != value))
			{
				this._PostalCode = value;
			}
		}
	}
	
	[Column(Storage="_Country", DbType="NVarChar(15)")]
	public string Country
	{
		get
		{
			return this._Country;
		}
		set
		{
			if ((this._Country != value))
			{
				this._Country = value;
			}
		}
	}
	
	[Column(Storage="_Phone", DbType="NVarChar(24)")]
	public string Phone
	{
		get
		{
			return this._Phone;
		}
		set
		{
			if ((this._Phone != value))
			{
				this._Phone = value;
			}
		}
	}
	
	[Column(Storage="_Fax", DbType="NVarChar(24)")]
	public string Fax
	{
		get
		{
			return this._Fax;
		}
		set
		{
			if ((this._Fax != value))
			{
				this._Fax = value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -