From 9630b5c123e4623cb06fa118a0803d617f65b8e4 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Mon, 27 Jul 2026 10:08:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=AE=B0=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...LDB_V2026-06-20-xiaj(人员记分流水日志表).sql | 85 +++ SGGL/BLL/BLL.csproj | 2 + SGGL/BLL/Score/ScoreFlowLogService.cs | 131 ++++ SGGL/BLL/Score/ScoreUserService.cs | 84 +++ SGGL/Model/Model.cs | 698 ++++++++++++++++++ 5 files changed, 1000 insertions(+) create mode 100644 DataBase/版本日志/SGGLDB_V2026-06-20-xiaj(人员记分流水日志表).sql create mode 100644 SGGL/BLL/Score/ScoreFlowLogService.cs create mode 100644 SGGL/BLL/Score/ScoreUserService.cs diff --git a/DataBase/版本日志/SGGLDB_V2026-06-20-xiaj(人员记分流水日志表).sql b/DataBase/版本日志/SGGLDB_V2026-06-20-xiaj(人员记分流水日志表).sql new file mode 100644 index 00000000..cc23e959 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-06-20-xiaj(人员记分流水日志表).sql @@ -0,0 +1,85 @@ + + +--drop table ScoreFlowLog +--Ա÷ֱ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'ScoreUser') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[ScoreUser]( + [Id] [nvarchar](50) NOT NULL, + [Year] [int] NOT NULL, + [IdentityCard] [nvarchar](50) NOT NULL, + [Score] [int] NOT NULL, + [UserName] [nvarchar](50) NOT NULL, + [CompileDate] [datetime] NOT NULL, + CONSTRAINT [PK_ScoreUser] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +ALTER TABLE [dbo].[ScoreUser] ADD CONSTRAINT [DF_ScoreUser_CompileDate] DEFAULT (getdate()) FOR [CompileDate] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'Id' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'Year' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'IdentityCard' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'UserName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'Score' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser', @level2type=N'COLUMN',@level2name=N'CompileDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա÷ֱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreUser' +END + +GO + + +--ԱǷˮ־ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'ScoreFlowLog') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[ScoreFlowLog]( + [Id] [nvarchar](50) NOT NULL, + [Year] [int] NOT NULL, + [IdentityCard] [nvarchar](50) NOT NULL, + [UserName] [nvarchar](50) NOT NULL, + [Type] [int] NOT NULL, + [Score] [int] NOT NULL, + [CurrentScore] [int] NOT NULL, + [Item] [nvarchar](50) NOT NULL, + [LogContent] [nvarchar](200) NULL, + [UserId] [nvarchar](50) NULL, + [PersonId] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [ProjectId] [nvarchar](50) NULL, + [UnitName] [nvarchar](200) NULL, + [ProjectName] [nvarchar](200) NULL, + [Remark] [nvarchar](200) NULL, + [CompileDate] [datetime] NOT NULL, + [CompileMan] [nvarchar](50) NOT NULL, + [CompileManId] [nvarchar](50) NULL, + CONSTRAINT [PK_ScoreFlowLog] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +ALTER TABLE [dbo].[ScoreFlowLog] ADD CONSTRAINT [DF_ScoreFlowLog_CompileDate] DEFAULT (getdate()) FOR [CompileDate] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Id' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Year' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'IdentityCard' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'UserName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1ӷ֡0۷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Type' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Score' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷֺԱ÷ֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'CurrentScore' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Item' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'־¼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'LogContent' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ûId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'UserId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԱId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'PersonId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'UnitId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'ProjectId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'UnitName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'ProjectName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע˵' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'Remark' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'CompileDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'CompileMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog', @level2type=N'COLUMN',@level2name=N'CompileManId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԱǷˮ־' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ScoreFlowLog' +END + +GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 1c759f50..a0b948f2 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -857,6 +857,8 @@ + + True True diff --git a/SGGL/BLL/Score/ScoreFlowLogService.cs b/SGGL/BLL/Score/ScoreFlowLogService.cs new file mode 100644 index 00000000..93379082 --- /dev/null +++ b/SGGL/BLL/Score/ScoreFlowLogService.cs @@ -0,0 +1,131 @@ +using Model; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 人员记分流水日志表 + /// + public class ScoreFlowLogService + { + /// + /// 记分方式 + /// + public enum TypeInt : int + { + 加分 = 1, + 扣分 = 0 + } + + /// + /// + /// + public static Dictionary TypeMap = new Dictionary + { + { "加分" ,(int)TypeInt.加分}, + { "扣分" ,(int)TypeInt.扣分}, + }; + + /// + /// 根据Id获取人员记分流水 + /// + /// + /// + public static Model.ScoreFlowLog GetScoreFlowLogById(string Id) + { + return Funs.DB.ScoreFlowLog.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 根据证件号码获取人员今年上一条记分流水记录 + /// + /// + /// + /// + public static Model.ScoreFlowLog GetScoreFlowLogByIdentityCard(string IdentityCard, int year) + { + return Funs.DB.ScoreFlowLog.Where(e => e.IdentityCard == IdentityCard && e.Year == year).OrderByDescending(x => x.CompileDate).FirstOrDefault(); + } + + /// + /// 增加人员记分流水 + /// + /// 人员记分流水实体 + public static void AddScoreFlowLog(Model.ScoreFlowLog model) + { + Model.ScoreFlowLog newModel = new Model.ScoreFlowLog(); + newModel.Id = model.Id; + newModel.Year = model.Year; + newModel.IdentityCard = model.IdentityCard; + newModel.UserName = model.UserName; + newModel.Type = model.Type; + newModel.Score = model.Score; + newModel.CurrentScore = model.CurrentScore; + newModel.Item = model.Item; + newModel.LogContent = model.LogContent; + newModel.UserId = model.UserId; + newModel.PersonId = model.PersonId; + newModel.UnitId = model.UnitId; + newModel.ProjectId = model.ProjectId; + newModel.UnitName = model.UnitName; + newModel.ProjectName = model.ProjectName; + newModel.Remark = model.Remark; + newModel.CompileDate = model.CompileDate; + newModel.CompileMan = model.CompileMan; + newModel.CompileManId = model.CompileManId; + Funs.DB.ScoreFlowLog.InsertOnSubmit(newModel); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改人员记分流水 + /// + /// 人员记分流水实体 + public static void UpdateScoreFlowLog(Model.ScoreFlowLog model) + { + Model.ScoreFlowLog newModel = Funs.DB.ScoreFlowLog.FirstOrDefault(e => e.Id == model.Id); + if (newModel != null) + { + //newModel.Id = model.Id; + //newModel.Year = model.Year; + //newModel.IdentityCard = model.IdentityCard; + //newModel.UserName = model.UserName; + newModel.Type = model.Type; + newModel.Score = model.Score; + newModel.CurrentScore = model.CurrentScore; + newModel.Item = model.Item; + newModel.LogContent = model.LogContent; + newModel.UserId = model.UserId; + newModel.PersonId = model.PersonId; + newModel.UnitId = model.UnitId; + newModel.ProjectId = model.ProjectId; + newModel.UnitName = model.UnitName; + newModel.ProjectName = model.ProjectName; + newModel.Remark = model.Remark; + newModel.CompileDate = model.CompileDate; + newModel.CompileMan = model.CompileMan; + newModel.CompileManId = model.CompileManId; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据Id删除人员记分流水 + /// + /// + /// + public static void DeleteScoreFlowLogById(string Id, Sys_User opUser) + { + var db = Funs.DB; + Model.ScoreFlowLog model = db.ScoreFlowLog.FirstOrDefault(x => x.Id == Id); + if (model != null) + { + db.ScoreFlowLog.DeleteOnSubmit(model); + db.SubmitChanges(); + + //BLL.LogService.AddSys_Log(opUser, model.Id, model.Id, BLL.Const.ProjectScoreFlowLogMenuId, BLL.Const.BtnDelete); + } + } + } +} diff --git a/SGGL/BLL/Score/ScoreUserService.cs b/SGGL/BLL/Score/ScoreUserService.cs new file mode 100644 index 00000000..9f631f62 --- /dev/null +++ b/SGGL/BLL/Score/ScoreUserService.cs @@ -0,0 +1,84 @@ +using Model; +using System.Linq; + +namespace BLL +{ + /// + /// 人员得分表 + /// + public class ScoreUserService + { + /// + /// 根据Id获取人员得分 + /// + /// + /// + public static Model.ScoreUser GetScoreUserById(string Id) + { + return Funs.DB.ScoreUser.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 根据证件号码获取人员今年上一条得分记录 + /// + /// + /// + /// + public static Model.ScoreUser GetScoreUserByIdentityCard(string IdentityCard, int year) + { + return Funs.DB.ScoreUser.Where(e => e.IdentityCard == IdentityCard && e.Year == year).OrderByDescending(x => x.CompileDate).FirstOrDefault(); + } + + /// + /// 增加人员得分 + /// + /// 人员得分实体 + public static void AddScoreUser(Model.ScoreUser model) + { + Model.ScoreUser newModel = new Model.ScoreUser(); + newModel.Id = model.Id; + newModel.Year = model.Year; + newModel.IdentityCard = model.IdentityCard; + newModel.UserName = model.UserName; + newModel.Score = model.Score; + newModel.CompileDate = model.CompileDate; + Funs.DB.ScoreUser.InsertOnSubmit(newModel); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改人员得分 + /// + /// 人员得分实体 + public static void UpdateScoreUser(Model.ScoreUser model) + { + Model.ScoreUser newModel = Funs.DB.ScoreUser.FirstOrDefault(e => e.Id == model.Id); + if (newModel != null) + { + //newModel.Id = model.Id; + //newModel.Year = model.Year; + //newModel.IdentityCard = model.IdentityCard; + //newModel.UserName = model.UserName; + newModel.Score = model.Score; + newModel.CompileDate = model.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据Id删除人员得分 + /// + /// + /// + public static void DeleteScoreUserById(string Id, Sys_User opUser) + { + var db = Funs.DB; + Model.ScoreUser model = db.ScoreUser.FirstOrDefault(x => x.Id == Id); + if (model != null) + { + db.ScoreUser.DeleteOnSubmit(model); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index a9a8b595..4ab1ff46 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2129,6 +2129,12 @@ namespace Model partial void InsertSafetyData_SafetyDataPlan(SafetyData_SafetyDataPlan instance); partial void UpdateSafetyData_SafetyDataPlan(SafetyData_SafetyDataPlan instance); partial void DeleteSafetyData_SafetyDataPlan(SafetyData_SafetyDataPlan instance); + partial void InsertScoreFlowLog(ScoreFlowLog instance); + partial void UpdateScoreFlowLog(ScoreFlowLog instance); + partial void DeleteScoreFlowLog(ScoreFlowLog instance); + partial void InsertScoreUser(ScoreUser instance); + partial void UpdateScoreUser(ScoreUser instance); + partial void DeleteScoreUser(ScoreUser instance); partial void InsertSecuritySystem_SafetyOrganization(SecuritySystem_SafetyOrganization instance); partial void UpdateSecuritySystem_SafetyOrganization(SecuritySystem_SafetyOrganization instance); partial void DeleteSecuritySystem_SafetyOrganization(SecuritySystem_SafetyOrganization instance); @@ -8343,6 +8349,22 @@ namespace Model } } + public System.Data.Linq.Table ScoreFlowLog + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table ScoreUser + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table SecuritySystem_SafetyOrganization { get @@ -336957,6 +336979,682 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ScoreFlowLog")] + public partial class ScoreFlowLog : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private int _Year; + + private string _IdentityCard; + + private string _UserName; + + private int _Type; + + private int _Score; + + private int _CurrentScore; + + private string _Item; + + private string _LogContent; + + private string _UserId; + + private string _PersonId; + + private string _UnitId; + + private string _ProjectId; + + private string _UnitName; + + private string _ProjectName; + + private string _Remark; + + private System.DateTime _CompileDate; + + private string _CompileMan; + + private string _CompileManId; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnYearChanging(int value); + partial void OnYearChanged(); + partial void OnIdentityCardChanging(string value); + partial void OnIdentityCardChanged(); + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + partial void OnTypeChanging(int value); + partial void OnTypeChanged(); + partial void OnScoreChanging(int value); + partial void OnScoreChanged(); + partial void OnCurrentScoreChanging(int value); + partial void OnCurrentScoreChanged(); + partial void OnItemChanging(string value); + partial void OnItemChanged(); + partial void OnLogContentChanging(string value); + partial void OnLogContentChanged(); + partial void OnUserIdChanging(string value); + partial void OnUserIdChanged(); + partial void OnPersonIdChanging(string value); + partial void OnPersonIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnProjectNameChanging(string value); + partial void OnProjectNameChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileDateChanging(System.DateTime value); + partial void OnCompileDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileManIdChanging(string value); + partial void OnCompileManIdChanged(); + #endregion + + public ScoreFlowLog() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int NOT NULL")] + public int Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IdentityCard", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string IdentityCard + { + get + { + return this._IdentityCard; + } + set + { + if ((this._IdentityCard != value)) + { + this.OnIdentityCardChanging(value); + this.SendPropertyChanging(); + this._IdentityCard = value; + this.SendPropertyChanged("IdentityCard"); + this.OnIdentityCardChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this.OnUserNameChanging(value); + this.SendPropertyChanging(); + this._UserName = value; + this.SendPropertyChanged("UserName"); + this.OnUserNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="Int NOT NULL")] + public int Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int NOT NULL")] + public int Score + { + get + { + return this._Score; + } + set + { + if ((this._Score != value)) + { + this.OnScoreChanging(value); + this.SendPropertyChanging(); + this._Score = value; + this.SendPropertyChanged("Score"); + this.OnScoreChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CurrentScore", DbType="Int NOT NULL")] + public int CurrentScore + { + get + { + return this._CurrentScore; + } + set + { + if ((this._CurrentScore != value)) + { + this.OnCurrentScoreChanging(value); + this.SendPropertyChanging(); + this._CurrentScore = value; + this.SendPropertyChanged("CurrentScore"); + this.OnCurrentScoreChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Item", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string Item + { + get + { + return this._Item; + } + set + { + if ((this._Item != value)) + { + this.OnItemChanging(value); + this.SendPropertyChanging(); + this._Item = value; + this.SendPropertyChanged("Item"); + this.OnItemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LogContent", DbType="NVarChar(200)")] + public string LogContent + { + get + { + return this._LogContent; + } + set + { + if ((this._LogContent != value)) + { + this.OnLogContentChanging(value); + this.SendPropertyChanging(); + this._LogContent = value; + this.SendPropertyChanged("LogContent"); + this.OnLogContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="NVarChar(50)")] + public string UserId + { + get + { + return this._UserId; + } + set + { + if ((this._UserId != value)) + { + this.OnUserIdChanging(value); + this.SendPropertyChanging(); + this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId", DbType="NVarChar(50)")] + public string PersonId + { + get + { + return this._PersonId; + } + set + { + if ((this._PersonId != value)) + { + this.OnPersonIdChanging(value); + this.SendPropertyChanging(); + this._PersonId = value; + this.SendPropertyChanged("PersonId"); + this.OnPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this.OnProjectNameChanging(value); + this.SendPropertyChanging(); + this._ProjectName = value; + this.SendPropertyChanged("ProjectName"); + this.OnProjectNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime NOT NULL")] + public System.DateTime CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileManId", DbType="NVarChar(50)")] + public string CompileManId + { + get + { + return this._CompileManId; + } + set + { + if ((this._CompileManId != value)) + { + this.OnCompileManIdChanging(value); + this.SendPropertyChanging(); + this._CompileManId = value; + this.SendPropertyChanged("CompileManId"); + this.OnCompileManIdChanged(); + } + } + } + + 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)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ScoreUser")] + public partial class ScoreUser : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private int _Year; + + private string _IdentityCard; + + private int _Score; + + private string _UserName; + + private System.DateTime _CompileDate; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnYearChanging(int value); + partial void OnYearChanged(); + partial void OnIdentityCardChanging(string value); + partial void OnIdentityCardChanged(); + partial void OnScoreChanging(int value); + partial void OnScoreChanged(); + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + partial void OnCompileDateChanging(System.DateTime value); + partial void OnCompileDateChanged(); + #endregion + + public ScoreUser() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int NOT NULL")] + public int Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IdentityCard", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string IdentityCard + { + get + { + return this._IdentityCard; + } + set + { + if ((this._IdentityCard != value)) + { + this.OnIdentityCardChanging(value); + this.SendPropertyChanging(); + this._IdentityCard = value; + this.SendPropertyChanged("IdentityCard"); + this.OnIdentityCardChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int NOT NULL")] + public int Score + { + get + { + return this._Score; + } + set + { + if ((this._Score != value)) + { + this.OnScoreChanging(value); + this.SendPropertyChanging(); + this._Score = value; + this.SendPropertyChanged("Score"); + this.OnScoreChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this.OnUserNameChanging(value); + this.SendPropertyChanging(); + this._UserName = value; + this.SendPropertyChanged("UserName"); + this.OnUserNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime NOT NULL")] + public System.DateTime CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + 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)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SecuritySystem_SafetyOrganization")] public partial class SecuritySystem_SafetyOrganization : INotifyPropertyChanging, INotifyPropertyChanged {