#pragma warning disable 1591 //------------------------------------------------------------------------------ // // 這段程式碼是由工具產生的。 // 執行階段版本:4.0.30319.18331 // // 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, // 變更將會遺失。 // //------------------------------------------------------------------------------ namespace Linq_to_SQL_EditDB { 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; [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="ch20DB")] public partial class ch20DBDataContext : System.Data.Linq.DataContext { private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); #region 擴充性方法定義 partial void OnCreated(); partial void Insert員工(員工 instance); partial void Update員工(員工 instance); partial void Delete員工(員工 instance); #endregion public ch20DBDataContext() : base(global::Linq_to_SQL_EditDB.Properties.Settings.Default.ch20DBConnectionString, mappingSource) { OnCreated(); } public ch20DBDataContext(string connection) : base(connection, mappingSource) { OnCreated(); } public ch20DBDataContext(System.Data.IDbConnection connection) : base(connection, mappingSource) { OnCreated(); } public ch20DBDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public ch20DBDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public System.Data.Linq.Table<員工> 員工 { get { return this.GetTable<員工>(); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.員工")] public partial class 員工 : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _編號; private string _姓名; private string _職稱; private string _電話; private System.Nullable _薪資; #region 擴充性方法定義 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void On編號Changing(int value); partial void On編號Changed(); partial void On姓名Changing(string value); partial void On姓名Changed(); partial void On職稱Changing(string value); partial void On職稱Changed(); partial void On電話Changing(string value); partial void On電話Changed(); partial void On薪資Changing(System.Nullable value); partial void On薪資Changed(); #endregion public 員工() { OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_編號", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int 編號 { get { return this._編號; } set { if ((this._編號 != value)) { this.On編號Changing(value); this.SendPropertyChanging(); this._編號 = value; this.SendPropertyChanged("編號"); this.On編號Changed(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_姓名", DbType="NVarChar(15)")] public string 姓名 { get { return this._姓名; } set { if ((this._姓名 != value)) { this.On姓名Changing(value); this.SendPropertyChanging(); this._姓名 = value; this.SendPropertyChanged("姓名"); this.On姓名Changed(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_職稱", DbType="NVarChar(15)")] public string 職稱 { get { return this._職稱; } set { if ((this._職稱 != value)) { this.On職稱Changing(value); this.SendPropertyChanging(); this._職稱 = value; this.SendPropertyChanged("職稱"); this.On職稱Changed(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_電話", DbType="NVarChar(15)")] public string 電話 { get { return this._電話; } set { if ((this._電話 != value)) { this.On電話Changing(value); this.SendPropertyChanging(); this._電話 = value; this.SendPropertyChanged("電話"); this.On電話Changed(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_薪資", DbType="Int")] public System.Nullable 薪資 { get { return this._薪資; } set { if ((this._薪資 != value)) { this.On薪資Changing(value); this.SendPropertyChanging(); this._薪資 = value; this.SendPropertyChanged("薪資"); this.On薪資Changed(); } } } 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