自主管理加分项
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public static class BehavioralSafetyObservationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取行为安全观察与沟通信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BehavioralSafetyObservation GetBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加行为安全观察与沟通
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation model = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项
|
||||
/// </summary>
|
||||
public static class BonusScoreSelfManagementService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取自主管理加分项信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreSelfManagement GetBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加自主管理加分项
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
BonusScoreTypeId = model.BonusScoreTypeId,
|
||||
BonusScoreTypeName = model.BonusScoreTypeName,
|
||||
Score = model.Score,
|
||||
PersonId = model.PersonId,
|
||||
//DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreSelfManagement.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement newModel = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
//newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.BonusScoreTypeId = model.BonusScoreTypeId;
|
||||
newModel.BonusScoreTypeName = model.BonusScoreTypeName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.PersonId = model.PersonId;
|
||||
//newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement model = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreSelfManagement.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Examine_BonusScoreSelfManagement> GetBonusScoreSelfManagementList(string projectId, string personId, string typeId)
|
||||
{
|
||||
var list = (from x in Funs.DB.Examine_BonusScoreSelfManagement orderby x.Code descending select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
list = list.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(personId))
|
||||
{
|
||||
list = list.Where(x => x.PersonId == personId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(typeId))
|
||||
{
|
||||
list = list.Where(x => x.BonusScoreTypeId == typeId).ToList();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项类型
|
||||
/// </summary>
|
||||
public static class BonusScoreTypeService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取自主管理加分项类型信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreType GetBonusScoreTypeById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取自主管理加分项类型信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreType GetBonusScoreTypeByName(string Name)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加自主管理加分项类型
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreType(Model.Examine_BonusScoreType model)
|
||||
{
|
||||
Model.Examine_BonusScoreType newModel = new Model.Examine_BonusScoreType
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Score = model.Score,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreType.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreType(Model.Examine_BonusScoreType model)
|
||||
{
|
||||
Model.Examine_BonusScoreType newModel = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Score = model.Score;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreTypeById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreType model = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreType.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有类型List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Examine_BonusScoreType> GetBonusScoreTypeList()
|
||||
{
|
||||
return (from x in Funs.DB.Examine_BonusScoreType orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitBonusScoreTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetBonusScoreTypeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public static class CoConstructionActivitiesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取一线党员联系班组共建活动信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_CoConstructionActivities GetCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_CoConstructionActivities.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities model = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_CoConstructionActivities.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public static class LeadershipJoinHomeworkAnalysisMeetingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取领导人员参加班组作业分析会信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_LeadershipJoinHomeworkAnalysisMeeting GetLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public static class PersonalSafetyActionPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取个人安全行动计划信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_PersonalSafetyActionPlan GetPersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加个人安全行动计划
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddPersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeletePersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan model = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public static class SharingOfSafetyExperienceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全经验分享信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_SharingOfSafetyExperience GetSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全经验分享
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience model = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user