提交代码
This commit is contained in:
commit
7bc713ccad
|
@ -0,0 +1,164 @@
|
|||
--生产人员培训
|
||||
update Sys_Menu set IsUsed=0 where MenuId='EF77BB1F-543B-4BBC-BE8C-FACF2987A13C'--培训计划
|
||||
update Sys_Menu set IsUsed=0 where MenuId='F8E83DBF-7171-4108-81A7-3DB8D10FBFDE'--培训联络
|
||||
update Sys_Menu set IsUsed=0 where MenuId='600AB952-4DC0-4E6D-8C6F-B7B7B9FE589E'--培训内容
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('C8AD8E40-0E96-4007-A02F-62DDB0B275D5','人员培训记录',null,'TestRun/PersonTrain/PersonTrainPlan.aspx',40,'4C973259-234C-4540-9F6A-161ED93BE79B','Menu_TestRun',0,1,1)
|
||||
GO
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('5524601D-945F-4661-BCF7-B09513B8C556','C8AD8E40-0E96-4007-A02F-62DDB0B275D5','增加',1)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('5933AE90-96B3-4495-9F51-E30E9883CA94','C8AD8E40-0E96-4007-A02F-62DDB0B275D5','修改',2)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('C6A17B4D-245F-44CB-8B2D-CE16FB43A3E6','C8AD8E40-0E96-4007-A02F-62DDB0B275D5','删除',3)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('78390E56-0AA1-4C0E-8A40-1B2A6F182899','C8AD8E40-0E96-4007-A02F-62DDB0B275D5','保存',4)
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('586035BF-A2D4-4199-A503-0ACACBFA5A13','培训合同',null,'TestRun/PersonTrain/TrainContract.aspx',50,'4C973259-234C-4540-9F6A-161ED93BE79B','Menu_TestRun',0,1,1)
|
||||
GO
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('A63A963C-98C0-497A-96AD-AEEFFF7BBD3F','586035BF-A2D4-4199-A503-0ACACBFA5A13','增加',1)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('21CB68FB-C11E-4A55-BAE2-8606E75C4470','586035BF-A2D4-4199-A503-0ACACBFA5A13','修改',2)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('F7386C76-9593-47DC-9CCB-FBFD2D468C5E','586035BF-A2D4-4199-A503-0ACACBFA5A13','删除',3)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('3D322716-2C46-478E-B6D5-44213EEF8643','586035BF-A2D4-4199-A503-0ACACBFA5A13','保存',4)
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('80FDE614-1A37-4C1F-B818-C179CA97D66C','培训记录及执行报告',null,'TestRun/PersonTrain/TrainRecords.aspx',60,'4C973259-234C-4540-9F6A-161ED93BE79B','Menu_TestRun',0,1,1)
|
||||
GO
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('E15106AE-2780-4B2B-8D90-A4D8FB77C3D1','80FDE614-1A37-4C1F-B818-C179CA97D66C','增加',1)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('9720ECCC-42D8-4B46-BEFF-06677B379150','80FDE614-1A37-4C1F-B818-C179CA97D66C','修改',2)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('56400A8A-2F8C-4DA2-B108-72CCD9FF7BB7','80FDE614-1A37-4C1F-B818-C179CA97D66C','删除',3)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('49723355-EF7F-4AE3-8A9B-0C1325FF3934','80FDE614-1A37-4C1F-B818-C179CA97D66C','保存',4)
|
||||
go
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[TestRun_TrainRecords](
|
||||
[TrainRecordsId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[TrainRecordsCode] [nvarchar](50) NULL,
|
||||
[TrainRecordsName] [nvarchar](50) NULL,
|
||||
[UploadDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[Remark] [nvarchar](500) NULL,
|
||||
[AttachUrl] [nvarchar](500) NULL,
|
||||
CONSTRAINT [PK_TestRun_TrainRecords] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[TrainRecordsId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_TrainRecords] WITH CHECK ADD CONSTRAINT [FK_TestRun_TrainRecords_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_TrainRecords] CHECK CONSTRAINT [FK_TestRun_TrainRecords_Base_Project]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_TrainRecords] WITH CHECK ADD CONSTRAINT [FK_TestRun_TrainRecords_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_TrainRecords] CHECK CONSTRAINT [FK_TestRun_TrainRecords_Sys_User]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'TrainRecordsId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'TrainRecordsCode'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'TrainRecordsName'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'UploadDate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainRecords', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[TestRun_PersonTrainPlan](
|
||||
[PersonTrainPlanId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[TrainType] [nvarchar](50) NULL,
|
||||
[Purpose] [nvarchar](50) NULL,
|
||||
[TrainingContent] [nvarchar](200) NULL,
|
||||
[TrainingAddress] [nvarchar](50) NULL,
|
||||
[TrainingDate] [datetime] NULL,
|
||||
[TrainingPersonNum] [nvarchar](100) NULL,
|
||||
[TrainingHours] [decimal](18, 1) NULL,
|
||||
[TrainingManager] [nvarchar](50) NULL,
|
||||
[TrainingTeacher] [nvarchar](50) NULL,
|
||||
[AssessmentMethod] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_TestRun_PersonTrainPlan] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[PersonTrainPlanId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_PersonTrainPlan] WITH CHECK ADD CONSTRAINT [FK_TestRun_PersonTrainPlan_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TestRun_PersonTrainPlan] CHECK CONSTRAINT [FK_TestRun_PersonTrainPlan_Base_Project]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'PersonTrainPlanId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训类型(1-办公室理论培训,2-制造厂车间培训,3-同类型装置操作培训,4-合同装置现场培训)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainType'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训目的' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'Purpose'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingContent'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingAddress'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingDate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训学时' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingHours'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训负责人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingManager'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训老师' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'TrainingTeacher'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'考核方式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_PersonTrainPlan', @level2type=N'COLUMN',@level2name=N'AssessmentMethod'
|
||||
GO
|
||||
|
||||
|
|
@ -752,8 +752,10 @@
|
|||
<Compile Include="TestRun\FeedingTestRunService.cs" />
|
||||
<Compile Include="TestRun\Meeting\MeetingService.cs" />
|
||||
<Compile Include="TestRun\PersonTrain\DriverPrepareTrainPlanService.cs" />
|
||||
<Compile Include="TestRun\PersonTrain\PersonTrainPlanService.cs" />
|
||||
<Compile Include="TestRun\PersonTrain\TrainContactService.cs" />
|
||||
<Compile Include="TestRun\PersonTrain\TrainContentService.cs" />
|
||||
<Compile Include="TestRun\PersonTrain\TrainRecordsService.cs" />
|
||||
<Compile Include="TestRun\ProduceProperty\AnalySampService.cs" />
|
||||
<Compile Include="TestRun\ProduceProperty\PropertyRunOthersCheckService.cs" />
|
||||
<Compile Include="TestRun\ProduceProperty\PropertyRunPumpCheckService.cs" />
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -3186,10 +3184,16 @@ namespace BLL
|
|||
/// 开车方案编制计划模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string SchemePlanTemplateUrl = "File\\Excel\\TestRun\\开车方案编制计划.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 开车责任分工表模板文件原始虚拟路径
|
||||
/// 培训报告
|
||||
/// </summary>
|
||||
public const string DutyTemplateUrl = "File\\Excel\\TestRun\\开车责任分工表.xlsx";
|
||||
public const string TestRun_TrainRecordsUrl = "File\\Word\\TestRun\\生产人员培训执行情况报告.doc";
|
||||
|
||||
/// <summary>
|
||||
/// 签到表
|
||||
/// </summary>
|
||||
public const string TestRun_SignUrl = "File\\Word\\TestRun\\项目培训签到表.doc";
|
||||
#endregion
|
||||
|
||||
#region 绩效考核模板文件路径
|
||||
|
@ -5111,6 +5115,21 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string TrainContentMenuId = "600AB952-4DC0-4E6D-8C6F-B7B7B9FE589E";
|
||||
|
||||
/// <summary>
|
||||
/// 人员培训记录
|
||||
/// </summary>
|
||||
public const string PersonTrainPlanMenuId = "C8AD8E40-0E96-4007-A02F-62DDB0B275D5";
|
||||
|
||||
/// <summary>
|
||||
/// 培训合同
|
||||
/// </summary>
|
||||
public const string TrainContractMenuId = "586035BF-A2D4-4199-A503-0ACACBFA5A13";
|
||||
|
||||
/// <summary>
|
||||
/// 培训记录及执行报告
|
||||
/// </summary>
|
||||
public const string TrainRecordsMenuId = "80FDE614-1A37-4C1F-B818-C179CA97D66C";
|
||||
|
||||
/// <summary>
|
||||
/// 开车分包计划
|
||||
/// </summary>
|
||||
|
|
|
@ -233,6 +233,21 @@
|
|||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 试车管理:培训类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] drpTrainTypeList()
|
||||
{
|
||||
ListItem[] list = new ListItem[4];
|
||||
list[0] = new ListItem("办公室理论培训", "1");
|
||||
list[1] = new ListItem("制造厂车间培训", "2");
|
||||
list[2] = new ListItem("同类型装置操作培训", "3");
|
||||
list[3] = new ListItem("合同装置现场培训", "4");
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
// 定义允许上传的文件类型列表
|
||||
public static List<string> allowExtensions = new List<string>
|
||||
{
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员培训计划
|
||||
/// </summary>
|
||||
public class PersonTrainPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取人员培训计划
|
||||
/// </summary>
|
||||
/// <param name="personTrainPlanId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.TestRun_PersonTrainPlan GetPersonTrainPlanById(string personTrainPlanId)
|
||||
{
|
||||
return Funs.DB.TestRun_PersonTrainPlan.FirstOrDefault(e => e.PersonTrainPlanId == personTrainPlanId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加人员培训计划
|
||||
/// </summary>
|
||||
/// <param name="plan"></param>
|
||||
public static void AddPersonTrainPlan(Model.TestRun_PersonTrainPlan plan)
|
||||
{
|
||||
Model.TestRun_PersonTrainPlan newPlan = new Model.TestRun_PersonTrainPlan
|
||||
{
|
||||
PersonTrainPlanId = plan.PersonTrainPlanId,
|
||||
ProjectId = plan.ProjectId,
|
||||
TrainType = plan.TrainType,
|
||||
Purpose = plan.Purpose,
|
||||
TrainingContent = plan.TrainingContent,
|
||||
TrainingAddress = plan.TrainingAddress,
|
||||
TrainingDate = plan.TrainingDate,
|
||||
TrainingPersonNum = plan.TrainingPersonNum,
|
||||
TrainingHours = plan.TrainingHours,
|
||||
TrainingManager = plan.TrainingManager,
|
||||
TrainingTeacher = plan.TrainingTeacher,
|
||||
AssessmentMethod = plan.AssessmentMethod
|
||||
};
|
||||
Funs.DB.TestRun_PersonTrainPlan.InsertOnSubmit(newPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改人员培训计划
|
||||
/// </summary>
|
||||
/// <param name="plan"></param>
|
||||
public static void UpdatePersonTrainPlan(Model.TestRun_PersonTrainPlan plan)
|
||||
{
|
||||
Model.TestRun_PersonTrainPlan newPlan = Funs.DB.TestRun_PersonTrainPlan.FirstOrDefault(e => e.PersonTrainPlanId == plan.PersonTrainPlanId);
|
||||
if (newPlan != null)
|
||||
{
|
||||
newPlan.TrainType = plan.TrainType;
|
||||
newPlan.Purpose = plan.Purpose;
|
||||
newPlan.TrainingContent = plan.TrainingContent;
|
||||
newPlan.TrainingAddress = plan.TrainingAddress;
|
||||
newPlan.TrainingDate = plan.TrainingDate;
|
||||
newPlan.TrainingPersonNum = plan.TrainingPersonNum;
|
||||
newPlan.TrainingHours = plan.TrainingHours;
|
||||
newPlan.TrainingManager = plan.TrainingManager;
|
||||
newPlan.TrainingTeacher = plan.TrainingTeacher;
|
||||
newPlan.AssessmentMethod = plan.AssessmentMethod;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除人员培训计划
|
||||
/// </summary>
|
||||
/// <param name="personTrainPlanId"></param>
|
||||
public static void DeletePersonTrainPlanById(string personTrainPlanId)
|
||||
{
|
||||
Model.TestRun_PersonTrainPlan newPlan = Funs.DB.TestRun_PersonTrainPlan.FirstOrDefault(e => e.PersonTrainPlanId == personTrainPlanId);
|
||||
if (newPlan != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(newPlan.PersonTrainPlanId);//删除附件
|
||||
Funs.DB.TestRun_PersonTrainPlan.DeleteOnSubmit(newPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 培训记录及执行报告
|
||||
/// </summary>
|
||||
public class TrainRecordsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取培训记录及执行报告
|
||||
/// </summary>
|
||||
/// <param name="trainRecordsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.TestRun_TrainRecords GetTrainRecordsById(string trainRecordsId)
|
||||
{
|
||||
return Funs.DB.TestRun_TrainRecords.FirstOrDefault(e => e.TrainRecordsId == trainRecordsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加培训记录及执行报告
|
||||
/// </summary>
|
||||
/// <param name="trainRecords"></param>
|
||||
public static void AddTrainRecords(Model.TestRun_TrainRecords trainRecords)
|
||||
{
|
||||
Model.TestRun_TrainRecords newTrainRecords = new Model.TestRun_TrainRecords
|
||||
{
|
||||
TrainRecordsId = trainRecords.TrainRecordsId,
|
||||
ProjectId = trainRecords.ProjectId,
|
||||
TrainRecordsCode = trainRecords.TrainRecordsCode,
|
||||
TrainRecordsName = trainRecords.TrainRecordsName,
|
||||
UploadDate = trainRecords.UploadDate,
|
||||
CompileMan = trainRecords.CompileMan,
|
||||
CompileDate = trainRecords.CompileDate,
|
||||
Remark = trainRecords.Remark
|
||||
};
|
||||
Funs.DB.TestRun_TrainRecords.InsertOnSubmit(newTrainRecords);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改培训记录及执行报告
|
||||
/// </summary>
|
||||
/// <param name="trainRecords"></param>
|
||||
public static void UpdateTrainRecords(Model.TestRun_TrainRecords trainRecords)
|
||||
{
|
||||
Model.TestRun_TrainRecords newTrainRecords = Funs.DB.TestRun_TrainRecords.FirstOrDefault(e => e.TrainRecordsId == trainRecords.TrainRecordsId);
|
||||
if (newTrainRecords != null)
|
||||
{
|
||||
newTrainRecords.TrainRecordsCode = trainRecords.TrainRecordsCode;
|
||||
newTrainRecords.TrainRecordsName = trainRecords.TrainRecordsName;
|
||||
newTrainRecords.UploadDate = trainRecords.UploadDate;
|
||||
newTrainRecords.CompileMan = trainRecords.CompileMan;
|
||||
newTrainRecords.CompileDate = trainRecords.CompileDate;
|
||||
newTrainRecords.Remark = trainRecords.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除培训记录及执行报告
|
||||
/// </summary>
|
||||
/// <param name="trainRecordId"></param>
|
||||
public static void DeleteTrainRecordsById(string trainRecordId)
|
||||
{
|
||||
Model.TestRun_TrainRecords newTrainRecords = Funs.DB.TestRun_TrainRecords.FirstOrDefault(e => e.TrainRecordsId == trainRecordId);
|
||||
if (newTrainRecords != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(trainRecordId);//删除附件
|
||||
Funs.DB.TestRun_TrainRecords.DeleteOnSubmit(newTrainRecords);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
错误信息开始=====>
|
||||
错误类型:NullReferenceException
|
||||
错误信息:未将对象引用设置到对象的实例。
|
||||
错误堆栈:
|
||||
在 FineUIPro.Web.TestRun.DriverPrepare.SchemePlan.btnOut_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\TestRun\DriverPrepare\SchemePlan.aspx.cs:行号 230
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:01/17/2024 15:45:21
|
||||
出错文件:http://localhost:8579/TestRun/DriverPrepare/SchemePlan.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:01/17/2024 15:45:21
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
ĐĎࡱá |