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

📄 systemdata.designer.cs

📁 這是一個由CSharp寫成的小型ERP系統
💻 CS
📖 第 1 页 / 共 2 页
字号:
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1433
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace DAO
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[System.Data.Linq.Mapping.DatabaseAttribute(Name="DataSourceDB")]
	public partial class SystemDataDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InsertProductInfo(ProductInfo instance);
    partial void UpdateProductInfo(ProductInfo instance);
    partial void DeleteProductInfo(ProductInfo instance);
    partial void InsertProductTypeInfo(ProductTypeInfo instance);
    partial void UpdateProductTypeInfo(ProductTypeInfo instance);
    partial void DeleteProductTypeInfo(ProductTypeInfo instance);
    #endregion
		
		public SystemDataDataContext() : 
				base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DataSourceDBConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public SystemDataDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public SystemDataDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public SystemDataDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public SystemDataDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<ProductInfo> ProductInfos
		{
			get
			{
				return this.GetTable<ProductInfo>();
			}
		}
		
		public System.Data.Linq.Table<ProductTypeInfo> ProductTypeInfos
		{
			get
			{
				return this.GetTable<ProductTypeInfo>();
			}
		}
		
		public System.Data.Linq.Table<ProductViewInfo> ProductViewInfos
		{
			get
			{
				return this.GetTable<ProductViewInfo>();
			}
		}
	}
	
	[Table(Name="dbo.tbl_Products")]
	public partial class ProductInfo : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _ProductID;
		
		private int _ProductTypeID;
		
		private string _ProductCode;
		
		private string _ProductName;
		
		private decimal _ProductPrice;
		
		private string _ProductColor;
		
		private string _ProductModule;
		
		private EntityRef<ProductTypeInfo> _ProductTypeInfo;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnProductIDChanging(int value);
    partial void OnProductIDChanged();
    partial void OnProductTypeIDChanging(int value);
    partial void OnProductTypeIDChanged();
    partial void OnProductCodeChanging(string value);
    partial void OnProductCodeChanged();
    partial void OnProductNameChanging(string value);
    partial void OnProductNameChanged();
    partial void OnProductPriceChanging(decimal value);
    partial void OnProductPriceChanged();
    partial void OnProductColorChanging(string value);
    partial void OnProductColorChanged();
    partial void OnProductModuleChanging(string value);
    partial void OnProductModuleChanged();
    #endregion
		
		public ProductInfo()
		{
			this._ProductTypeInfo = default(EntityRef<ProductTypeInfo>);
			OnCreated();
		}
		
		[Column(Storage="_ProductID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=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="_ProductTypeID", DbType="Int NOT NULL")]
		public int ProductTypeID
		{
			get
			{
				return this._ProductTypeID;
			}
			set
			{
				if ((this._ProductTypeID != value))
				{
					if (this._ProductTypeInfo.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnProductTypeIDChanging(value);
					this.SendPropertyChanging();
					this._ProductTypeID = value;
					this.SendPropertyChanged("ProductTypeID");
					this.OnProductTypeIDChanged();
				}
			}
		}
		
		[Column(Storage="_ProductCode", DbType="NVarChar(31) NOT NULL", CanBeNull=false)]
		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="NChar(255) 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="_ProductPrice", DbType="Decimal(18,2) NOT NULL")]
		public decimal ProductPrice
		{
			get
			{
				return this._ProductPrice;
			}
			set
			{
				if ((this._ProductPrice != value))
				{
					this.OnProductPriceChanging(value);
					this.SendPropertyChanging();
					this._ProductPrice = value;
					this.SendPropertyChanged("ProductPrice");
					this.OnProductPriceChanged();
				}
			}
		}
		
		[Column(Storage="_ProductColor", DbType="NChar(7) NOT NULL", CanBeNull=false)]
		public string ProductColor
		{
			get
			{
				return this._ProductColor;
			}
			set
			{
				if ((this._ProductColor != value))
				{
					this.OnProductColorChanging(value);
					this.SendPropertyChanging();
					this._ProductColor = value;
					this.SendPropertyChanged("ProductColor");
					this.OnProductColorChanged();
				}
			}
		}
		
		[Column(Storage="_ProductModule", DbType="NChar(31) NOT NULL", CanBeNull=false)]
		public string ProductModule
		{
			get
			{
				return this._ProductModule;
			}
			set
			{
				if ((this._ProductModule != value))
				{
					this.OnProductModuleChanging(value);
					this.SendPropertyChanging();
					this._ProductModule = value;
					this.SendPropertyChanged("ProductModule");
					this.OnProductModuleChanged();
				}
			}
		}
		
		[Association(Name="ProductTypeInfo_ProductInfo", Storage="_ProductTypeInfo", ThisKey="ProductTypeID", IsForeignKey=true)]
		public ProductTypeInfo ProductTypeInfo
		{
			get
			{
				return this._ProductTypeInfo.Entity;
			}
			set
			{
				ProductTypeInfo previousValue = this._ProductTypeInfo.Entity;
				if (((previousValue != value) 
							|| (this._ProductTypeInfo.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._ProductTypeInfo.Entity = null;
						previousValue.ProductInfos.Remove(this);
					}
					this._ProductTypeInfo.Entity = value;
					if ((value != null))
					{
						value.ProductInfos.Add(this);
						this._ProductTypeID = value.ProductTypeID;
					}
					else
					{
						this._ProductTypeID = default(int);
					}
					this.SendPropertyChanged("ProductTypeInfo");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{

⌨️ 快捷键说明

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