人员记分

This commit is contained in:
2026-07-27 10:08:44 +08:00
parent 797519af99
commit 9630b5c123
5 changed files with 1000 additions and 0 deletions
@@ -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
+2
View File
@@ -857,6 +857,8 @@
<Compile Include="PZHGL\ProjectData\ProjectPageDataService.cs" />
<Compile Include="ReportManage\HazardFactor\HazardFactorOccHealthService.cs" />
<Compile Include="ReportManage\HazardFactor\HazardFactorSafetyService.cs" />
<Compile Include="Score\ScoreUserService.cs" />
<Compile Include="Score\ScoreFlowLogService.cs" />
<Compile Include="Service References\CNCECHSSEService\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
+131
View File
@@ -0,0 +1,131 @@
using Model;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
/// <summary>
/// 人员记分流水日志表
/// </summary>
public class ScoreFlowLogService
{
/// <summary>
/// 记分方式
/// </summary>
public enum TypeInt : int
{
= 1,
= 0
}
/// <summary>
///
/// </summary>
public static Dictionary<string, int> TypeMap = new Dictionary<string, int>
{
{ "加分" ,(int)TypeInt.},
{ "扣分" ,(int)TypeInt.},
};
/// <summary>
/// 根据Id获取人员记分流水
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public static Model.ScoreFlowLog GetScoreFlowLogById(string Id)
{
return Funs.DB.ScoreFlowLog.FirstOrDefault(e => e.Id == Id);
}
/// <summary>
/// 根据证件号码获取人员今年上一条记分流水记录
/// </summary>
/// <param name="IdentityCard"></param>
/// <param name="year"></param>
/// <returns></returns>
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();
}
/// <summary>
/// 增加人员记分流水
/// </summary>
/// <param name="model">人员记分流水实体</param>
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();
}
/// <summary>
/// 修改人员记分流水
/// </summary>
/// <param name="model">人员记分流水实体</param>
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();
}
}
/// <summary>
/// 根据Id删除人员记分流水
/// </summary>
/// <param name="Id"></param>
/// <param name="opUser"></param>
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);
}
}
}
}
+84
View File
@@ -0,0 +1,84 @@
using Model;
using System.Linq;
namespace BLL
{
/// <summary>
/// 人员得分表
/// </summary>
public class ScoreUserService
{
/// <summary>
/// 根据Id获取人员得分
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public static Model.ScoreUser GetScoreUserById(string Id)
{
return Funs.DB.ScoreUser.FirstOrDefault(e => e.Id == Id);
}
/// <summary>
/// 根据证件号码获取人员今年上一条得分记录
/// </summary>
/// <param name="IdentityCard"></param>
/// <param name="year"></param>
/// <returns></returns>
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();
}
/// <summary>
/// 增加人员得分
/// </summary>
/// <param name="model">人员得分实体</param>
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();
}
/// <summary>
/// 修改人员得分
/// </summary>
/// <param name="model">人员得分实体</param>
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();
}
}
/// <summary>
/// 根据Id删除人员得分
/// </summary>
/// <param name="Id"></param>
/// <param name="opUser"></param>
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();
}
}
}
}
+698
View File
@@ -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> ScoreFlowLog
{
get
{
return this.GetTable<ScoreFlowLog>();
}
}
public System.Data.Linq.Table<ScoreUser> ScoreUser
{
get
{
return this.GetTable<ScoreUser>();
}
}
public System.Data.Linq.Table<SecuritySystem_SafetyOrganization> 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
{