20260817 积分、扣分
This commit is contained in:
@@ -0,0 +1,160 @@
|
|||||||
|
|
||||||
|
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||||
|
values('49DE1534-20FF-44B0-846F-FF057E836DEC','得分扣分记录流水日志','Score/ScoreFlowLog.aspx',30,'416F0A73-FB3D-4AAC-BC76-3820F52382D9','Menu_S_HSSE',1,1,1)
|
||||||
|
go
|
||||||
|
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||||
|
values('10A3CCFE-E445-4832-A9BF-129D89828278','得分扣分记录流水日志','Score/ScoreFlowLog.aspx',30,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||||
|
go
|
||||||
|
|
||||||
|
alter table ScoreFlowLog add DataSourceId nvarchar(50)
|
||||||
|
go
|
||||||
|
alter table ScoreUser add DataSourceId nvarchar(50)
|
||||||
|
go
|
||||||
|
alter table ScoreFlowLog add CheckDate datetime
|
||||||
|
go
|
||||||
|
alter table ScoreUser add CheckDate datetime
|
||||||
|
go
|
||||||
|
|
||||||
|
CREATE VIEW View_Training_TestRecord
|
||||||
|
as
|
||||||
|
/************考试记录信息****************/
|
||||||
|
select testRecord.TestRecordId,
|
||||||
|
testRecord.ProjectId,
|
||||||
|
project.ProjectName,
|
||||||
|
Person.UnitId,--单位id
|
||||||
|
Unit.UnitName,--单位名称
|
||||||
|
testRecord.TestStartTime,--考试开始时间
|
||||||
|
testRecord.TestEndTime,--考试结束时间
|
||||||
|
testRecord.TestManId,--考生id
|
||||||
|
Person.PersonName,--考生姓名
|
||||||
|
Person.IdentityCard,--身份证号
|
||||||
|
testRecord.TestScores,--考试成绩
|
||||||
|
testRecord.CompanyTrainingItemId,--教材明细类型id
|
||||||
|
TCItem.CompanyTrainingItemName,--教材明细类型
|
||||||
|
TC.CompanyTrainingId,--教材类型id
|
||||||
|
TC.CompanyTrainingName,--教材类型
|
||||||
|
Person.WorkPostId,--岗位id
|
||||||
|
workPost.WorkPostName,--岗位名称
|
||||||
|
const.ConstText as WorkPostType--岗位类型
|
||||||
|
from Training_TestRecord as testRecord
|
||||||
|
LEFT JOIN dbo.Training_CompanyTrainingItem AS TCItem ON TCItem.CompanyTrainingItemId = TestRecord.CompanyTrainingItemId
|
||||||
|
LEFT JOIN dbo.Training_CompanyTraining AS TC ON TC.CompanyTrainingId = TCItem.CompanyTrainingId
|
||||||
|
LEFT JOIN dbo.SitePerson_Person AS Person ON Person.PersonId = TestRecord.TestManId
|
||||||
|
LEFT JOIN dbo.Base_Unit AS Unit ON Person.UnitId=Unit.UnitId
|
||||||
|
LEFT JOIN Base_WorkPost as workPost on workPost.WorkPostId = Person.WorkPostId
|
||||||
|
LEFT JOIN Sys_Const AS const ON const.ConstValue = workPost.PostType and const.GroupId ='PostType'
|
||||||
|
LEFT JOIN Base_Project as project on project.ProjectId = testRecord.ProjectId
|
||||||
|
GO
|
||||||
|
|
||||||
|
update Sys_Menu set Url='EnergyReport/EnergyWaterConservation.aspx' where MenuId='CCA0E136-9AC7-4A14-BC1F-20758A99E88E'
|
||||||
|
update Sys_Menu set Url='EnergyReport/EnergyWaterConservation.aspx' where MenuId='D4541B37-7876-40D8-A48B-AEF8FCDAEE9F'
|
||||||
|
update Sys_Menu set Url='EnergyReport/EnergyStatistics.aspx' where MenuId='0BB29D06-E286-45C0-BC6A-3DDF8A21D1B2'
|
||||||
|
update Sys_Menu set Url='EnergyReport/EnergyStatistics.aspx' where MenuId='C97C6A48-8FF1-4E74-BF9A-E89C0422AB67'
|
||||||
|
go
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('C6655551-21D8-4E1E-B6C9-27D4A9FF9F71','CCA0E136-9AC7-4A14-BC1F-20758A99E88E','增加',1)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('3EE31410-3D5D-448C-ACB9-3BF23DEE6D33','CCA0E136-9AC7-4A14-BC1F-20758A99E88E','修改',2)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('C797CA13-F7B9-4BEA-94C8-E900A351E680','CCA0E136-9AC7-4A14-BC1F-20758A99E88E','删除',3)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('952B1041-1E06-4557-898B-782EC892C9A8','CCA0E136-9AC7-4A14-BC1F-20758A99E88E','保存',4)
|
||||||
|
go
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('70D26027-BE4F-45FE-8C0B-A6CE31731E73','D4541B37-7876-40D8-A48B-AEF8FCDAEE9F','增加',1)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('339ACF6A-124A-410C-B8E8-47949E02C6D3','D4541B37-7876-40D8-A48B-AEF8FCDAEE9F','修改',2)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('8FE0D4AB-7208-44CE-B508-A66D01EFBF09','D4541B37-7876-40D8-A48B-AEF8FCDAEE9F','删除',3)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('C659818E-300A-44DA-B685-E9C42E157CF4','D4541B37-7876-40D8-A48B-AEF8FCDAEE9F','保存',4)
|
||||||
|
go
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE [dbo].[EnergyReport_EnergyWaterConservation](
|
||||||
|
[EnergyWaterConservationId] [nvarchar](50) NOT NULL,
|
||||||
|
[ProjectId] [nvarchar](50) NULL,
|
||||||
|
[EnergySavingIndex] [decimal](18, 2) NULL,
|
||||||
|
[WaterSavingIndex] [decimal](18, 2) NULL,
|
||||||
|
[EnergySavingSchemes] [nvarchar](200) NULL,
|
||||||
|
[WaterSavingSchemes] [nvarchar](200) NULL,
|
||||||
|
[SelfEvaluation] [nvarchar](200) NULL,
|
||||||
|
[Summary] [nvarchar](200) NULL,
|
||||||
|
[SupportingDocuments] [nvarchar](200) NULL,
|
||||||
|
[ActualEnergySaving] [decimal](18, 2) NULL,
|
||||||
|
[ActualWaterSaving] [decimal](18, 2) NULL,
|
||||||
|
[EnergySavingCompletionRate] [decimal](18, 2) NULL,
|
||||||
|
[WaterSavingCompletionRate] [decimal](18, 2) NULL,
|
||||||
|
[CompileMan] [nvarchar](50) NULL,
|
||||||
|
[CompileDate] [datetime] NULL,
|
||||||
|
[Remarks] [nvarchar](200) NULL,
|
||||||
|
CONSTRAINT [PK_EnergyReport_EnergyWaterConservation] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[EnergyWaterConservationId] 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]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyWaterConservation] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyWaterConservation_Base_Project] FOREIGN KEY([ProjectId])
|
||||||
|
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyWaterConservation] CHECK CONSTRAINT [FK_EnergyReport_EnergyWaterConservation_Base_Project]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyWaterConservation] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyWaterConservation_Sys_User] FOREIGN KEY([CompileMan])
|
||||||
|
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyWaterConservation] CHECK CONSTRAINT [FK_EnergyReport_EnergyWaterConservation_Sys_User]
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'EnergyWaterConservationId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @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'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'EnergySavingIndex'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节水指标(吨)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'WaterSavingIndex'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节能措施及方案' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'EnergySavingSchemes'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节水措施及方案' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'WaterSavingSchemes'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节能节水自评' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'SelfEvaluation'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节能节水总结' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'Summary'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节能节水相关证明资料' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'SupportingDocuments'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'实际节能(吨标煤)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'ActualEnergySaving'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'实际节水(吨)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'ActualWaterSaving'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节能完成率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'EnergySavingCompletionRate'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节水完成率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @level2type=N'COLUMN',@level2name=N'WaterSavingCompletionRate'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyWaterConservation', @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'EnergyReport_EnergyWaterConservation', @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'EnergyReport_EnergyWaterConservation'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||||
|
values('3DBCA999-949F-4B6D-93AE-B785B0D3D0B5','能源设置','BaseInfo/EnergySettings.aspx',200,'5196A6FD-4BF1-46B3-8D24-9A3CE5BB4760','Menu_SysSet',1,1,1)
|
||||||
|
go
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('0A68798E-FE8F-4FF1-A7E7-19E79E6B108D','3DBCA999-949F-4B6D-93AE-B785B0D3D0B5','增加',1)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('BAE0E08D-B705-4893-9E10-8C6B346C2820','3DBCA999-949F-4B6D-93AE-B785B0D3D0B5','修改',2)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('E35C750A-C2CF-4DE0-B8D8-6A73A2B846AB','3DBCA999-949F-4B6D-93AE-B785B0D3D0B5','删除',3)
|
||||||
|
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
values('73D0A303-5C51-4069-8E80-4CBE45B698D7','3DBCA999-949F-4B6D-93AE-B785B0D3D0B5','保存',4)
|
||||||
|
go
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE [dbo].[Base_Energy](
|
||||||
|
[EnergyId] [nvarchar](50) NOT NULL,
|
||||||
|
[EnergyName] [nvarchar](50) NOT NULL,
|
||||||
|
[EnergyUnit] [nvarchar](50) NOT NULL,
|
||||||
|
[ReferenceCoefficient] [decimal](18, 4) NULL,
|
||||||
|
CONSTRAINT [PK_Base_Energy] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[EnergyId] 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]
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Energy', @level2type=N'COLUMN',@level2name=N'EnergyId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'能源名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Energy', @level2type=N'COLUMN',@level2name=N'EnergyName'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Energy', @level2type=N'COLUMN',@level2name=N'EnergyUnit'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参考折标准煤系数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Energy', @level2type=N'COLUMN',@level2name=N'ReferenceCoefficient'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'能源设置表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Energy'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE [dbo].[EnergyReport_EnergyStatistics](
|
||||||
|
[EnergyStatisticsId] [nvarchar](50) NOT NULL,
|
||||||
|
[ProjectId] [nvarchar](50) NULL,
|
||||||
|
[UnitId] [nvarchar](50) NULL,
|
||||||
|
[ReportDate] [datetime] NOT NULL,
|
||||||
|
[EnergyId] [nvarchar](50) NOT NULL,
|
||||||
|
[Consumption] [decimal](18, 2) NULL,
|
||||||
|
[Amount] [decimal](18, 2) NULL,
|
||||||
|
[UnitPrice] [decimal](18, 2) NULL,
|
||||||
|
[ConversionUnit] [nvarchar](50) NULL,
|
||||||
|
[ConvertedQuantity] [decimal](18, 7) NULL,
|
||||||
|
[TCE] [decimal](18, 5) NULL,
|
||||||
|
[CompileMan] [nvarchar](50) NULL,
|
||||||
|
[CompileDate] [datetime] NULL,
|
||||||
|
CONSTRAINT [PK_EnergyReport_EnergyStatistics] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[EnergyStatisticsId] 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]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Energy] FOREIGN KEY([EnergyId])
|
||||||
|
REFERENCES [dbo].[Base_Energy] ([EnergyId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] CHECK CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Energy]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Project] FOREIGN KEY([ProjectId])
|
||||||
|
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] CHECK CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Project]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Unit] FOREIGN KEY([UnitId])
|
||||||
|
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] CHECK CONSTRAINT [FK_EnergyReport_EnergyStatistics_Base_Unit]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] WITH CHECK ADD CONSTRAINT [FK_EnergyReport_EnergyStatistics_Sys_User] FOREIGN KEY([CompileMan])
|
||||||
|
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnergyReport_EnergyStatistics] CHECK CONSTRAINT [FK_EnergyReport_EnergyStatistics_Sys_User]
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'EnergyStatisticsId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'UnitId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'填报日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'ReportDate'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'能源Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'EnergyId'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'Consumption'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'消费金额(元)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'Amount'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单价' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'UnitPrice'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转换单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'ConversionUnit'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转换量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'ConvertedQuantity'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'吨标煤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @level2type=N'COLUMN',@level2name=N'TCE'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EnergyReport_EnergyStatistics', @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'EnergyReport_EnergyStatistics', @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'EnergyReport_EnergyStatistics'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
using EmitMapper;
|
using EmitMapper;
|
||||||
using EmitMapper.MappingConfiguration;
|
using EmitMapper.MappingConfiguration;
|
||||||
using FastReport.Data;
|
using FastReport.Data;
|
||||||
using Microsoft.SqlServer.Dts.Runtime;
|
|
||||||
using Model;
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -254,6 +254,7 @@
|
|||||||
<Compile Include="BaseInfo\BaseFactoryService.cs" />
|
<Compile Include="BaseInfo\BaseFactoryService.cs" />
|
||||||
<Compile Include="BaseInfo\CertificateService.cs" />
|
<Compile Include="BaseInfo\CertificateService.cs" />
|
||||||
<Compile Include="BaseInfo\CNProfessionalService.cs" />
|
<Compile Include="BaseInfo\CNProfessionalService.cs" />
|
||||||
|
<Compile Include="BaseInfo\EnergySettingsService.cs" />
|
||||||
<Compile Include="BaseInfo\QualityProblemClassifyItemService.cs" />
|
<Compile Include="BaseInfo\QualityProblemClassifyItemService.cs" />
|
||||||
<Compile Include="BaseInfo\QualityProblemClassifyService.cs" />
|
<Compile Include="BaseInfo\QualityProblemClassifyService.cs" />
|
||||||
<Compile Include="BaseInfo\QualityProblemNatureItemService.cs" />
|
<Compile Include="BaseInfo\QualityProblemNatureItemService.cs" />
|
||||||
@@ -455,6 +456,8 @@
|
|||||||
<Compile Include="DigData\HSEDataCollectService.cs" />
|
<Compile Include="DigData\HSEDataCollectService.cs" />
|
||||||
<Compile Include="DoorServer\DoorServerService.cs" />
|
<Compile Include="DoorServer\DoorServerService.cs" />
|
||||||
<Compile Include="DropListService.cs" />
|
<Compile Include="DropListService.cs" />
|
||||||
|
<Compile Include="EnergyReport\EnergyStatisticsService.cs" />
|
||||||
|
<Compile Include="EnergyReport\EnergyWaterConservationService.cs" />
|
||||||
<Compile Include="GlobalSuppressions.cs" />
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
<Compile Include="HJGL\BaseInfo\Base_ComponentsService.cs" />
|
<Compile Include="HJGL\BaseInfo\Base_ComponentsService.cs" />
|
||||||
<Compile Include="HJGL\BaseInfo\Base_ConsumablesService.cs" />
|
<Compile Include="HJGL\BaseInfo\Base_ConsumablesService.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
using Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BLL
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 能源设置
|
||||||
|
/// </summary>
|
||||||
|
public class EnergySettingsService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据Id获取能源信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Base_Energy GetEnergyById(string energyId)
|
||||||
|
{
|
||||||
|
return Funs.DB.Base_Energy.FirstOrDefault(e => e.EnergyId == energyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加能源
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energy"></param>
|
||||||
|
public static void AddEnergy(Model.Base_Energy energy)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.Base_Energy newEnergy = new Model.Base_Energy();
|
||||||
|
newEnergy.EnergyId = energy.EnergyId;
|
||||||
|
newEnergy.EnergyName = energy.EnergyName;
|
||||||
|
newEnergy.EnergyUnit = energy.EnergyUnit;
|
||||||
|
newEnergy.ReferenceCoefficient = energy.ReferenceCoefficient;
|
||||||
|
db.Base_Energy.InsertOnSubmit(newEnergy);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改能源
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energy"></param>
|
||||||
|
public static void UpdateEnergy(Model.Base_Energy energy)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.Base_Energy newEnergy = db.Base_Energy.FirstOrDefault(e => e.EnergyId == energy.EnergyId);
|
||||||
|
if (newEnergy != null)
|
||||||
|
{
|
||||||
|
newEnergy.EnergyName = energy.EnergyName;
|
||||||
|
newEnergy.EnergyUnit = energy.EnergyUnit;
|
||||||
|
newEnergy.ReferenceCoefficient = energy.ReferenceCoefficient;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键删除能源
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyId"></param>
|
||||||
|
public static void DeleteEnergyById(string energyId)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.Base_Energy energy = db.Base_Energy.FirstOrDefault(e => e.EnergyId == energyId);
|
||||||
|
if (energy != null)
|
||||||
|
{
|
||||||
|
db.Base_Energy.DeleteOnSubmit(energy);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取能源列表信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.Base_Energy> GetEnergyList()
|
||||||
|
{
|
||||||
|
return (from x in Funs.DB.Base_Energy orderby x.EnergyName select x).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取能源下拉列表项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dropName"></param>
|
||||||
|
/// <param name="isShowPlease"></param>
|
||||||
|
public static void InitEnergyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||||
|
{
|
||||||
|
dropName.DataValueField = "EnergyId";
|
||||||
|
dropName.DataTextField = "EnergyName";
|
||||||
|
dropName.DataSource = GetEnergyList();
|
||||||
|
dropName.DataBind();
|
||||||
|
if (isShowPlease)
|
||||||
|
{
|
||||||
|
Funs.FineUIPleaseSelect(dropName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,6 +58,10 @@ namespace BLL
|
|||||||
/// N3较大隐患Id
|
/// N3较大隐患Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string SafetyNatureIdN3 = "4cd15090-0fb0-4bdf-9a72-3076f90fe5c6";
|
public const string SafetyNatureIdN3 = "4cd15090-0fb0-4bdf-9a72-3076f90fe5c6";
|
||||||
|
/// <summary>
|
||||||
|
/// N4一般隐患
|
||||||
|
/// </summary>
|
||||||
|
public const string SafetyNatureIdN4 = "556bf91f-adbe-4af6-8403-a685f893af93";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -88,6 +92,24 @@ namespace BLL
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 教材库
|
||||||
|
/// <summary>
|
||||||
|
/// 通用安全知识
|
||||||
|
/// </summary>
|
||||||
|
public const string CompanyTrainingId1 = "68f99192-d5bd-47e9-998f-d0052c8ef39e";
|
||||||
|
/// <summary>
|
||||||
|
/// 知识方法工具
|
||||||
|
/// </summary>
|
||||||
|
public const string CompanyTrainingId2 = "74e3f6e6-bd28-4cf2-9b27-d62947a61775";
|
||||||
|
/// <summary>
|
||||||
|
/// 岗位基本操作技能
|
||||||
|
/// </summary>
|
||||||
|
public const string CompanyTrainingId3 = "c69ab677-e5eb-443b-a778-8c6b1d605dac";
|
||||||
|
/// <summary>
|
||||||
|
/// 生产受控管理
|
||||||
|
/// </summary>
|
||||||
|
public const string CompanyTrainingId4 = "e10a69e9-af1a-4088-8bcc-71481c59e578";
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 焊条发放回收纪录
|
/// 焊条发放回收纪录
|
||||||
@@ -1795,6 +1817,11 @@ namespace BLL
|
|||||||
/// 风险等级
|
/// 风险等级
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string RiskLevelMenuId = "E4B526CC-805E-4131-8E18-2FFA6871507E";
|
public const string RiskLevelMenuId = "E4B526CC-805E-4131-8E18-2FFA6871507E";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 能源设置
|
||||||
|
/// </summary>
|
||||||
|
public const string EnergyMenuId = "3DBCA999-949F-4B6D-93AE-B785B0D3D0B5";
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 质量基础信息
|
#region 质量基础信息
|
||||||
@@ -1859,6 +1886,7 @@ namespace BLL
|
|||||||
/// 项目地图
|
/// 项目地图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string ProjectProjectMapMenuId = "F266456A-991F-45A3-BCD6-CF2515D71E39";
|
public const string ProjectProjectMapMenuId = "F266456A-991F-45A3-BCD6-CF2515D71E39";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -3481,6 +3509,15 @@ namespace BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 报表管理
|
#region 报表管理
|
||||||
|
/// <summary>
|
||||||
|
/// 节能节水
|
||||||
|
/// </summary>
|
||||||
|
public const string EnergyWaterConservationMenuId = "CCA0E136-9AC7-4A14-BC1F-20758A99E88E";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 能源统计
|
||||||
|
/// </summary>
|
||||||
|
public const string EnergyStatisticsMenuId = "D4541B37-7876-40D8-A48B-AEF8FCDAEE9F";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
using Model;
|
||||||
|
using NPOI.HSSF.EventUserModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BLL
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 能源统计
|
||||||
|
/// </summary>
|
||||||
|
public class EnergyStatisticsService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键获取能源统计
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyStatisticsId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.EnergyReport_EnergyStatistics GetEnergyStatisticsById(string energyStatisticsId)
|
||||||
|
{
|
||||||
|
return Funs.DB.EnergyReport_EnergyStatistics.FirstOrDefault(e => e.EnergyStatisticsId == energyStatisticsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加能源统计
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyStatistics"></param>
|
||||||
|
public static void AddEnergyStatistics(Model.EnergyReport_EnergyStatistics energyStatistics)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyStatistics newEnergyStatistics = new EnergyReport_EnergyStatistics();
|
||||||
|
newEnergyStatistics.EnergyStatisticsId = energyStatistics.EnergyStatisticsId;
|
||||||
|
newEnergyStatistics.ProjectId = energyStatistics.ProjectId;
|
||||||
|
newEnergyStatistics.UnitId = energyStatistics.UnitId;
|
||||||
|
newEnergyStatistics.ReportDate = energyStatistics.ReportDate;
|
||||||
|
newEnergyStatistics.EnergyId = energyStatistics.EnergyId;
|
||||||
|
newEnergyStatistics.Consumption = energyStatistics.Consumption;
|
||||||
|
newEnergyStatistics.Amount = energyStatistics.Amount;
|
||||||
|
newEnergyStatistics.UnitPrice = energyStatistics.UnitPrice;
|
||||||
|
newEnergyStatistics.ConversionUnit = energyStatistics.ConversionUnit;
|
||||||
|
newEnergyStatistics.ConvertedQuantity = energyStatistics.ConvertedQuantity;
|
||||||
|
newEnergyStatistics.TCE = energyStatistics.TCE;
|
||||||
|
newEnergyStatistics.CompileMan = energyStatistics.CompileMan;
|
||||||
|
newEnergyStatistics.CompileDate = energyStatistics.CompileDate;
|
||||||
|
db.EnergyReport_EnergyStatistics.InsertOnSubmit(newEnergyStatistics);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyStatistics"></param>
|
||||||
|
public static void UpdateEnergyStatistics(Model.EnergyReport_EnergyStatistics energyStatistics)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyStatistics newEnergyStatistics = db.EnergyReport_EnergyStatistics.FirstOrDefault(e => e.EnergyStatisticsId == energyStatistics.EnergyStatisticsId);
|
||||||
|
if (newEnergyStatistics != null)
|
||||||
|
{
|
||||||
|
newEnergyStatistics.ProjectId = energyStatistics.ProjectId;
|
||||||
|
newEnergyStatistics.UnitId = energyStatistics.UnitId;
|
||||||
|
newEnergyStatistics.ReportDate = energyStatistics.ReportDate;
|
||||||
|
newEnergyStatistics.EnergyId = energyStatistics.EnergyId;
|
||||||
|
newEnergyStatistics.Consumption = energyStatistics.Consumption;
|
||||||
|
newEnergyStatistics.Amount = energyStatistics.Amount;
|
||||||
|
newEnergyStatistics.UnitPrice = energyStatistics.UnitPrice;
|
||||||
|
newEnergyStatistics.ConversionUnit = energyStatistics.ConversionUnit;
|
||||||
|
newEnergyStatistics.ConvertedQuantity = energyStatistics.ConvertedQuantity;
|
||||||
|
newEnergyStatistics.TCE = energyStatistics.TCE;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键删除能源统计
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyStatisticsId"></param>
|
||||||
|
public static void DeleteEnergyStatisticsById(string energyStatisticsId)
|
||||||
|
{
|
||||||
|
CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyStatistics energyStatistics = db.EnergyReport_EnergyStatistics.FirstOrDefault(e => e.EnergyStatisticsId == energyStatisticsId);
|
||||||
|
if (energyStatistics != null)
|
||||||
|
{
|
||||||
|
db.EnergyReport_EnergyStatistics.DeleteOnSubmit(energyStatistics);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
using FastReport.Wizards;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BLL
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 节能节水目标指标
|
||||||
|
/// </summary>
|
||||||
|
public class EnergyWaterConservationService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键获取节能节水指标
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyWaterConservationId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.EnergyReport_EnergyWaterConservation GetEnergyWaterConservationById(string energyWaterConservationId)
|
||||||
|
{
|
||||||
|
return Funs.DB.EnergyReport_EnergyWaterConservation.FirstOrDefault(e => e.EnergyWaterConservationId == energyWaterConservationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyWaterConservation"></param>
|
||||||
|
public static void AddEnergyWaterConservation(Model.EnergyReport_EnergyWaterConservation energyWaterConservation)
|
||||||
|
{
|
||||||
|
Model.CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyWaterConservation newEnwa = new Model.EnergyReport_EnergyWaterConservation();
|
||||||
|
newEnwa.EnergyWaterConservationId = energyWaterConservation.EnergyWaterConservationId;
|
||||||
|
newEnwa.ProjectId = energyWaterConservation.ProjectId;
|
||||||
|
newEnwa.EnergySavingIndex = energyWaterConservation.EnergySavingIndex;
|
||||||
|
newEnwa.WaterSavingIndex = energyWaterConservation.WaterSavingIndex;
|
||||||
|
newEnwa.EnergySavingSchemes = energyWaterConservation.EnergySavingSchemes;
|
||||||
|
newEnwa.WaterSavingSchemes = energyWaterConservation.WaterSavingSchemes;
|
||||||
|
newEnwa.SelfEvaluation = energyWaterConservation.SelfEvaluation;
|
||||||
|
newEnwa.Summary = energyWaterConservation.Summary;
|
||||||
|
newEnwa.SupportingDocuments = energyWaterConservation.SupportingDocuments;
|
||||||
|
newEnwa.ActualEnergySaving = energyWaterConservation.ActualEnergySaving;
|
||||||
|
newEnwa.ActualWaterSaving = energyWaterConservation.ActualWaterSaving;
|
||||||
|
newEnwa.EnergySavingCompletionRate = energyWaterConservation.EnergySavingCompletionRate;
|
||||||
|
newEnwa.WaterSavingCompletionRate = energyWaterConservation.WaterSavingCompletionRate;
|
||||||
|
newEnwa.CompileMan = energyWaterConservation.CompileMan;
|
||||||
|
newEnwa.CompileDate = energyWaterConservation.CompileDate;
|
||||||
|
newEnwa.Remarks = energyWaterConservation.Remarks;
|
||||||
|
db.EnergyReport_EnergyWaterConservation.InsertOnSubmit(newEnwa);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyWaterConservation"></param>
|
||||||
|
public static void UpdateEnergyWaterConservation(Model.EnergyReport_EnergyWaterConservation energyWaterConservation)
|
||||||
|
{
|
||||||
|
Model.CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyWaterConservation newEnwa = db.EnergyReport_EnergyWaterConservation.FirstOrDefault(e => e.EnergyWaterConservationId == energyWaterConservation.EnergyWaterConservationId);
|
||||||
|
if (newEnwa != null)
|
||||||
|
{
|
||||||
|
newEnwa.ProjectId = energyWaterConservation.ProjectId;
|
||||||
|
newEnwa.EnergySavingIndex = energyWaterConservation.EnergySavingIndex;
|
||||||
|
newEnwa.WaterSavingIndex = energyWaterConservation.WaterSavingIndex;
|
||||||
|
newEnwa.EnergySavingSchemes = energyWaterConservation.EnergySavingSchemes;
|
||||||
|
newEnwa.WaterSavingSchemes = energyWaterConservation.WaterSavingSchemes;
|
||||||
|
newEnwa.SelfEvaluation = energyWaterConservation.SelfEvaluation;
|
||||||
|
newEnwa.Summary = energyWaterConservation.Summary;
|
||||||
|
newEnwa.SupportingDocuments = energyWaterConservation.SupportingDocuments;
|
||||||
|
newEnwa.ActualEnergySaving = energyWaterConservation.ActualEnergySaving;
|
||||||
|
newEnwa.ActualWaterSaving = energyWaterConservation.ActualWaterSaving;
|
||||||
|
newEnwa.EnergySavingCompletionRate = energyWaterConservation.EnergySavingCompletionRate;
|
||||||
|
newEnwa.WaterSavingCompletionRate = energyWaterConservation.WaterSavingCompletionRate;
|
||||||
|
newEnwa.Remarks = energyWaterConservation.Remarks;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键删除节能节水目标指标
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="energyWaterConservationId"></param>
|
||||||
|
public static void DeleteEnergyWaterConservationById(string energyWaterConservationId)
|
||||||
|
{
|
||||||
|
Model.CNPCDB db = Funs.DB;
|
||||||
|
Model.EnergyReport_EnergyWaterConservation newEnwa = db.EnergyReport_EnergyWaterConservation.FirstOrDefault(e => e.EnergyWaterConservationId == energyWaterConservationId);
|
||||||
|
if (newEnwa != null)
|
||||||
|
{
|
||||||
|
db.EnergyReport_EnergyWaterConservation.DeleteOnSubmit(newEnwa);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.SqlServer.Dts.Runtime;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
using Microsoft.SqlServer.Dts.Runtime;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Model;
|
using Model;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@@ -43,9 +44,33 @@ namespace BLL
|
|||||||
/// <param name="IdentityCard"></param>
|
/// <param name="IdentityCard"></param>
|
||||||
/// <param name="year"></param>
|
/// <param name="year"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Model.ScoreFlowLog GetScoreFlowLogByIdentityCard(string IdentityCard, int year)
|
public static Model.ScoreFlowLog GetScoreFlowLogByIdentityCard(string IdentityCard, int year, DateTime compileDate)
|
||||||
{
|
{
|
||||||
return Funs.DB.ScoreFlowLog.Where(e => e.IdentityCard == IdentityCard && e.Year == year).OrderByDescending(x => x.CompileDate).FirstOrDefault();
|
return Funs.DB.ScoreFlowLog.Where(e => e.IdentityCard == IdentityCard && e.Year == year && e.CompileDate <= compileDate).OrderByDescending(x => x.CompileDate).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据数据来源id获取人员计分流水
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IdentityCard"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="dataSourceId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.ScoreFlowLog GetScoreFlowLogByDataSourceId(string IdentityCard, int year, string dataSourceId)
|
||||||
|
{
|
||||||
|
return Funs.DB.ScoreFlowLog.FirstOrDefault(e => e.IdentityCard == IdentityCard && e.Year == year && e.DataSourceId == dataSourceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据时间获取比当前年份的人员比时间后的数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IdentityCard"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="compliedate"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.ScoreFlowLog> GetScoreFlowLogByCompileDate(string IdentityCard, int year, DateTime compliedate)
|
||||||
|
{
|
||||||
|
return (from x in Funs.DB.ScoreFlowLog where x.IdentityCard == IdentityCard && x.Year == year && x.CompileDate > compliedate select x).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -74,6 +99,8 @@ namespace BLL
|
|||||||
newModel.CompileDate = model.CompileDate;
|
newModel.CompileDate = model.CompileDate;
|
||||||
newModel.CompileMan = model.CompileMan;
|
newModel.CompileMan = model.CompileMan;
|
||||||
newModel.CompileManId = model.CompileManId;
|
newModel.CompileManId = model.CompileManId;
|
||||||
|
newModel.DataSourceId = model.DataSourceId;
|
||||||
|
newModel.CheckDate = model.CheckDate;
|
||||||
Funs.DB.ScoreFlowLog.InsertOnSubmit(newModel);
|
Funs.DB.ScoreFlowLog.InsertOnSubmit(newModel);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
@@ -88,9 +115,9 @@ namespace BLL
|
|||||||
if (newModel != null)
|
if (newModel != null)
|
||||||
{
|
{
|
||||||
//newModel.Id = model.Id;
|
//newModel.Id = model.Id;
|
||||||
//newModel.Year = model.Year;
|
newModel.Year = model.Year;
|
||||||
//newModel.IdentityCard = model.IdentityCard;
|
newModel.IdentityCard = model.IdentityCard;
|
||||||
//newModel.UserName = model.UserName;
|
newModel.UserName = model.UserName;
|
||||||
newModel.Type = model.Type;
|
newModel.Type = model.Type;
|
||||||
newModel.Score = model.Score;
|
newModel.Score = model.Score;
|
||||||
newModel.CurrentScore = model.CurrentScore;
|
newModel.CurrentScore = model.CurrentScore;
|
||||||
@@ -103,9 +130,11 @@ namespace BLL
|
|||||||
newModel.UnitName = model.UnitName;
|
newModel.UnitName = model.UnitName;
|
||||||
newModel.ProjectName = model.ProjectName;
|
newModel.ProjectName = model.ProjectName;
|
||||||
newModel.Remark = model.Remark;
|
newModel.Remark = model.Remark;
|
||||||
newModel.CompileDate = model.CompileDate;
|
//newModel.CompileDate = model.CompileDate;
|
||||||
newModel.CompileMan = model.CompileMan;
|
//newModel.CompileMan = model.CompileMan;
|
||||||
newModel.CompileManId = model.CompileManId;
|
//newModel.CompileManId = model.CompileManId;
|
||||||
|
newModel.DataSourceId = model.DataSourceId;
|
||||||
|
newModel.CheckDate = model.CheckDate;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,5 +156,16 @@ namespace BLL
|
|||||||
//BLL.LogService.AddSys_Log(opUser, model.Id, model.Id, BLL.Const.ProjectScoreFlowLogMenuId, BLL.Const.BtnDelete);
|
//BLL.LogService.AddSys_Log(opUser, model.Id, model.Id, BLL.Const.ProjectScoreFlowLogMenuId, BLL.Const.BtnDelete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void DeleteScoreFlowLogByDataSourceId(string IdentityCard, int year, string dataSourceId)
|
||||||
|
{
|
||||||
|
var db = Funs.DB;
|
||||||
|
Model.ScoreFlowLog model = db.ScoreFlowLog.FirstOrDefault(x => x.IdentityCard == IdentityCard && x.Year == year && x.DataSourceId == dataSourceId);
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
db.ScoreFlowLog.DeleteOnSubmit(model);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
using Model;
|
using Model;
|
||||||
|
using NPOI.SS.UserModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
@@ -29,6 +32,23 @@ namespace BLL
|
|||||||
return Funs.DB.ScoreUser.Where(e => e.IdentityCard == IdentityCard && e.Year == year).OrderByDescending(x => x.CompileDate).FirstOrDefault();
|
return Funs.DB.ScoreUser.Where(e => e.IdentityCard == IdentityCard && e.Year == year).OrderByDescending(x => x.CompileDate).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据数据来源id获取人员计分记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IdentityCard"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="dataSourceId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.ScoreUser GetScoreUserByDataSourceId(string IdentityCard, int year, string dataSourceId)
|
||||||
|
{
|
||||||
|
return Funs.DB.ScoreUser.FirstOrDefault(e => e.IdentityCard == IdentityCard && e.Year == year && e.DataSourceId == dataSourceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Model.ScoreUser> GetScoreUserByCompileDate(string IdentityCard, int year, DateTime compliedate)
|
||||||
|
{
|
||||||
|
return (from x in Funs.DB.ScoreUser where x.IdentityCard == IdentityCard && x.Year == year && x.CompileDate > compliedate select x).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 增加人员得分
|
/// 增加人员得分
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -42,6 +62,8 @@ namespace BLL
|
|||||||
newModel.UserName = model.UserName;
|
newModel.UserName = model.UserName;
|
||||||
newModel.Score = model.Score;
|
newModel.Score = model.Score;
|
||||||
newModel.CompileDate = model.CompileDate;
|
newModel.CompileDate = model.CompileDate;
|
||||||
|
newModel.DataSourceId = model.DataSourceId;
|
||||||
|
newModel.CheckDate = model.CheckDate;
|
||||||
Funs.DB.ScoreUser.InsertOnSubmit(newModel);
|
Funs.DB.ScoreUser.InsertOnSubmit(newModel);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
@@ -56,11 +78,13 @@ namespace BLL
|
|||||||
if (newModel != null)
|
if (newModel != null)
|
||||||
{
|
{
|
||||||
//newModel.Id = model.Id;
|
//newModel.Id = model.Id;
|
||||||
//newModel.Year = model.Year;
|
newModel.Year = model.Year;
|
||||||
//newModel.IdentityCard = model.IdentityCard;
|
newModel.IdentityCard = model.IdentityCard;
|
||||||
//newModel.UserName = model.UserName;
|
newModel.UserName = model.UserName;
|
||||||
newModel.Score = model.Score;
|
newModel.Score = model.Score;
|
||||||
newModel.CompileDate = model.CompileDate;
|
//newModel.CompileDate = model.CompileDate;
|
||||||
|
newModel.DataSourceId = model.DataSourceId;
|
||||||
|
newModel.CheckDate = model.CheckDate;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,5 +104,22 @@ namespace BLL
|
|||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据数据来源Id删除人员得分记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IdentityCard"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="dataSourceId"></param>
|
||||||
|
public static void DeleteScoreUserByDataSourceId(string IdentityCard, int year, string dataSourceId)
|
||||||
|
{
|
||||||
|
var db = Funs.DB;
|
||||||
|
Model.ScoreUser model = db.ScoreUser.FirstOrDefault(e => e.IdentityCard == IdentityCard && e.Year == year && e.DataSourceId == dataSourceId);
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
db.ScoreUser.DeleteOnSubmit(model);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnergySettings.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.EnergySettings" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title>能源设置</title>
|
||||||
|
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
|
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="能源设置" Layout="HBox" ShowHeader="false">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" Title="能源设置" ShowHeader="false" EnableCollapse="true" PageSize="10" EnableColumnLines="true"
|
||||||
|
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="750px" ForceFit="true"
|
||||||
|
DataKeyNames="EnergyId" DataIDField="EnergyId" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
|
||||||
|
<Columns>
|
||||||
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||||
|
<f:RenderField Width="180px" ColumnID="EnergyName" DataField="EnergyName" FieldType="String"
|
||||||
|
HeaderText="能源名称" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="EnergyUnit" DataField="EnergyUnit" FieldType="String"
|
||||||
|
HeaderText="正常计量上报单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="400px" ColumnID="ReferenceCoefficient" DataField="ReferenceCoefficient" FieldType="String"
|
||||||
|
HeaderText="参考折标准煤系数" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
|
||||||
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
</Listeners>
|
||||||
|
<PageItems>
|
||||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
</f:ToolbarSeparator>
|
||||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
</f:ToolbarText>
|
||||||
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
|
</f:DropDownList>
|
||||||
|
</PageItems>
|
||||||
|
</f:Grid>
|
||||||
|
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
|
||||||
|
LabelWidth="80px" BodyPadding="5px" Width="350px">
|
||||||
|
<Items>
|
||||||
|
<f:HiddenField ID="hfFormID" runat="server">
|
||||||
|
</f:HiddenField>
|
||||||
|
<f:TextBox ID="txtEnergyName" Label="能源名称" ShowRedStar="true" Required="true" runat="server"
|
||||||
|
LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelWidth="150px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtEnergyUnit" Label="正常计量上报单位" ShowRedStar="true" Required="true" runat="server"
|
||||||
|
LabelAlign="right" LabelWidth="150px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:NumberBox ID="txtReferenceCoefficient" runat="server" Label="参考折标准煤系数" LabelAlign="right" NoNegative="true" DecimalPrecision="4" LabelWidth="150px">
|
||||||
|
</f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server">
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="click" Handler="onNewButtonClick" />
|
||||||
|
</Listeners>
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnDelete" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?"
|
||||||
|
OnClick="btnDelete_Click" runat="server">
|
||||||
|
</f:Button>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</f:SimpleForm>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||||
|
Icon="Pencil" runat="server" Text="编辑" >
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||||
|
Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||||
|
</f:MenuButton>
|
||||||
|
</f:Menu>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
// 返回false,来阻止浏览器右键菜单
|
||||||
|
function onRowContextMenu(event, rowId) {
|
||||||
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadGrid() {
|
||||||
|
__doPostBack(null, 'reloadGrid');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var gridClientID = '<%= Grid1.ClientID %>';
|
||||||
|
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
|
||||||
|
var btnSaveClientID = '<%= btnSave.ClientID %>';
|
||||||
|
|
||||||
|
var formClientID = '<%= SimpleForm1.ClientID %>';
|
||||||
|
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
|
||||||
|
var txtEnergyNameClientID = '<%= txtEnergyName.ClientID %>';
|
||||||
|
var txtEnergyUnitClientID = '<%= txtEnergyUnit.ClientID %>';
|
||||||
|
var txtReferenceCoefficientClientID = '<%=txtReferenceCoefficient.ClientID %>';
|
||||||
|
|
||||||
|
function onGridRowSelect(event, rowId) {
|
||||||
|
var grid = F(gridClientID);
|
||||||
|
|
||||||
|
// 启用删除按钮
|
||||||
|
F(btnDeleteClientID).enable();
|
||||||
|
|
||||||
|
// 当前行数据
|
||||||
|
var rowValue = grid.getRowValue(rowId);
|
||||||
|
|
||||||
|
// 使用当前行数据填充表单字段
|
||||||
|
F(hfFormIDClientID).setValue(rowId);
|
||||||
|
F(txtEnergyNameClientID).setValue(rowValue['EnergyName']);
|
||||||
|
F(txtEnergyUnitClientID).setValue(rowValue['EnergyUnit']);
|
||||||
|
F(txtReferenceCoefficientClientID).setValue(rowValue['ReferenceCoefficient']);
|
||||||
|
|
||||||
|
// 更新保存按钮文本
|
||||||
|
// F(btnSaveClientID).setText('保存数据(编辑)');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onNewButtonClick() {
|
||||||
|
// 重置表单字段
|
||||||
|
F(formClientID).reset();
|
||||||
|
F(hfFormIDClientID).reset();
|
||||||
|
// 清空表格选中行
|
||||||
|
F(gridClientID).clearSelections();
|
||||||
|
// 禁用删除按钮
|
||||||
|
F(btnDeleteClientID).disable();
|
||||||
|
|
||||||
|
// 更新保存按钮文本
|
||||||
|
// F(btnSaveClientID).setText('保存数据(新增)');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,274 @@
|
|||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo
|
||||||
|
{
|
||||||
|
public partial class EnergySettings : PageBase
|
||||||
|
{
|
||||||
|
#region 加载
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
// 绑定表格
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
var q = from x in Funs.DB.Base_Energy orderby x.EnergyName select x;
|
||||||
|
Grid1.RecordCount = q.Count();
|
||||||
|
// 2.获取当前分页数据
|
||||||
|
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分页
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private List<Model.Base_Energy> GetPagedDataTable(int pageIndex, int pageSize)
|
||||||
|
{
|
||||||
|
List<Model.Base_Energy> source = (from x in Funs.DB.Base_Energy orderby x.EnergyName select x).ToList();
|
||||||
|
List<Model.Base_Energy> paged = new List<Model.Base_Energy>();
|
||||||
|
|
||||||
|
int rowbegin = pageIndex * pageSize;
|
||||||
|
int rowend = (pageIndex + 1) * pageSize;
|
||||||
|
if (rowend > source.Count())
|
||||||
|
{
|
||||||
|
rowend = source.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = rowbegin; i < rowend; i++)
|
||||||
|
{
|
||||||
|
paged.Add(source[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return paged;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 改变索引事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageIndex = e.NewPageIndex;
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 分页下拉选择
|
||||||
|
/// <summary>
|
||||||
|
/// 分页下拉选择
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除
|
||||||
|
/// <summary>
|
||||||
|
/// 删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var getV = BLL.EnergySettingsService.GetEnergyById(hfFormID.Text);
|
||||||
|
if (getV != null)
|
||||||
|
{
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, getV.EnergyName, getV.EnergyId, BLL.Const.EnergyMenuId, BLL.Const.BtnDelete);
|
||||||
|
BLL.EnergySettingsService.DeleteEnergyById(getV.EnergyId);
|
||||||
|
// 重新绑定表格,并模拟点击[新增按钮]
|
||||||
|
BindGrid();
|
||||||
|
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 右键删除事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DeleteData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除方法
|
||||||
|
/// </summary>
|
||||||
|
private void DeleteData()
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
|
{
|
||||||
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
|
var getV = BLL.EnergySettingsService.GetEnergyById(hfFormID.Text);
|
||||||
|
if (getV != null)
|
||||||
|
{
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, getV.EnergyName, getV.EnergyId, BLL.Const.EnergyMenuId, BLL.Const.BtnDelete);
|
||||||
|
BLL.EnergySettingsService.DeleteEnergyById(rowID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BindGrid();
|
||||||
|
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 编辑
|
||||||
|
/// <summary>
|
||||||
|
/// 右键编辑事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.EditData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑数据方法
|
||||||
|
/// </summary>
|
||||||
|
private void EditData()
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string Id = Grid1.SelectedRowID;
|
||||||
|
var energy = BLL.EnergySettingsService.GetEnergyById(Id);
|
||||||
|
if (energy != null)
|
||||||
|
{
|
||||||
|
this.txtEnergyName.Text = energy.EnergyName;
|
||||||
|
this.txtEnergyUnit.Text = energy.EnergyUnit;
|
||||||
|
this.txtReferenceCoefficient.Text = energy.ReferenceCoefficient.HasValue ? energy.ReferenceCoefficient.ToString() : "";
|
||||||
|
hfFormID.Text = Id;
|
||||||
|
this.btnDelete.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存
|
||||||
|
/// <summary>
|
||||||
|
/// 保存按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string strRowID = hfFormID.Text;
|
||||||
|
Model.Base_Energy energy = new Model.Base_Energy
|
||||||
|
{
|
||||||
|
EnergyName = this.txtEnergyName.Text.Trim(),
|
||||||
|
EnergyUnit = this.txtEnergyUnit.Text.Trim()
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(txtReferenceCoefficient.Text.Trim()))
|
||||||
|
{
|
||||||
|
energy.ReferenceCoefficient = Convert.ToDecimal(txtReferenceCoefficient.Text.Trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
ShowNotify("输入的格式错误!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(strRowID))
|
||||||
|
{
|
||||||
|
energy.EnergyId = SQLHelper.GetNewID(typeof(Model.Base_Energy));
|
||||||
|
BLL.EnergySettingsService.AddEnergy(energy);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, energy.EnergyName, energy.EnergyId, BLL.Const.EmergencyMenuId, BLL.Const.BtnAdd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
energy.EnergyId = strRowID;
|
||||||
|
BLL.EnergySettingsService.UpdateEnergy(energy);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, energy.EnergyName, energy.EnergyId, BLL.Const.EmergencyMenuId, BLL.Const.BtnModify);
|
||||||
|
}
|
||||||
|
this.SimpleForm1.Reset();
|
||||||
|
// 重新绑定表格,并点击当前编辑或者新增的行
|
||||||
|
BindGrid();
|
||||||
|
PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, energy.EnergyId));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 验证事故类型名称、编号是否存在
|
||||||
|
/// <summary>
|
||||||
|
/// 验证事故类型名称、编号是否存在
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var q = Funs.DB.Base_Energy.FirstOrDefault(x => x.EnergyName == this.txtEnergyName.Text.Trim() && (x.EnergyId != hfFormID.Text || (hfFormID.Text == null && x.EnergyId != null)));
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("输入的能源名称已存在!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EnergyMenuId);
|
||||||
|
if (buttonList.Count() > 0)
|
||||||
|
{
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
{
|
||||||
|
this.btnNew.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
|
{
|
||||||
|
this.btnMenuEdit.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
{
|
||||||
|
this.btnDelete.Hidden = false;
|
||||||
|
this.btnMenuDelete.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||||
|
{
|
||||||
|
this.btnSave.Hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnergySettings
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarSeparator1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarText1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlPageSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// hfFormID 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.HiddenField hfFormID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergyName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtEnergyName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergyUnit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtEnergyUnit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReferenceCoefficient 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtReferenceCoefficient;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNew 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnDelete 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnDelete;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Menu1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuEdit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDelete 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -403,6 +404,34 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
BindGrid();
|
BindGrid();
|
||||||
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
||||||
|
|
||||||
|
#region 删除对应的扣分流水
|
||||||
|
var u = BLL.UserService.GetUserByUserId(model.RectificationUserId);
|
||||||
|
if (u != null)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = BLL.ScoreFlowLogService.GetScoreFlowLogByDataSourceId(u.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||||
|
if (scoreFlowLog != null)
|
||||||
|
{
|
||||||
|
//删除人员记分流水
|
||||||
|
var updateScoreFlowLogList = BLL.ScoreFlowLogService.GetScoreFlowLogByCompileDate(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.CompileDate);
|
||||||
|
foreach (var item in updateScoreFlowLogList)
|
||||||
|
{
|
||||||
|
item.CurrentScore = item.CurrentScore + (-scoreFlowLog.Score);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.DeleteScoreFlowLogByDataSourceId(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.DataSourceId);
|
||||||
|
|
||||||
|
//删除人员记分情况
|
||||||
|
var updateScoreUserList = BLL.ScoreUserService.GetScoreUserByCompileDate(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.CompileDate);
|
||||||
|
foreach (var item in updateScoreUserList)
|
||||||
|
{
|
||||||
|
item.Score = item.Score + (-scoreFlowLog.Score);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
BLL.ScoreUserService.DeleteScoreUserByDataSourceId(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.DataSourceId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using Model;
|
using Model;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FineUIPro.Web.Check.HSE
|
namespace FineUIPro.Web.Check.HSE
|
||||||
@@ -55,21 +56,34 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
this.drpUnit.SelectedValue = model.UnitId;
|
this.drpUnit.SelectedValue = model.UnitId;
|
||||||
|
this.drpRectificationUser.Items.Clear();
|
||||||
|
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
|
||||||
|
this.drpPMUser.Items.Clear();
|
||||||
|
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, this.drpUnit.SelectedValue, true);
|
||||||
|
|
||||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true);
|
BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true);
|
||||||
if (!string.IsNullOrWhiteSpace(model.ProjectId))
|
if (!string.IsNullOrWhiteSpace(model.ProjectId))
|
||||||
{
|
{
|
||||||
this.drpProject.SelectedValue = model.ProjectId;
|
this.drpProject.SelectedValue = model.ProjectId;
|
||||||
}
|
}
|
||||||
else if (!string.IsNullOrWhiteSpace(model.ProjectName))
|
if (!string.IsNullOrWhiteSpace(model.ProjectName))
|
||||||
{
|
{
|
||||||
this.drpProject.Text = model.ProjectName;
|
this.drpProject.Text = model.ProjectName;
|
||||||
}
|
}
|
||||||
|
var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
|
||||||
|
if (pro != null)
|
||||||
|
{
|
||||||
|
this.txtAddress.Text = pro.ProjectAddress;
|
||||||
|
this.drpPMUser.Items.Clear();
|
||||||
|
BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true);
|
||||||
|
}
|
||||||
|
|
||||||
this.drpClassify.SelectedValue = model.ClassifyId;
|
this.drpClassify.SelectedValue = model.ClassifyId;
|
||||||
BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true);
|
BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true);
|
||||||
if (!string.IsNullOrWhiteSpace(model.ClassifyItemId))
|
if (!string.IsNullOrWhiteSpace(model.ClassifyItemId))
|
||||||
{
|
{
|
||||||
this.drpClassifyItem.SelectedValue = model.ClassifyItemId;
|
this.drpClassifyItem.SelectedValue = model.ClassifyItemId;
|
||||||
}
|
}
|
||||||
this.drpNature.SelectedValue = model.NatureId;
|
this.drpNature.SelectedValue = model.NatureId;
|
||||||
BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, model.NatureId, true);
|
BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, model.NatureId, true);
|
||||||
if (!string.IsNullOrWhiteSpace(model.NatureItemId))
|
if (!string.IsNullOrWhiteSpace(model.NatureItemId))
|
||||||
@@ -311,6 +325,7 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected void SaveData()
|
protected void SaveData()
|
||||||
{
|
{
|
||||||
|
string saveType = string.Empty;//1-新增,2-修改
|
||||||
CheckProblem_Safety model = new CheckProblem_Safety();
|
CheckProblem_Safety model = new CheckProblem_Safety();
|
||||||
model.UnitId = this.drpUnit.SelectedValue;
|
model.UnitId = this.drpUnit.SelectedValue;
|
||||||
model.UnitName = this.drpUnit.SelectedText;
|
model.UnitName = this.drpUnit.SelectedText;
|
||||||
@@ -359,6 +374,7 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
model.Remark = this.txtRemark.Text.Trim();
|
model.Remark = this.txtRemark.Text.Trim();
|
||||||
if (string.IsNullOrWhiteSpace(this.CheckId))
|
if (string.IsNullOrWhiteSpace(this.CheckId))
|
||||||
{
|
{
|
||||||
|
saveType = "1";//新增
|
||||||
//新增
|
//新增
|
||||||
model.CheckId = SQLHelper.GetNewID(typeof(CheckProblem_Safety));
|
model.CheckId = SQLHelper.GetNewID(typeof(CheckProblem_Safety));
|
||||||
this.CheckId = model.CheckId;
|
this.CheckId = model.CheckId;
|
||||||
@@ -369,13 +385,134 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
|
|
||||||
////增加一条编码记录
|
////增加一条编码记录
|
||||||
//BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.SafetyCheckProblemMenuId, model.ProjectId, null, model.CheckId, model.CheckDate);
|
//BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.SafetyCheckProblemMenuId, model.ProjectId, null, model.CheckId, model.CheckDate);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
saveType = "2";//修改
|
||||||
//更新
|
//更新
|
||||||
model.CheckId = this.CheckId;
|
model.CheckId = this.CheckId;
|
||||||
BLL.CheckProblemSafetyService.UpdateCheckProblem(model);
|
BLL.CheckProblemSafetyService.UpdateCheckProblem(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 扣分记录
|
||||||
|
var user = BLL.UserService.GetUserByUserId(model.RectificationUserId);
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
int oldS = 0;
|
||||||
|
DateTime comdate = new DateTime();
|
||||||
|
var scoreFlowLog = BLL.ScoreFlowLogService.GetScoreFlowLogByDataSourceId(user.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||||
|
if (scoreFlowLog != null)
|
||||||
|
{
|
||||||
|
oldS = scoreFlowLog.CurrentScore;
|
||||||
|
comdate = scoreFlowLog.CompileDate;
|
||||||
|
BLL.ScoreFlowLogService.DeleteScoreFlowLogByDataSourceId(user.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||||
|
}
|
||||||
|
var scoreUser = BLL.ScoreUserService.GetScoreUserByDataSourceId(user.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||||
|
if (scoreUser != null)
|
||||||
|
{
|
||||||
|
BLL.ScoreUserService.DeleteScoreUserByDataSourceId(user.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||||
|
}
|
||||||
|
#region 增加积分流水
|
||||||
|
//增加人员记分流水
|
||||||
|
ScoreFlowLog log = new ScoreFlowLog();
|
||||||
|
log.Id = SQLHelper.GetNewID();
|
||||||
|
if (!string.IsNullOrEmpty(txtCheckDate.Text.Trim()))
|
||||||
|
{
|
||||||
|
log.Year = Convert.ToDateTime(txtCheckDate.Text.Trim()).Year;
|
||||||
|
}
|
||||||
|
log.UserId = this.drpRectificationUser.SelectedValue;
|
||||||
|
log.UserName = this.drpRectificationUser.SelectedText;
|
||||||
|
log.IdentityCard = user.IdentityCard;
|
||||||
|
log.UnitId = this.drpUnit.SelectedValue;
|
||||||
|
log.ProjectId = this.drpProject.SelectedValue;
|
||||||
|
log.UnitName = this.drpUnit.SelectedText;
|
||||||
|
log.ProjectName = this.drpProject.SelectedText;
|
||||||
|
log.Item = "安全不符合项";
|
||||||
|
log.LogContent = "隐患问责扣分";
|
||||||
|
log.CheckDate = Convert.ToDateTime(this.txtCheckDate.Text.Trim());
|
||||||
|
if (saveType == "1")
|
||||||
|
{
|
||||||
|
log.CompileDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.CompileDate = comdate;
|
||||||
|
}
|
||||||
|
log.CompileMan = this.CurrUser.UserName;
|
||||||
|
log.CompileManId = this.CurrUser.UserId;
|
||||||
|
log.DataSourceId = this.CheckId;
|
||||||
|
log.Type = 0;//扣分
|
||||||
|
//特别严重(管控红线)扣成0分,严重(危险作业许可)扣除100分,较大扣除50分,一般扣除20分,轻微扣除2分
|
||||||
|
if (drpNature.SelectedValue == BLL.Const.SafetyNatureIdN1)
|
||||||
|
{
|
||||||
|
var sfl = BLL.ScoreFlowLogService.GetScoreFlowLogByIdentityCard(log.IdentityCard, log.Year, log.CompileDate);
|
||||||
|
if (sfl != null)
|
||||||
|
{
|
||||||
|
log.Score = -sfl.CurrentScore;//上一条记录多少分扣多少分
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.Score = -100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (drpNature.SelectedValue == BLL.Const.SafetyNatureIdN2)
|
||||||
|
{
|
||||||
|
log.Score = -100;
|
||||||
|
}
|
||||||
|
else if (drpNature.SelectedValue == BLL.Const.SafetyNatureIdN3)
|
||||||
|
{
|
||||||
|
log.Score = -50;
|
||||||
|
}
|
||||||
|
else if (drpNature.SelectedValue == BLL.Const.SafetyNatureIdN4)
|
||||||
|
{
|
||||||
|
log.Score = -20;
|
||||||
|
}
|
||||||
|
var cs = BLL.ScoreFlowLogService.GetScoreFlowLogByIdentityCard(log.IdentityCard, log.Year, log.CompileDate);
|
||||||
|
if (cs != null)
|
||||||
|
{
|
||||||
|
log.CurrentScore = cs.CurrentScore + log.Score;//记分后人员得分值
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.CurrentScore = 100 + log.Score;
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(log);
|
||||||
|
|
||||||
|
//增加人员记分情况
|
||||||
|
ScoreUser su = new ScoreUser();
|
||||||
|
su.Id = SQLHelper.GetNewID();
|
||||||
|
su.Year = log.Year;
|
||||||
|
su.IdentityCard = log.IdentityCard;
|
||||||
|
su.Score = log.CurrentScore;
|
||||||
|
su.UserName = log.UserName;
|
||||||
|
su.CompileDate = log.CompileDate;
|
||||||
|
su.DataSourceId = this.CheckId;
|
||||||
|
su.CheckDate = log.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(su);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var lastFlowLog = BLL.ScoreFlowLogService.GetScoreFlowLogByCompileDate(user.IdentityCard, log.Year, log.CompileDate);
|
||||||
|
if (lastFlowLog.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in lastFlowLog)
|
||||||
|
{
|
||||||
|
item.CurrentScore = item.CurrentScore - (oldS - log.CurrentScore);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var lastScoreUser = BLL.ScoreUserService.GetScoreUserByCompileDate(user.IdentityCard, su.Year, su.CompileDate);
|
||||||
|
if (lastScoreUser.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in lastScoreUser)
|
||||||
|
{
|
||||||
|
item.Score = item.Score - (oldS - su.Score);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -698,6 +698,82 @@ namespace FineUIPro.Web.Check.HSE
|
|||||||
{
|
{
|
||||||
Funs.DB.CheckProblem_Safety.InsertAllOnSubmit(toInsert);
|
Funs.DB.CheckProblem_Safety.InsertAllOnSubmit(toInsert);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
|
|
||||||
|
#region 扣分记录
|
||||||
|
toInsert = toInsert.OrderBy(x => x.CheckDate).ToList();
|
||||||
|
foreach (var item in toInsert)
|
||||||
|
{
|
||||||
|
ScoreFlowLog log = new ScoreFlowLog();
|
||||||
|
log.Id = SQLHelper.GetNewID();
|
||||||
|
log.Year = item.CheckDate.Year;
|
||||||
|
log.UserId = item.RectificationUserId;
|
||||||
|
log.UserName = item.RectificationUserName;
|
||||||
|
var user = BLL.UserService.GetUserByUserId(item.RectificationUserId);
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
log.IdentityCard = user.IdentityCard;
|
||||||
|
}
|
||||||
|
log.UnitId = item.UnitId;
|
||||||
|
log.ProjectId = item.ProjectId;
|
||||||
|
log.UnitName = item.UnitName;
|
||||||
|
log.ProjectName = item.ProjectName;
|
||||||
|
log.Item = "安全不符合项";
|
||||||
|
log.LogContent = "隐患问责扣分";
|
||||||
|
log.CheckDate = item.CheckDate;
|
||||||
|
log.CompileDate = DateTime.Now;
|
||||||
|
log.CompileMan = this.CurrUser.UserName;
|
||||||
|
log.CompileManId = this.CurrUser.UserId;
|
||||||
|
log.DataSourceId = item.CheckId;
|
||||||
|
log.Type = 0;//扣分
|
||||||
|
//特别严重(管控红线)扣成0分,严重(危险作业许可)扣除100分,较大扣除50分,一般扣除20分,轻微扣除2分
|
||||||
|
if (item.NatureId == BLL.Const.SafetyNatureIdN1)
|
||||||
|
{
|
||||||
|
var sfl = BLL.ScoreFlowLogService.GetScoreFlowLogByIdentityCard(log.IdentityCard, log.Year, log.CompileDate);
|
||||||
|
if (sfl != null)
|
||||||
|
{
|
||||||
|
log.Score = -sfl.CurrentScore;//上一条记录多少分扣多少分
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.Score = -100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (item.NatureId == BLL.Const.SafetyNatureIdN2)
|
||||||
|
{
|
||||||
|
log.Score = -100;
|
||||||
|
}
|
||||||
|
else if (item.NatureId == BLL.Const.SafetyNatureIdN3)
|
||||||
|
{
|
||||||
|
log.Score = -50;
|
||||||
|
}
|
||||||
|
else if (item.NatureId == BLL.Const.SafetyNatureIdN4)
|
||||||
|
{
|
||||||
|
log.Score = -20;
|
||||||
|
}
|
||||||
|
var cs = BLL.ScoreFlowLogService.GetScoreFlowLogByIdentityCard(log.IdentityCard, log.Year, log.CompileDate);
|
||||||
|
if (cs != null)
|
||||||
|
{
|
||||||
|
log.CurrentScore = cs.CurrentScore + log.Score;//记分后人员得分值
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.CurrentScore = 100 + log.Score;
|
||||||
|
}
|
||||||
|
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(log);
|
||||||
|
|
||||||
|
ScoreUser su = new ScoreUser();
|
||||||
|
su.Id = SQLHelper.GetNewID();
|
||||||
|
su.Year = log.Year;
|
||||||
|
su.IdentityCard = log.IdentityCard;
|
||||||
|
su.Score = log.CurrentScore;
|
||||||
|
su.UserName = log.UserName;
|
||||||
|
su.CompileDate = log.CompileDate;
|
||||||
|
su.DataSourceId = log.DataSourceId;
|
||||||
|
su.CheckDate = log.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(su);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
|
ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
|||||||
@@ -0,0 +1,140 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnergyStatistics.aspx.cs" Inherits="FineUIPro.Web.EnergyReport.EnergyStatistics" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>能源统计</title>
|
||||||
|
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
|
<style>
|
||||||
|
.f-grid-row-summary .f-grid-cell-text {
|
||||||
|
font-weight: bold;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="能源统计" EnableCollapse="true"
|
||||||
|
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="EnergyStatisticsId"
|
||||||
|
AllowCellEditing="true" ClicksToEdit="2" DataIDField="EnergyStatisticsId" AllowSorting="true"
|
||||||
|
SortField="ReportDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||||
|
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableSummary="true" SummaryPosition="Flow"
|
||||||
|
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpEnergyId" runat="server" Label="能源名称" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpEnergyId_SelectedIndexChanged" Width="300px">
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
|
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="120px" ColumnID="EnergyName" DataField="EnergyName" SortField="EnergyName"
|
||||||
|
FieldType="String" HeaderText="能源名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:GroupField ID="gfCurrentMonth" runat="server" HeaderText="本月用量" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Columns>
|
||||||
|
<f:RenderField Width="150px" ColumnID="EnergyUnit" DataField="EnergyUnit" SortField="EnergyUnit"
|
||||||
|
FieldType="String" HeaderText="正常计量上报单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="Consumption" DataField="Consumption" SortField="Consumption"
|
||||||
|
FieldType="String" HeaderText="用量" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="Amount" DataField="Amount" SortField="Amount"
|
||||||
|
FieldType="String" HeaderText="消费金额(元)" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice"
|
||||||
|
FieldType="String" HeaderText="单价" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:GroupField ID="GroupField1" runat="server" HeaderText="转换吨标计量" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Columns>
|
||||||
|
<f:RenderField Width="150px" ColumnID="ConversionUnit" DataField="ConversionUnit" SortField="ConversionUnit"
|
||||||
|
FieldType="String" HeaderText="转换单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="ConvertedQuantity" DataField="ConvertedQuantity" SortField="ConvertedQuantity"
|
||||||
|
FieldType="String" HeaderText="用量" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
</f:GroupField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="TCE" DataField="TCE" SortField="TCE"
|
||||||
|
FieldType="String" HeaderText="吨标煤" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
</f:GroupField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||||
|
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="填报日期" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
</Listeners>
|
||||||
|
<PageItems>
|
||||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
</f:ToolbarSeparator>
|
||||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
</f:ToolbarText>
|
||||||
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
|
</f:DropDownList>
|
||||||
|
</PageItems>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Window ID="Window1" Title="能源统计" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||||
|
Width="1000px" Height="560px">
|
||||||
|
</f:Window>
|
||||||
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true"
|
||||||
|
Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true"
|
||||||
|
Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click">
|
||||||
|
</f:MenuButton>
|
||||||
|
</Items>
|
||||||
|
</f:Menu>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
|
||||||
|
// 返回false,来阻止浏览器右键菜单
|
||||||
|
function onRowContextMenu(event, rowId) {
|
||||||
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,326 @@
|
|||||||
|
using BLL;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
public partial class EnergyStatistics : PageBase
|
||||||
|
{
|
||||||
|
#region 项目id
|
||||||
|
/// <summary>
|
||||||
|
/// 项目id
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
BLL.EnergySettingsService.InitEnergyDropDownList(this.drpEnergyId, true);
|
||||||
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||||
|
{
|
||||||
|
this.ProjectId = Request.Params["projectId"];
|
||||||
|
}
|
||||||
|
////权限按钮方法
|
||||||
|
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||||
|
this.ucTree.ProjectId = this.ProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.btnNew.Hidden = true;
|
||||||
|
this.btnMenuModify.Hidden = true;
|
||||||
|
this.btnMenuDel.Hidden = true;
|
||||||
|
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||||
|
}
|
||||||
|
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||||
|
}
|
||||||
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
// 绑定表格
|
||||||
|
this.BindGrid();
|
||||||
|
btnNew.OnClientClick = Window1.GetShowReference("EnergyStatisticsEdit.aspx") + "return false;";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载树
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string strSql = @"select s.EnergyStatisticsId,
|
||||||
|
s.ProjectId,
|
||||||
|
s.UnitId,
|
||||||
|
s.ReportDate,
|
||||||
|
s.EnergyId,
|
||||||
|
s.Consumption,
|
||||||
|
s.Amount,
|
||||||
|
s.UnitPrice,
|
||||||
|
s.ConversionUnit,
|
||||||
|
s.ConvertedQuantity,
|
||||||
|
s.TCE,
|
||||||
|
s.CompileMan,
|
||||||
|
s.CompileDate,
|
||||||
|
y.EnergyName,
|
||||||
|
y.EnergyUnit,
|
||||||
|
y.ReferenceCoefficient,
|
||||||
|
p.ProjectName,
|
||||||
|
u.UnitName
|
||||||
|
from EnergyReport_EnergyStatistics s
|
||||||
|
left join Base_Energy y on y.EnergyId = s.EnergyId
|
||||||
|
left join Base_Project p on p.ProjectId = s.ProjectId
|
||||||
|
left join Base_Unit u on u.UnitId= s.UnitId WHERE 1=1 ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
|
||||||
|
strSql += " AND s.ProjectId = @ProjectId";
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
|
if (!string.IsNullOrEmpty(this.drpEnergyId.SelectedValue) && this.drpEnergyId.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND s.EnergyId = @energyId";
|
||||||
|
listStr.Add(new SqlParameter("@energyId", this.drpEnergyId.SelectedValue));
|
||||||
|
}
|
||||||
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
|
{
|
||||||
|
strSql += " AND s.UnitId =@unitId";
|
||||||
|
listStr.Add(new SqlParameter("@unitId", this.CurrUser.UnitId));
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
|
|
||||||
|
OutputSummaryData(tb);//求和
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算和
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tb"></param>
|
||||||
|
private void OutputSummaryData(DataTable tb)
|
||||||
|
{
|
||||||
|
//decimal consumption = 0;//用量
|
||||||
|
decimal amount = 0;//消费金额
|
||||||
|
//decimal unitPrice = 0;//单价
|
||||||
|
decimal convertedQuantity = 0; //转换吨标计量
|
||||||
|
decimal tce = 0; //吨标煤
|
||||||
|
foreach (DataRow row in tb.Rows)
|
||||||
|
{
|
||||||
|
//consumption += Convert.ToDecimal(row["Consumption"]);
|
||||||
|
amount += Convert.ToDecimal(row["Amount"]);
|
||||||
|
//unitPrice += Convert.ToDecimal(row["UnitPrice"]);
|
||||||
|
convertedQuantity += Convert.ToDecimal(row["ConvertedQuantity"]);
|
||||||
|
tce += Convert.ToDecimal(row["TCE"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
JObject summary = new JObject();
|
||||||
|
summary.Add("EnergyName", "能源合计");
|
||||||
|
//summary.Add("Consumption", consumption.ToString("F2"));
|
||||||
|
summary.Add("Amount", amount.ToString("F2"));
|
||||||
|
//summary.Add("UnitPrice", unitPrice.ToString("F2"));
|
||||||
|
summary.Add("ConvertedQuantity", convertedQuantity.ToString("G7"));
|
||||||
|
summary.Add("TCE", tce.ToString("G5"));
|
||||||
|
|
||||||
|
Grid1.SummaryData = summary;
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 分页、排序
|
||||||
|
/// <summary>
|
||||||
|
/// 改变索引事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分页下拉选择事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询
|
||||||
|
/// <summary>
|
||||||
|
/// 查询
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void drpEnergyId_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 关闭弹出窗
|
||||||
|
/// <summary>
|
||||||
|
/// 关闭弹出窗
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Request.Params["value"] == "0") ///文件柜时 没有操作权限
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.EnergyStatisticsMenuId);
|
||||||
|
if (buttonList.Count() > 0)
|
||||||
|
{
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
{
|
||||||
|
this.btnNew.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
|
{
|
||||||
|
this.btnMenuModify.Hidden = false;
|
||||||
|
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
{
|
||||||
|
this.btnMenuDel.Hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 编辑
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EnergyStatisticsEdit.aspx?energyStatisticsId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grid双击事件
|
||||||
|
/// <summary>
|
||||||
|
/// Grid行双击事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||||
|
{
|
||||||
|
btnMenuModify_Click(null, null);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除
|
||||||
|
/// <summary>
|
||||||
|
/// 批量删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
|
{
|
||||||
|
var db = Funs.DB;
|
||||||
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
|
{
|
||||||
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
|
if (!string.IsNullOrEmpty(rowID))
|
||||||
|
{
|
||||||
|
BLL.EnergyStatisticsService.DeleteEnergyStatisticsById(rowID);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, rowID, rowID, BLL.Const.EnergyStatisticsMenuId, BLL.Const.BtnDelete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BindGrid();
|
||||||
|
ShowNotify("删除数据成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnergyStatistics
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpEnergyId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpEnergyId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNew 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblNumber 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// gfCurrentMonth 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.GroupField gfCurrentMonth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// GroupField1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.GroupField GroupField1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarSeparator1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarText1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlPageSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Menu1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuModify 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDel 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnergyStatisticsEdit.aspx.cs" Inherits="FineUIPro.Web.EnergyReport.EnergyStatisticsEdit" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>编辑能源统计</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||||
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true">
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:DatePicker ID="txtReportDate" runat="server" Label="填报日期" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true"></f:DatePicker>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpEnergyId" runat="server" Label="能源名称" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpEnergyId_SelectedIndexChanged"></f:DropDownList>
|
||||||
|
<f:TextBox ID="txtEnergyUnit" runat="server" Label="正常计量上报单位" LabelAlign="Right" LabelWidth="150px" Readonly="true"></f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:NumberBox ID="txtConsumption" runat="server" Label="用量" LabelAlign="Right" NoNegative="true" DecimalPrecision="2" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtConsumption_TextChanged"></f:NumberBox>
|
||||||
|
<f:NumberBox ID="txtAmount" runat="server" Label="消费金额(元)" LabelAlign="Right" NoNegative="true" DecimalPrecision="2" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtAmount_TextChanged"></f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:NumberBox ID="txtUnitPrice" runat="server" Label="单价" LabelAlign="Right" NoNegative="true" DecimalPrecision="2" LabelWidth="150px"></f:NumberBox>
|
||||||
|
<f:Label ID="Label1" runat="server"></f:Label>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow ColumnWidths="30% 20% 50%">
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpConversionUnit" runat="server" Label="转换吨标计量" LabelAlign="Right" LabelWidth="150px" Readonly="true">
|
||||||
|
<f:ListItem Value="" Text=""/>
|
||||||
|
<f:ListItem Value="吨" Text="吨" />
|
||||||
|
<f:ListItem Value="立方米" Text="立方米" />
|
||||||
|
<f:ListItem Value="万千瓦时" Text="万千瓦时" />
|
||||||
|
<f:ListItem Value="百万千焦" Text="百万千焦" />
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:NumberBox ID="txtConvertedQuantity" runat="server" NoNegative="true" DecimalPrecision="7" Readonly="true"></f:NumberBox>
|
||||||
|
<f:NumberBox ID="txtTCE" runat="server" Label="吨标煤" LabelAlign="Right" NoNegative="true" DecimalPrecision="5" LabelWidth="150px" Readonly="true"></f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</f:Form>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,313 @@
|
|||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
public partial class EnergyStatisticsEdit : PageBase
|
||||||
|
{
|
||||||
|
#region 定义变量
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
public string EnergyStatisticsId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["EnergyStatisticsId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["EnergyStatisticsId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 项目主键
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList1(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||||
|
BLL.EnergySettingsService.InitEnergyDropDownList(this.drpEnergyId, true);
|
||||||
|
this.EnergyStatisticsId = Request.Params["energyStatisticsId"];
|
||||||
|
if (!string.IsNullOrEmpty(EnergyStatisticsId))
|
||||||
|
{
|
||||||
|
Model.EnergyReport_EnergyStatistics energyStatistics = BLL.EnergyStatisticsService.GetEnergyStatisticsById(this.EnergyStatisticsId);
|
||||||
|
if (energyStatistics != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(energyStatistics.UnitId))
|
||||||
|
{
|
||||||
|
this.drpUnitId.SelectedValue = energyStatistics.UnitId;
|
||||||
|
}
|
||||||
|
if (energyStatistics.ReportDate != null)
|
||||||
|
{
|
||||||
|
this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", energyStatistics.ReportDate);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(energyStatistics.EnergyId))
|
||||||
|
{
|
||||||
|
this.drpEnergyId.SelectedValue = energyStatistics.EnergyId;
|
||||||
|
var energy = BLL.EnergySettingsService.GetEnergyById(this.drpEnergyId.SelectedValue);
|
||||||
|
if (energy != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(energy.EnergyUnit))
|
||||||
|
{
|
||||||
|
this.txtEnergyUnit.Text = energy.EnergyUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.txtConsumption.Text = energyStatistics.Consumption.HasValue ? energyStatistics.Consumption.ToString() : ""; ;
|
||||||
|
this.txtAmount.Text = energyStatistics.Amount.HasValue ? energyStatistics.Amount.ToString() : "";
|
||||||
|
this.txtUnitPrice.Text = energyStatistics.UnitPrice.HasValue ? energyStatistics.UnitPrice.ToString() : "";
|
||||||
|
if (!string.IsNullOrEmpty(energyStatistics.ConversionUnit))
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = energyStatistics.ConversionUnit;
|
||||||
|
}
|
||||||
|
this.txtConvertedQuantity.Text = energyStatistics.ConvertedQuantity.HasValue ? energyStatistics.ConvertedQuantity.ToString() : "";
|
||||||
|
this.txtTCE.Text = energyStatistics.TCE.HasValue ? energyStatistics.TCE.ToString() : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存按钮
|
||||||
|
/// <summary>
|
||||||
|
/// 保存按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.drpUnitId.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpUnitId.SelectedValue))
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.drpEnergyId.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpEnergyId.SelectedValue))
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请选择能源名称!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.SaveData();
|
||||||
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存方法
|
||||||
|
/// <summary>
|
||||||
|
/// 保存数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
private void SaveData()
|
||||||
|
{
|
||||||
|
Model.EnergyReport_EnergyStatistics newData = new Model.EnergyReport_EnergyStatistics();
|
||||||
|
newData.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
newData.UnitId = this.drpUnitId.SelectedValue;
|
||||||
|
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
newData.ReportDate = Convert.ToDateTime(this.txtReportDate.Text.Trim());
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
newData.EnergyId = this.drpEnergyId.SelectedValue;
|
||||||
|
newData.Consumption = Funs.GetNewDecimalOrZero(this.txtConsumption.Text.Trim());
|
||||||
|
newData.Amount = Funs.GetNewDecimalOrZero(this.txtAmount.Text.Trim());
|
||||||
|
newData.UnitPrice = Funs.GetNewDecimalOrZero(this.txtUnitPrice.Text.Trim());
|
||||||
|
if (!string.IsNullOrEmpty(this.drpConversionUnit.SelectedValue))
|
||||||
|
{
|
||||||
|
newData.ConversionUnit = this.drpConversionUnit.SelectedValue.Trim();
|
||||||
|
}
|
||||||
|
newData.ConvertedQuantity = Funs.GetNewDecimalOrZero(this.txtConvertedQuantity.Text.Trim());
|
||||||
|
newData.TCE = Funs.GetNewDecimalOrZero(this.txtTCE.Text.Trim());
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.EnergyStatisticsId))
|
||||||
|
{
|
||||||
|
newData.EnergyStatisticsId = this.EnergyStatisticsId;
|
||||||
|
BLL.EnergyStatisticsService.UpdateEnergyStatistics(newData);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, this.drpEnergyId.SelectedText, this.EnergyStatisticsId, BLL.Const.EnergyStatisticsMenuId, Const.BtnModify);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newData.CompileMan = this.CurrUser.UserId;
|
||||||
|
newData.CompileDate = DateTime.Now;
|
||||||
|
newData.EnergyStatisticsId = SQLHelper.GetNewID();
|
||||||
|
this.EnergyStatisticsId = newData.EnergyStatisticsId;
|
||||||
|
BLL.EnergyStatisticsService.AddEnergyStatistics(newData);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, this.drpEnergyId.SelectedText, this.EnergyStatisticsId, BLL.Const.EnergyStatisticsMenuId, Const.BtnAdd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 联动事件
|
||||||
|
/// <summary>
|
||||||
|
/// 能源下拉选择事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void drpEnergyId_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.txtEnergyUnit.Text = string.Empty;
|
||||||
|
if (this.drpEnergyId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpEnergyId.SelectedValue))
|
||||||
|
{
|
||||||
|
var energy = BLL.EnergySettingsService.GetEnergyById(this.drpEnergyId.SelectedValue);
|
||||||
|
if (energy != null)
|
||||||
|
{
|
||||||
|
this.txtEnergyUnit.Text = energy.EnergyUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单价=消费金额/转换量
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void txtAmount_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.txtAmount.Text.Trim()))
|
||||||
|
{
|
||||||
|
decimal a = Funs.GetNewDecimalOrZero(this.txtAmount.Text.Trim());
|
||||||
|
decimal b = Funs.GetNewDecimalOrZero(this.txtConvertedQuantity.Text.Trim());
|
||||||
|
if (b > 0)
|
||||||
|
{
|
||||||
|
txtUnitPrice.Text = (a / b).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txtUnitPrice.Text = "0.00";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 转换吨标计量=用量*不同能源不同值
|
||||||
|
/// 吨标煤=转换量*参考折标准煤系数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void txtConsumption_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.txtConsumption.Text.Trim()) && this.drpEnergyId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpEnergyId.SelectedValue))
|
||||||
|
{
|
||||||
|
decimal c = Funs.GetNewDecimalOrZero(this.txtConsumption.Text.Trim());
|
||||||
|
var energy = BLL.EnergySettingsService.GetEnergyById(this.drpEnergyId.SelectedValue);
|
||||||
|
if (energy != null)
|
||||||
|
{
|
||||||
|
if (energy.EnergyName.Trim() == "电力")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "万千瓦时";
|
||||||
|
this.txtConvertedQuantity.Text = (c / 10000).ToString();
|
||||||
|
this.txtTCE.Text = ((c / 10000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "汽油")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.73) / 1000).ToString();
|
||||||
|
this.txtTCE.Text = ((c * Convert.ToDecimal(0.73) / 1000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "柴油")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.86) / 1000).ToString();
|
||||||
|
this.txtTCE.Text = ((c * Convert.ToDecimal(0.86) / 1000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "煤油")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.82) / 1000).ToString();
|
||||||
|
this.txtTCE.Text = ((c * Convert.ToDecimal(0.82) / 1000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "燃料油")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.91) / 1000).ToString();
|
||||||
|
this.txtTCE.Text = ((c * Convert.ToDecimal(0.91) / 1000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "润滑油")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.8) / 1000).ToString();
|
||||||
|
this.txtTCE.Text = ((c * Convert.ToDecimal(0.8) / 1000) * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "外购热力")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "百万千焦";
|
||||||
|
this.txtConvertedQuantity.Text = (c * Convert.ToDecimal(0.81)).ToString();
|
||||||
|
this.txtTCE.Text = (c * Convert.ToDecimal(0.81) * energy.ReferenceCoefficient / 6).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "煤炭")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "焦炭")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "管道煤气")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "立方米";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient / 1000).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "天然气(气态)")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "立方米";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient / 1000).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "液化天然气(液态)")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
else if (energy.EnergyName.Trim() == "液化石油气")
|
||||||
|
{
|
||||||
|
this.drpConversionUnit.SelectedValue = "吨";
|
||||||
|
this.txtConvertedQuantity.Text = c.ToString();
|
||||||
|
this.txtTCE.Text = (c * energy.ReferenceCoefficient).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnergyStatisticsEdit
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpUnitId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpUnitId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReportDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker txtReportDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpEnergyId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpEnergyId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergyUnit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtEnergyUnit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtConsumption 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtConsumption;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtAmount 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtAmount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtUnitPrice 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtUnitPrice;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label Label1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpConversionUnit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpConversionUnit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtConvertedQuantity 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtConvertedQuantity;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtTCE 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtTCE;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnergyWaterConservation.aspx.cs" Inherits="FineUIPro.Web.EnergyReport.EnergyWaterConservation" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>节能节水</title>
|
||||||
|
<style>
|
||||||
|
.f-grid-colheader .f-grid-colheader-text {
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.f-grid-row-summary .f-grid-cell-text {
|
||||||
|
font-weight: bold;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
|
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="节能节水" EnableCollapse="true"
|
||||||
|
runat="server" BoxFlex="1" DataKeyNames="EnergyWaterConservationId" DataIDField="EnergyWaterConservationId" AllowSorting="true" SortField="CompileDate"
|
||||||
|
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true" ForceFit="true"
|
||||||
|
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
|
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||||
|
OnRowCommand="Grid1_RowCommand" EnableSummary="true" SummaryPosition="Flow" >
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" Width="280px"
|
||||||
|
EnableEdit="true" ShowLabel="true" LabelWidth="50px">
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Hidden="true">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
|
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="ProjectName" DataField="ProjectName"
|
||||||
|
SortField="ProjectName" FieldType="String" HeaderText="项目" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="EnergySavingIndex" DataField="EnergySavingIndex"
|
||||||
|
SortField="EnergySavingIndex" FieldType="String" HeaderText="节能指标(吨标煤)" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="WaterSavingIndex" DataField="WaterSavingIndex"
|
||||||
|
SortField="WaterSavingIndex" FieldType="String" HeaderText="节水指标(吨)" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="EnergySavingSchemes" DataField="EnergySavingSchemes"
|
||||||
|
SortField="EnergySavingSchemes" FieldType="String" HeaderText="节能措施及方案" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="WaterSavingSchemes" DataField="WaterSavingSchemes"
|
||||||
|
SortField="WaterSavingSchemes" FieldType="String" HeaderText="节水措施及方案" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="SelfEvaluation" DataField="SelfEvaluation"
|
||||||
|
SortField="SelfEvaluation" FieldType="String" HeaderText="节能节水自评" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="Summary" DataField="Summary"
|
||||||
|
SortField="Summary" FieldType="String" HeaderText="节能节水总结" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="ActualEnergySaving" DataField="ActualEnergySaving"
|
||||||
|
SortField="ActualEnergySaving" FieldType="String" HeaderText="实际节能(吨标煤)" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="ActualWaterSaving" DataField="ActualWaterSaving"
|
||||||
|
SortField="ActualWaterSaving" FieldType="String" HeaderText="实际节水(吨)" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="EnergySavingCompletionRate" DataField="EnergySavingCompletionRate"
|
||||||
|
SortField="EnergySavingCompletionRate" FieldType="String" HeaderText="节能完成率" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="WaterSavingCompletionRate" DataField="WaterSavingCompletionRate"
|
||||||
|
SortField="WaterSavingCompletionRate" FieldType="String" HeaderText="节水完成率" TextAlign="Left"
|
||||||
|
HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:TemplateField ColumnID="AttachFile" Width="300px" HeaderText="节能节水相关证明资料" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="labAttachFile" runat="server" Text='<%# ConvertAttachUrl(Eval("EnergyWaterConservationId")) %>' ToolTip="下载节能节水相关证明资料"></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
</Listeners>
|
||||||
|
<PageItems>
|
||||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
</f:ToolbarSeparator>
|
||||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
</f:ToolbarText>
|
||||||
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:ToolbarFill runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
</PageItems>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Window ID="Window1" Title="节能节水" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||||
|
Width="1000px" Height="560px">
|
||||||
|
</f:Window>
|
||||||
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true"
|
||||||
|
Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true"
|
||||||
|
Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click">
|
||||||
|
</f:MenuButton>
|
||||||
|
</Items>
|
||||||
|
</f:Menu>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
|
||||||
|
// 返回false,来阻止浏览器右键菜单
|
||||||
|
function onRowContextMenu(event, rowId) {
|
||||||
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
using BLL;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
public partial class EnergyWaterConservation : PageBase
|
||||||
|
{
|
||||||
|
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
this.drpProjectId.Hidden = true;
|
||||||
|
this.Grid1.Columns[1].Hidden = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true);
|
||||||
|
this.btnNew.Hidden = true;
|
||||||
|
this.btnImport.Hidden = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
btnNew.OnClientClick = Window1.GetShowReference("EnergyWaterConservationEdit.aspx") + "return false;";
|
||||||
|
btnImport.OnClientClick = Window1.GetShowReference("EnergyWaterConservationIn.aspx") + "return false;";
|
||||||
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
// 绑定表格
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private DataTable tb = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
string strSql = @"SELECT W.EnergyWaterConservationId,
|
||||||
|
W.ProjectId,
|
||||||
|
W.EnergySavingIndex,
|
||||||
|
W.WaterSavingIndex,
|
||||||
|
W.EnergySavingSchemes,
|
||||||
|
W.WaterSavingSchemes,
|
||||||
|
W.SelfEvaluation,
|
||||||
|
W.Summary,
|
||||||
|
W.SupportingDocuments,
|
||||||
|
W.ActualEnergySaving,
|
||||||
|
W.ActualWaterSaving,
|
||||||
|
ISNULL(CAST(W.EnergySavingCompletionRate AS VARCHAR(50)),'0') + '%' AS EnergySavingCompletionRate,
|
||||||
|
ISNULL(CAST(W.WaterSavingCompletionRate AS VARCHAR(50)),'0') + '%' AS WaterSavingCompletionRate,
|
||||||
|
W.CompileMan,
|
||||||
|
W.CompileDate,
|
||||||
|
W.Remarks,
|
||||||
|
P.ProjectName
|
||||||
|
FROM EnergyReport_EnergyWaterConservation W
|
||||||
|
LEFT JOIN Base_Project P on P.ProjectId = W.ProjectId WHERE 1=1 ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
strSql += " AND W.ProjectId = @ProjectId";
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue))
|
||||||
|
{
|
||||||
|
strSql += " AND W.ProjectId = @ProjectId";
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.drpProjectId.SelectedValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
|
|
||||||
|
OutputSummaryData();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void OutputSummaryData()
|
||||||
|
{
|
||||||
|
int EnergySavingIndex = 0;
|
||||||
|
int WaterSavingIndex = 0;
|
||||||
|
int ActualEnergySaving = 0;
|
||||||
|
int ActualWaterSaving = 0;
|
||||||
|
foreach (DataRow row in tb.Rows)
|
||||||
|
{
|
||||||
|
EnergySavingIndex += Convert.ToInt32(row["EnergySavingIndex"]);
|
||||||
|
WaterSavingIndex += Convert.ToInt32(row["WaterSavingIndex"]);
|
||||||
|
ActualEnergySaving += Convert.ToInt32(row["ActualEnergySaving"]);
|
||||||
|
ActualWaterSaving += Convert.ToInt32(row["ActualWaterSaving"]);
|
||||||
|
}
|
||||||
|
JObject summary = new JObject();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
summary.Add("tfNumber", "合计");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
summary.Add("ProjectName", "合计");
|
||||||
|
}
|
||||||
|
summary.Add("EnergySavingIndex", EnergySavingIndex.ToString());
|
||||||
|
summary.Add("WaterSavingIndex", WaterSavingIndex.ToString());
|
||||||
|
summary.Add("ActualEnergySaving", ActualEnergySaving.ToString());
|
||||||
|
summary.Add("ActualWaterSaving", ActualWaterSaving.ToString());
|
||||||
|
|
||||||
|
if (EnergySavingIndex > 0)
|
||||||
|
{
|
||||||
|
double rate = (double)ActualEnergySaving / EnergySavingIndex * 100;
|
||||||
|
int roundRate = (int)Math.Round(rate);
|
||||||
|
summary.Add("EnergySavingCompletionRate", roundRate + "%");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
summary.Add("EnergySavingCompletionRate", "0%");
|
||||||
|
}
|
||||||
|
if (WaterSavingIndex > 0)
|
||||||
|
{
|
||||||
|
double rate = (double)ActualWaterSaving / WaterSavingIndex * 100;
|
||||||
|
int roundRate = (int)Math.Round(rate);
|
||||||
|
summary.Add("WaterSavingCompletionRate", roundRate + "%");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
summary.Add("WaterSavingCompletionRate", "0%");
|
||||||
|
}
|
||||||
|
Grid1.SummaryData = summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 表排序、分页、关闭窗口
|
||||||
|
/// <summary>
|
||||||
|
/// 分页
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageIndex = e.NewPageIndex;
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分页显示条数下拉框
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关闭弹出窗
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grid双击事件
|
||||||
|
/// <summary>
|
||||||
|
/// Grid行双击事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||||
|
{
|
||||||
|
btnMenuModify_Click(null, null);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 编辑
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EnergyWaterConservationEdit.aspx?energyWaterConservationId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除
|
||||||
|
/// <summary>
|
||||||
|
/// 批量删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
|
{
|
||||||
|
var db = Funs.DB;
|
||||||
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
|
{
|
||||||
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
|
if (!string.IsNullOrEmpty(rowID))
|
||||||
|
{
|
||||||
|
BLL.EnergyWaterConservationService.DeleteEnergyWaterConservationById(rowID);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, rowID, rowID, BLL.Const.EnergyWaterConservationMenuId, BLL.Const.BtnDelete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BindGrid();
|
||||||
|
ShowNotify("删除数据成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Request.Params["value"] == "0")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EnergyWaterConservationMenuId);
|
||||||
|
if (buttonList.Count() > 0)
|
||||||
|
{
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
{
|
||||||
|
this.btnNew.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
|
{
|
||||||
|
this.btnMenuModify.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
{
|
||||||
|
this.btnMenuDel.Hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grid行点击事件
|
||||||
|
/// <summary>
|
||||||
|
/// Grid行点击事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询
|
||||||
|
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 附件显示
|
||||||
|
/// <summary>
|
||||||
|
/// 附件显示
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected string ConvertAttachUrl(object id)
|
||||||
|
{
|
||||||
|
string url = string.Empty;
|
||||||
|
if (id != null)
|
||||||
|
{
|
||||||
|
var report = BLL.EnergyWaterConservationService.GetEnergyWaterConservationById(id.ToString());
|
||||||
|
if (report != null)
|
||||||
|
{
|
||||||
|
Model.AttachFile file = Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == id.ToString());
|
||||||
|
if (file != null && !string.IsNullOrEmpty(file.AttachUrl))
|
||||||
|
{
|
||||||
|
url = BLL.UploadAttachmentService.ShowAttachment("../", file.AttachUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnergyWaterConservation
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpProjectId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpProjectId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnImport 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnImport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNew 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// labNumber 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// labAttachFile 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label labAttachFile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarSeparator1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarText1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlPageSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Menu1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuModify 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDel 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnergyWaterConservationEdit.aspx.cs" Inherits="FineUIPro.Web.EnergyReport.EnergyWaterConservationEdit" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>编辑节能节水</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||||
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" LabelWidth="150px">
|
||||||
|
</f:DropDownList>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:NumberBox ID="txtEnergySavingIndex" runat="server" Label="节能指标(吨标煤)" LabelAlign="Right" NoNegative="true" NoDecimal="true" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtEnergySavingIndex_TextChanged"></f:NumberBox>
|
||||||
|
<f:NumberBox ID="txtWaterSavingIndex" runat="server" Label="节水指标(吨)" LabelAlign="Right" NoNegative="true" NoDecimal="true" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtWaterSavingIndex_TextChanged"></f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtEnergySavingSchemes" runat="server" Label="节能措施及方案" LabelAlign="Right" LabelWidth="150px" MaxLength="200" Height="80">
|
||||||
|
</f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtWaterSavingSchemes" runat="server" Label="节水措施及方案" LabelAlign="Right" LabelWidth="150px" MaxLength="200" Height="80">
|
||||||
|
</f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtSelfEvaluation" runat="server" Label="节能节水自评" LabelAlign="Right" LabelWidth="150px" MaxLength="200" Height="80">
|
||||||
|
</f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtSummary" runat="server" Label="节能节水总结" LabelAlign="Right" LabelWidth="150px" MaxLength="200" Height="80">
|
||||||
|
</f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:NumberBox ID="txtActualEnergySaving" runat="server" Label="实际节能(吨标煤)" LabelAlign="Right" NoNegative="true" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtEnergySavingIndex_TextChanged"></f:NumberBox>
|
||||||
|
<f:NumberBox ID="txtActualWaterSaving" runat="server" Label="实际节水(吨)" LabelAlign="Right" NoNegative="true" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtWaterSavingIndex_TextChanged"></f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtEnergySavingCompletionRate" runat="server" Label="节能完成率" LabelAlign="Right" LabelWidth="150px" Readonly="true"></f:TextBox>
|
||||||
|
<f:TextBox ID="txtWaterSavingCompletionRate" runat="server" Label="节水完成率" LabelAlign="Right" LabelWidth="150px" Readonly="true"></f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnAttachUrl" Text="相关证明资料" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||||
|
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||||
|
</f:Button>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</f:Form>
|
||||||
|
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||||
|
Height="500px">
|
||||||
|
</f:Window>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
public partial class EnergyWaterConservationEdit : PageBase
|
||||||
|
{
|
||||||
|
#region 定义变量
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
public string EnergyWaterConservationId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["EnergyWaterConservationId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["EnergyWaterConservationId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 项目主键
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.drpProjectId.Hidden = true;
|
||||||
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true);
|
||||||
|
}
|
||||||
|
this.EnergyWaterConservationId = Request.Params["energyWaterConservationId"];
|
||||||
|
if (!string.IsNullOrEmpty(EnergyWaterConservationId))
|
||||||
|
{
|
||||||
|
Model.EnergyReport_EnergyWaterConservation energyWaterConservation = BLL.EnergyWaterConservationService.GetEnergyWaterConservationById(this.EnergyWaterConservationId);
|
||||||
|
if (energyWaterConservation != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(energyWaterConservation.ProjectId))
|
||||||
|
{
|
||||||
|
this.drpProjectId.SelectedValue = energyWaterConservation.ProjectId;
|
||||||
|
}
|
||||||
|
txtEnergySavingIndex.Text = energyWaterConservation.EnergySavingIndex.HasValue ? energyWaterConservation.EnergySavingIndex.ToString() : "";
|
||||||
|
txtWaterSavingIndex.Text = energyWaterConservation.WaterSavingIndex.HasValue ? energyWaterConservation.WaterSavingIndex.ToString() : "";
|
||||||
|
txtEnergySavingSchemes.Text = energyWaterConservation.EnergySavingSchemes;
|
||||||
|
txtWaterSavingSchemes.Text = energyWaterConservation.WaterSavingSchemes;
|
||||||
|
txtSelfEvaluation.Text = energyWaterConservation.SelfEvaluation;
|
||||||
|
txtSummary.Text = energyWaterConservation.Summary;
|
||||||
|
txtActualEnergySaving.Text = energyWaterConservation.ActualEnergySaving.HasValue ? energyWaterConservation.ActualEnergySaving.ToString() : "";
|
||||||
|
txtActualWaterSaving.Text = energyWaterConservation.ActualWaterSaving.HasValue ? energyWaterConservation.ActualWaterSaving.ToString() : "";
|
||||||
|
txtEnergySavingCompletionRate.Text = energyWaterConservation.EnergySavingCompletionRate.HasValue ? energyWaterConservation.EnergySavingCompletionRate.ToString() + "%" : "";
|
||||||
|
txtWaterSavingCompletionRate.Text = energyWaterConservation.WaterSavingCompletionRate.HasValue ? energyWaterConservation.WaterSavingCompletionRate.ToString() + "%" : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存按钮
|
||||||
|
/// <summary>
|
||||||
|
/// 保存按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.SaveData();
|
||||||
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存方法
|
||||||
|
/// <summary>
|
||||||
|
/// 保存数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
private void SaveData()
|
||||||
|
{
|
||||||
|
Model.EnergyReport_EnergyWaterConservation newData = new Model.EnergyReport_EnergyWaterConservation();
|
||||||
|
newData.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
newData.EnergySavingIndex = Funs.GetNewIntOrZero(this.txtEnergySavingIndex.Text.Trim());
|
||||||
|
newData.WaterSavingIndex = Funs.GetNewIntOrZero(this.txtWaterSavingIndex.Text.Trim());
|
||||||
|
newData.EnergySavingSchemes = this.txtEnergySavingSchemes.Text;
|
||||||
|
newData.WaterSavingSchemes = this.txtWaterSavingSchemes.Text;
|
||||||
|
newData.SelfEvaluation = this.txtSelfEvaluation.Text;
|
||||||
|
newData.Summary = this.txtSummary.Text;
|
||||||
|
newData.ActualEnergySaving = Funs.GetNewIntOrZero(this.txtActualEnergySaving.Text.Trim());
|
||||||
|
newData.ActualWaterSaving = Funs.GetNewIntOrZero(this.txtActualWaterSaving.Text.Trim());
|
||||||
|
if (!string.IsNullOrEmpty(this.txtEnergySavingCompletionRate.Text.Trim()))
|
||||||
|
{
|
||||||
|
string ERate = this.txtEnergySavingCompletionRate.Text.TrimEnd('%').Trim();
|
||||||
|
newData.EnergySavingCompletionRate = Funs.GetNewIntOrZero(ERate);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtWaterSavingCompletionRate.Text.Trim()))
|
||||||
|
{
|
||||||
|
string WRate = this.txtWaterSavingCompletionRate.Text.TrimEnd('%').Trim();
|
||||||
|
newData.WaterSavingCompletionRate = Funs.GetNewIntOrZero(WRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.EnergyWaterConservationId))
|
||||||
|
{
|
||||||
|
newData.EnergyWaterConservationId = this.EnergyWaterConservationId;
|
||||||
|
BLL.EnergyWaterConservationService.UpdateEnergyWaterConservation(newData);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, this.EnergyWaterConservationId, this.EnergyWaterConservationId, BLL.Const.EnergyWaterConservationMenuId, Const.BtnModify);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newData.CompileMan = this.CurrUser.UserId;
|
||||||
|
newData.CompileDate = DateTime.Now;
|
||||||
|
newData.EnergyWaterConservationId = SQLHelper.GetNewID();
|
||||||
|
this.EnergyWaterConservationId = newData.EnergyWaterConservationId;
|
||||||
|
BLL.EnergyWaterConservationService.AddEnergyWaterConservation(newData);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, this.EnergyWaterConservationId, this.EnergyWaterConservationId, BLL.Const.EnergyWaterConservationMenuId, Const.BtnAdd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 计算比例
|
||||||
|
/// <summary>
|
||||||
|
/// 计算实际节能(吨标煤)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void txtEnergySavingIndex_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.txtEnergySavingIndex.Text.Trim()) && !string.IsNullOrEmpty(this.txtActualEnergySaving.Text.Trim()))
|
||||||
|
{
|
||||||
|
int a = Funs.GetNewIntOrZero(this.txtActualEnergySaving.Text.Trim());
|
||||||
|
int b = Funs.GetNewIntOrZero(this.txtEnergySavingIndex.Text.Trim());
|
||||||
|
if (b > 0)
|
||||||
|
{
|
||||||
|
double rate = (double)a / b * 100;
|
||||||
|
int roundRate = (int)Math.Round(rate);
|
||||||
|
this.txtEnergySavingCompletionRate.Text = roundRate + "%";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.txtEnergySavingCompletionRate.Text = "0%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.txtEnergySavingCompletionRate.Text = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算实际节水(吨)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void txtWaterSavingIndex_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.txtWaterSavingIndex.Text.Trim()) && !string.IsNullOrEmpty(this.txtActualWaterSaving.Text.Trim()))
|
||||||
|
{
|
||||||
|
int a = Funs.GetNewIntOrZero(this.txtActualWaterSaving.Text.Trim());
|
||||||
|
int b = Funs.GetNewIntOrZero(this.txtWaterSavingIndex.Text.Trim());
|
||||||
|
if (b > 0)
|
||||||
|
{
|
||||||
|
double rate = (double)a / b * 100;
|
||||||
|
int roundRate = (int)Math.Round(rate);
|
||||||
|
this.txtWaterSavingCompletionRate.Text = roundRate + "%";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.txtWaterSavingCompletionRate.Text = "0%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.txtWaterSavingCompletionRate.Text = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 附件上传
|
||||||
|
/// <summary>
|
||||||
|
/// 上传附件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.EnergyWaterConservationId))
|
||||||
|
{
|
||||||
|
SaveData();
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EnergyWaterConservationAttachUrl&menuId={1}", this.EnergyWaterConservationId, BLL.Const.EnergyWaterConservationMenuId)));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
+188
@@ -0,0 +1,188 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.EnergyReport
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnergyWaterConservationEdit
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpProjectId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpProjectId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergySavingIndex 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtEnergySavingIndex;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtWaterSavingIndex 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtWaterSavingIndex;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergySavingSchemes 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextArea txtEnergySavingSchemes;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtWaterSavingSchemes 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextArea txtWaterSavingSchemes;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSelfEvaluation 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextArea txtSelfEvaluation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSummary 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextArea txtSummary;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtActualEnergySaving 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtActualEnergySaving;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtActualWaterSaving 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtActualWaterSaving;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtEnergySavingCompletionRate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtEnergySavingCompletionRate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtWaterSavingCompletionRate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtWaterSavingCompletionRate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnAttachUrl 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnAttachUrl;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// WindowAtt 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Window WindowAtt;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -244,6 +244,7 @@
|
|||||||
<Content Include="BaseInfo\CNProfessional.aspx" />
|
<Content Include="BaseInfo\CNProfessional.aspx" />
|
||||||
<Content Include="BaseInfo\CNProfessionalEdit.aspx" />
|
<Content Include="BaseInfo\CNProfessionalEdit.aspx" />
|
||||||
<Content Include="BaseInfo\CNProfessionalView.aspx" />
|
<Content Include="BaseInfo\CNProfessionalView.aspx" />
|
||||||
|
<Content Include="BaseInfo\EnergySettings.aspx" />
|
||||||
<Content Include="BaseInfo\QualityProblemNature.aspx" />
|
<Content Include="BaseInfo\QualityProblemNature.aspx" />
|
||||||
<Content Include="BaseInfo\QualityProblemNatureItemSave.aspx" />
|
<Content Include="BaseInfo\QualityProblemNatureItemSave.aspx" />
|
||||||
<Content Include="BaseInfo\QualityProblemNatureSave.aspx" />
|
<Content Include="BaseInfo\QualityProblemNatureSave.aspx" />
|
||||||
@@ -338,8 +339,14 @@
|
|||||||
<Content Include="common\mainMenu_SYHSE.aspx" />
|
<Content Include="common\mainMenu_SYHSE.aspx" />
|
||||||
<Content Include="common\mainMenu_SYHSEN.aspx" />
|
<Content Include="common\mainMenu_SYHSEN.aspx" />
|
||||||
<Content Include="common\Menu_FiveStarts.xml" />
|
<Content Include="common\Menu_FiveStarts.xml" />
|
||||||
|
<Content Include="common\Menu_HSSH.xml" />
|
||||||
|
<Content Include="common\Menu_Report.xml" />
|
||||||
|
<Content Include="common\Menu_Staff.xml" />
|
||||||
<Content Include="common\Menu_SubPackManage.xml" />
|
<Content Include="common\Menu_SubPackManage.xml" />
|
||||||
<Content Include="common\Menu_SYHSE.xml" />
|
<Content Include="common\Menu_SYHSE.xml" />
|
||||||
|
<Content Include="common\Menu_S_CQMS.xml" />
|
||||||
|
<Content Include="common\Menu_S_HSSE.xml" />
|
||||||
|
<Content Include="common\Menu_S_Report.xml" />
|
||||||
<Content Include="common\todolist.aspx" />
|
<Content Include="common\todolist.aspx" />
|
||||||
<Content Include="common\Menu_ToDo.xml" />
|
<Content Include="common\Menu_ToDo.xml" />
|
||||||
<Content Include="common\todo.aspx" />
|
<Content Include="common\todo.aspx" />
|
||||||
@@ -659,6 +666,10 @@
|
|||||||
<Content Include="Door\InOutManHours.aspx" />
|
<Content Include="Door\InOutManHours.aspx" />
|
||||||
<Content Include="Door\InOutList.aspx" />
|
<Content Include="Door\InOutList.aspx" />
|
||||||
<Content Include="Door\InOutRecord.aspx" />
|
<Content Include="Door\InOutRecord.aspx" />
|
||||||
|
<Content Include="EnergyReport\EnergyStatistics.aspx" />
|
||||||
|
<Content Include="EnergyReport\EnergyStatisticsEdit.aspx" />
|
||||||
|
<Content Include="EnergyReport\EnergyWaterConservation.aspx" />
|
||||||
|
<Content Include="EnergyReport\EnergyWaterConservationEdit.aspx" />
|
||||||
<Content Include="File\Image\label.png" />
|
<Content Include="File\Image\label.png" />
|
||||||
<Content Include="File\Image\loc.png" />
|
<Content Include="File\Image\loc.png" />
|
||||||
<Content Include="File\Image\SEDIN_Code.jpg" />
|
<Content Include="File\Image\SEDIN_Code.jpg" />
|
||||||
@@ -3246,6 +3257,7 @@
|
|||||||
<Content Include="File\Excel\HJGL_DataOut\设备焊口检测委托单.xlsx" />
|
<Content Include="File\Excel\HJGL_DataOut\设备焊口检测委托单.xlsx" />
|
||||||
<Content Include="File\Excel\HJGL_DataOut\设备焊口返修委托单.xlsx" />
|
<Content Include="File\Excel\HJGL_DataOut\设备焊口返修委托单.xlsx" />
|
||||||
<None Include="Scripts\jquery-2.1.1.intellisense.js" />
|
<None Include="Scripts\jquery-2.1.1.intellisense.js" />
|
||||||
|
<Content Include="Score\ScoreFlowLog.aspx" />
|
||||||
<Content Include="Scripts\jquery-2.1.1.js" />
|
<Content Include="Scripts\jquery-2.1.1.js" />
|
||||||
<Content Include="Scripts\jquery-2.1.1.min.js" />
|
<Content Include="Scripts\jquery-2.1.1.min.js" />
|
||||||
<Content Include="Scripts\nugetexample.js" />
|
<Content Include="Scripts\nugetexample.js" />
|
||||||
@@ -7781,6 +7793,13 @@
|
|||||||
<Compile Include="BaseInfo\CNProfessionalView.aspx.designer.cs">
|
<Compile Include="BaseInfo\CNProfessionalView.aspx.designer.cs">
|
||||||
<DependentUpon>CNProfessionalView.aspx</DependentUpon>
|
<DependentUpon>CNProfessionalView.aspx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\EnergySettings.aspx.cs">
|
||||||
|
<DependentUpon>EnergySettings.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\EnergySettings.aspx.designer.cs">
|
||||||
|
<DependentUpon>EnergySettings.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="BaseInfo\QualityProblemNature.aspx.cs">
|
<Compile Include="BaseInfo\QualityProblemNature.aspx.cs">
|
||||||
<DependentUpon>QualityProblemNature.aspx</DependentUpon>
|
<DependentUpon>QualityProblemNature.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
@@ -10380,6 +10399,34 @@
|
|||||||
<Compile Include="Door\InOutRecord.aspx.designer.cs">
|
<Compile Include="Door\InOutRecord.aspx.designer.cs">
|
||||||
<DependentUpon>InOutRecord.aspx</DependentUpon>
|
<DependentUpon>InOutRecord.aspx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyStatistics.aspx.cs">
|
||||||
|
<DependentUpon>EnergyStatistics.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyStatistics.aspx.designer.cs">
|
||||||
|
<DependentUpon>EnergyStatistics.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyStatisticsEdit.aspx.cs">
|
||||||
|
<DependentUpon>EnergyStatisticsEdit.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyStatisticsEdit.aspx.designer.cs">
|
||||||
|
<DependentUpon>EnergyStatisticsEdit.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyWaterConservation.aspx.cs">
|
||||||
|
<DependentUpon>EnergyWaterConservation.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyWaterConservation.aspx.designer.cs">
|
||||||
|
<DependentUpon>EnergyWaterConservation.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyWaterConservationEdit.aspx.cs">
|
||||||
|
<DependentUpon>EnergyWaterConservationEdit.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EnergyReport\EnergyWaterConservationEdit.aspx.designer.cs">
|
||||||
|
<DependentUpon>EnergyWaterConservationEdit.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="HJGL\BaseInfo\Components.aspx.cs">
|
<Compile Include="HJGL\BaseInfo\Components.aspx.cs">
|
||||||
<DependentUpon>Components.aspx</DependentUpon>
|
<DependentUpon>Components.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
@@ -17759,6 +17806,13 @@
|
|||||||
<DependentUpon>imageUp.ashx</DependentUpon>
|
<DependentUpon>imageUp.ashx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="res\umeditor\net\Uploader.cs" />
|
<Compile Include="res\umeditor\net\Uploader.cs" />
|
||||||
|
<Compile Include="Score\ScoreFlowLog.aspx.cs">
|
||||||
|
<DependentUpon>ScoreFlowLog.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Score\ScoreFlowLog.aspx.designer.cs">
|
||||||
|
<DependentUpon>ScoreFlowLog.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ServiceProxy.cs" />
|
<Compile Include="ServiceProxy.cs" />
|
||||||
<Compile Include="SHIYE\InformationProject\SafetyBriefing.aspx.cs">
|
<Compile Include="SHIYE\InformationProject\SafetyBriefing.aspx.cs">
|
||||||
<DependentUpon>SafetyBriefing.aspx</DependentUpon>
|
<DependentUpon>SafetyBriefing.aspx</DependentUpon>
|
||||||
@@ -20305,7 +20359,7 @@
|
|||||||
<WCFMetadata Include="Service References\" />
|
<WCFMetadata Include="Service References\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
namespace FineUIPro.Web
|
namespace FineUIPro.Web
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Text;
|
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using FineUIPro.Web.Score;
|
||||||
using Model;
|
using Model;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
public class Global : System.Web.HttpApplication
|
public class Global : System.Web.HttpApplication
|
||||||
{
|
{
|
||||||
@@ -33,11 +39,10 @@
|
|||||||
ErrLogInfo.WriteLog(string.Empty, ex);
|
ErrLogInfo.WriteLog(string.Empty, ex);
|
||||||
//AppDomain.Unload(AppDomain.CurrentDomain);
|
//AppDomain.Unload(AppDomain.CurrentDomain);
|
||||||
}
|
}
|
||||||
|
//通用定时器
|
||||||
////通用定时器
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ErrLogInfo.WriteLog("通用定时器开启!" );
|
ErrLogInfo.WriteLog("通用定时器开启!");
|
||||||
QuartzServices.Init();
|
QuartzServices.Init();
|
||||||
ErrLogInfo.WriteLog("通用定时器结束!");
|
ErrLogInfo.WriteLog("通用定时器结束!");
|
||||||
}
|
}
|
||||||
@@ -45,6 +50,485 @@
|
|||||||
{
|
{
|
||||||
ErrLogInfo.WriteLog("通用定时器!", ex);
|
ErrLogInfo.WriteLog("通用定时器!", ex);
|
||||||
}
|
}
|
||||||
|
// 开启线程
|
||||||
|
System.Threading.Thread LoadServiceData = new System.Threading.Thread(new System.Threading.ThreadStart(EduTrainAddScore));
|
||||||
|
LoadServiceData.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EduTrainAddScore()
|
||||||
|
{
|
||||||
|
//定义一个定时器,并开启和配置相关属性
|
||||||
|
System.Timers.Timer Wtimer = new System.Timers.Timer();
|
||||||
|
//执行任务的周期 ,60分钟
|
||||||
|
Wtimer.Interval =1000 * 60 * 60; //120000;
|
||||||
|
Wtimer.Enabled = true;
|
||||||
|
Wtimer.Start();
|
||||||
|
Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 培训考试加分
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
void Wtimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
//考试大于等于80分通过,且没有加过分的记录,加分
|
||||||
|
var testRecordList = (from x in Funs.DB.View_Training_TestRecord where x.TestScores >= 80
|
||||||
|
&& !Funs.DB.ScoreFlowLog.Any(log => log.DataSourceId == x.TestRecordId)
|
||||||
|
orderby x.TestStartTime select x).ToList();
|
||||||
|
foreach (var item in testRecordList)
|
||||||
|
{
|
||||||
|
//查找最新一条积分记录
|
||||||
|
var flowLog = BLL.ScoreFlowLogService.GetScoreFlowLogByIdentityCard(item.IdentityCard, item.TestStartTime.Value.Year, DateTime.Now);
|
||||||
|
|
||||||
|
//作业人员考试加分
|
||||||
|
if (item.WorkPostType == "一般作业岗位" || item.WorkPostType == "特种作业人员")
|
||||||
|
{
|
||||||
|
//必修-岗位基本操作技能:一门专业课20分,最高20分;超过1门课程,多出的学习课程每门2分
|
||||||
|
if (item.CompanyTrainingId == BLL.Const.CompanyTrainingId3)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = (from x in Funs.DB.ScoreFlowLog where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year && x.Item.Contains("考试【岗位基本操作技能】") orderby x.CompileDate descending select x).ToList();
|
||||||
|
//一个课程加分一次
|
||||||
|
var isExist = scoreFlowLog.Where(x => x.LogContent.Contains("岗位基本操作技能【" + item.CompanyTrainingItemName + "】")).FirstOrDefault();
|
||||||
|
if (isExist == null)//第一次加分
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【岗位基本操作技能】";
|
||||||
|
newlog.LogContent = "岗位基本操作技能【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
|
||||||
|
if (scoreFlowLog.Count == 0)
|
||||||
|
{
|
||||||
|
newlog.Score = 20;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 20;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 120;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//必修-通用安全知识:60分,每门10分,最高60分;超过6门课程,多出的学习课程每门2分
|
||||||
|
else if (item.CompanyTrainingId == BLL.Const.CompanyTrainingId1)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = (from x in Funs.DB.ScoreFlowLog where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year && x.Item.Contains("考试【通用安全知识】") orderby x.CompileDate descending select x).ToList();
|
||||||
|
//一个课程加分一次
|
||||||
|
var isExist = scoreFlowLog.Where(x => x.LogContent.Contains("通用安全知识【" + item.CompanyTrainingItemName + "】")).FirstOrDefault();
|
||||||
|
if (isExist == null)//第一次加分
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【通用安全知识】";
|
||||||
|
newlog.LogContent = "通用安全知识【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
if (scoreFlowLog.Count < 6)
|
||||||
|
{
|
||||||
|
newlog.Score = 10;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 10;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 110;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//选修加分 每节课2分,加分上线不限制,以年度为节点
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var isExist = (from x in Funs.DB.ScoreFlowLog
|
||||||
|
where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year
|
||||||
|
&& x.Item.Contains(item.CompanyTrainingName)
|
||||||
|
&& x.LogContent.Contains(item.CompanyTrainingName + "【" + item.CompanyTrainingItemName + "】")
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (isExist == null)
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【" + item.CompanyTrainingName + "】";
|
||||||
|
newlog.LogContent = item.CompanyTrainingName + "【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//管理人员考试加分
|
||||||
|
else if (item.WorkPostType == "一般管理岗位" || item.WorkPostType == "特种管理人员")
|
||||||
|
{
|
||||||
|
//必修-知识方法工具,最少学习5门课程,一门5分;超过5门课程,多出的学习课程每门2分
|
||||||
|
if (item.CompanyTrainingId == BLL.Const.CompanyTrainingId2)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = (from x in Funs.DB.ScoreFlowLog where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year && x.Item.Contains("考试【知识方法工具】") orderby x.CompileDate descending select x).ToList();
|
||||||
|
//一次考试加分一次
|
||||||
|
var isExist = scoreFlowLog.Where(x => x.LogContent.Contains("知识方法工具【" + item.CompanyTrainingItemName + "】")).FirstOrDefault();
|
||||||
|
if (isExist == null)//第一次加分
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【知识方法工具】";
|
||||||
|
newlog.LogContent = "知识方法工具【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
if (scoreFlowLog.Count < 5)
|
||||||
|
{
|
||||||
|
newlog.Score = 5;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 105;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//必修-生产受控管理,最少学习5门课程,一门5分;超过5门课程,多出的学习课程每门2分
|
||||||
|
else if (item.CompanyTrainingId == BLL.Const.CompanyTrainingId4)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = (from x in Funs.DB.ScoreFlowLog where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year && x.Item.Contains("考试【生产受控管理】") orderby x.CompileDate descending select x).ToList();
|
||||||
|
//一次考试加分一次
|
||||||
|
var isExist = scoreFlowLog.Where(x => x.LogContent.Contains("生产受控管理【" + item.CompanyTrainingItemName + "】")).FirstOrDefault();
|
||||||
|
if (isExist == null)//第一次加分
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【生产受控管理】";
|
||||||
|
newlog.LogContent = "生产受控管理【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
if (scoreFlowLog.Count < 5)
|
||||||
|
{
|
||||||
|
newlog.Score = 5;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 105;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//必修-通用课程:通用安全知识:30分,每门10分,最高30分;超过3门课程,多出的学习课程每门2分
|
||||||
|
else if (item.CompanyTrainingId == BLL.Const.CompanyTrainingId1)
|
||||||
|
{
|
||||||
|
var scoreFlowLog = (from x in Funs.DB.ScoreFlowLog where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year && x.Item.Contains("考试【通用安全知识】") orderby x.CompileDate descending select x).ToList();
|
||||||
|
//一次考试加分一次
|
||||||
|
var isExist = scoreFlowLog.Where(x => x.LogContent.Contains("通用安全知识【" + item.CompanyTrainingItemName + "】")).FirstOrDefault();
|
||||||
|
if (isExist == null)//第一次加分
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【通用安全知识】";
|
||||||
|
newlog.LogContent = "通用安全知识【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
if (scoreFlowLog.Count < 3)
|
||||||
|
{
|
||||||
|
newlog.Score = 10;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 10;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 110;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //选修加分 每节课2分,加分上线不限制,以年度为节点
|
||||||
|
{
|
||||||
|
var isExist = (from x in Funs.DB.ScoreFlowLog
|
||||||
|
where x.Type == 1 && x.IdentityCard == item.IdentityCard && x.Year == item.TestStartTime.Value.Year
|
||||||
|
&& x.Item.Contains(item.CompanyTrainingName)
|
||||||
|
&& x.LogContent.Contains(item.CompanyTrainingName + "【" + item.CompanyTrainingItemName + "】")
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (isExist == null)
|
||||||
|
{
|
||||||
|
//人员记分流水日志表
|
||||||
|
Model.ScoreFlowLog newlog = new Model.ScoreFlowLog();
|
||||||
|
newlog.Id = SQLHelper.GetNewID();
|
||||||
|
newlog.Year = item.TestStartTime.Value.Year;
|
||||||
|
newlog.IdentityCard = item.IdentityCard;
|
||||||
|
newlog.UserName = item.PersonName;
|
||||||
|
newlog.PersonId = item.TestManId;
|
||||||
|
newlog.UnitId = item.UnitId;
|
||||||
|
newlog.ProjectId = item.ProjectId;
|
||||||
|
newlog.UnitName = item.UnitName;
|
||||||
|
newlog.ProjectName = item.ProjectName;
|
||||||
|
newlog.Type = 1;
|
||||||
|
newlog.Item = "考试【" + item.CompanyTrainingName + "】";
|
||||||
|
newlog.LogContent = item.CompanyTrainingName + "【" + item.CompanyTrainingItemName + "】考试得分" + item.TestScores + "分后,加分";
|
||||||
|
newlog.CompileDate = DateTime.Now;
|
||||||
|
newlog.CompileManId = "";
|
||||||
|
newlog.CompileMan = "";
|
||||||
|
newlog.DataSourceId = item.TestRecordId;
|
||||||
|
newlog.CheckDate = item.TestStartTime;
|
||||||
|
newlog.Score = 2;
|
||||||
|
if (flowLog != null)
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = flowLog.CurrentScore + 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newlog.CurrentScore = 102;
|
||||||
|
}
|
||||||
|
BLL.ScoreFlowLogService.AddScoreFlowLog(newlog);
|
||||||
|
|
||||||
|
//人员记分情况
|
||||||
|
Model.ScoreUser newScoreUser = new ScoreUser();
|
||||||
|
newScoreUser.Id = SQLHelper.GetNewID();
|
||||||
|
newScoreUser.Year = newlog.Year;
|
||||||
|
newScoreUser.IdentityCard = item.IdentityCard;
|
||||||
|
newScoreUser.Score = newlog.CurrentScore;
|
||||||
|
newScoreUser.UserName = newlog.UserName;
|
||||||
|
newScoreUser.CompileDate = newlog.CompileDate;
|
||||||
|
newScoreUser.DataSourceId = newlog.DataSourceId;
|
||||||
|
newScoreUser.CheckDate = newlog.CheckDate;
|
||||||
|
BLL.ScoreUserService.AddScoreUser(newScoreUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Session_Start(object sender, EventArgs e)
|
protected void Session_Start(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ScoreFlowLog.aspx.cs" Inherits="FineUIPro.Web.Score.ScoreFlowLog" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>得分扣分记录流水日志</title>
|
||||||
|
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="得分扣分记录流水日志" EnableCollapse="true"
|
||||||
|
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="ID"
|
||||||
|
AllowCellEditing="true" ClicksToEdit="2" DataIDField="ID" AllowSorting="true"
|
||||||
|
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||||
|
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
|
EnableTextSelection="True">
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
<Items>
|
||||||
|
<f:TextBox runat="server" Label="姓名" ID="txtName" EmptyText="输入查询条件" AutoPostBack="true"
|
||||||
|
OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px" LabelAlign="right">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:DropDownList ID="drpType" runat="server" Label="加分/扣分" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="200px">
|
||||||
|
<f:ListItem Value="" Text="-请选择-" />
|
||||||
|
<f:ListItem Value="0" Text="扣分" />
|
||||||
|
<f:ListItem Value="1" Text="加分" />
|
||||||
|
</f:DropDownList>
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
|
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||||
|
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="记分时间" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="UserName" DataField="UserName" SortField="UserName"
|
||||||
|
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:TemplateField ColumnID="tfI" HeaderText="身份证号" Width="170px" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lbI" runat="server" Text=' <%# Bind("IdentityCard") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="TypeName" DataField="TypeName" SortField="TypeName"
|
||||||
|
FieldType="String" HeaderText="加分/扣分" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="Score" DataField="Score" SortField="Score"
|
||||||
|
FieldType="String" HeaderText="分值" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="CurrentScore" DataField="CurrentScore" SortField="CurrentScore"
|
||||||
|
FieldType="String" HeaderText="最终分值" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="Item" DataField="Item" SortField="Item"
|
||||||
|
FieldType="String" HeaderText="类目" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="LogContent" DataField="LogContent" SortField="LogContent"
|
||||||
|
FieldType="String" HeaderText="记录内容" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="80px" ColumnID="CompileMan" DataField="CompileMan" SortField="CompileMan"
|
||||||
|
FieldType="String" HeaderText="记分人" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<%--<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
||||||
|
FieldType="String" HeaderText="备注" ExpandUnusedSpace="true" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Left">
|
||||||
|
</f:RenderField>--%>
|
||||||
|
</Columns>
|
||||||
|
<PageItems>
|
||||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
</f:ToolbarSeparator>
|
||||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
</f:ToolbarText>
|
||||||
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
|
</f:DropDownList>
|
||||||
|
</PageItems>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function reloadGrid() {
|
||||||
|
__doPostBack(null, 'reloadGrid');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using AspNet = System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.Score
|
||||||
|
{
|
||||||
|
public partial class ScoreFlowLog : PageBase
|
||||||
|
{
|
||||||
|
#region 项目主键
|
||||||
|
/// <summary>
|
||||||
|
/// 项目主键
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#region 加载
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||||
|
{
|
||||||
|
this.ProjectId = Request.Params["projectId"];
|
||||||
|
}
|
||||||
|
////权限按钮方法
|
||||||
|
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||||
|
this.ucTree.ProjectId = this.ProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||||
|
}
|
||||||
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
// 绑定表格
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载树
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string strSql = "select flowLog.Id, flowLog.Year, flowLog.IdentityCard, flowLog.UserName, flowLog.Type, (case when flowLog.Type=0 then '扣分' else '加分' end) as TypeName,flowLog.Score, flowLog.CurrentScore, flowLog.Item, flowLog.LogContent, flowLog.UserId, flowLog.PersonId, flowLog.UnitId, flowLog.ProjectId, flowLog.UnitName, flowLog.ProjectName, flowLog.Remark, flowLog.CompileDate, flowLog.CompileMan, flowLog.CompileManId from ScoreFlowLog flowLog WHERE 1=1 ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
|
||||||
|
strSql += " AND flowLog.ProjectId = @ProjectId";
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
|
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND flowLog.UserName like @name";
|
||||||
|
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.drpType.SelectedValue))
|
||||||
|
{
|
||||||
|
strSql += " AND flowLog.Type = @type";
|
||||||
|
listStr.Add(new SqlParameter("@type", this.drpType.SelectedValue));
|
||||||
|
}
|
||||||
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
|
{
|
||||||
|
strSql += " AND flowLog.UnitId =@unitId";
|
||||||
|
listStr.Add(new SqlParameter("@unitId", this.CurrUser.UnitId));
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 改变索引事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分页下拉选择事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询
|
||||||
|
/// <summary>
|
||||||
|
/// 查询
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
//if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
//if (Request.Params["value"] == "0") ///文件柜时 没有操作权限
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
//var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TeamGroupMenuId);
|
||||||
|
//if (buttonList.Count() > 0)
|
||||||
|
//{
|
||||||
|
// if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
// {
|
||||||
|
// //this.btnNew.Hidden = false;
|
||||||
|
// }
|
||||||
|
// if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
|
// {
|
||||||
|
// //this.btnMenuEdit.Hidden = false;
|
||||||
|
// }
|
||||||
|
// if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
// {
|
||||||
|
// //this.btnMenuDelete.Hidden = false;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Response.ClearContent();
|
||||||
|
string filename = Funs.GetNewFileName();
|
||||||
|
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员记分流水日志表" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||||
|
Response.ContentType = "application/excel";
|
||||||
|
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||||
|
this.Grid1.PageSize = 500;
|
||||||
|
this.BindGrid();
|
||||||
|
Response.Write(GetGridTableHtml(Grid1));
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导出方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="grid"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string GetGridTableHtml(Grid grid)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||||
|
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||||
|
sb.Append("<tr>");
|
||||||
|
foreach (GridColumn column in grid.Columns)
|
||||||
|
{
|
||||||
|
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||||
|
}
|
||||||
|
sb.Append("</tr>");
|
||||||
|
foreach (GridRow row in grid.Rows)
|
||||||
|
{
|
||||||
|
sb.Append("<tr>");
|
||||||
|
foreach (GridColumn column in grid.Columns)
|
||||||
|
{
|
||||||
|
string html = row.Values[column.ColumnIndex].ToString();
|
||||||
|
if (column.ColumnID == "tfNumber")
|
||||||
|
{
|
||||||
|
html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||||
|
}
|
||||||
|
if (column.ColumnID == "tfI")
|
||||||
|
{
|
||||||
|
html = (row.FindControl("lbI") as AspNet.Label).Text;
|
||||||
|
}
|
||||||
|
//sb.AppendFormat("<td>{0}</td>", html);
|
||||||
|
sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append("</tr>");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append("</table>");
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
+179
@@ -0,0 +1,179 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.Score
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class ScoreFlowLog
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpType 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblNumber 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lbI 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lbI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarSeparator1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarText1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlPageSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1790
File diff suppressed because it is too large
Load Diff
@@ -274,6 +274,157 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Areas\HelpPage\HelpPage.css" />
|
<Content Include="Areas\HelpPage\HelpPage.css" />
|
||||||
|
<Content Include="bin\AipSdk.dll" />
|
||||||
|
<Content Include="bin\Antlr3.Runtime.dll" />
|
||||||
|
<Content Include="bin\Antlr3.Runtime.pdb" />
|
||||||
|
<Content Include="bin\AOP.Common.dll" />
|
||||||
|
<Content Include="bin\Apache.NMS.dll" />
|
||||||
|
<Content Include="bin\Apache.NMS.Fakes.dll" />
|
||||||
|
<Content Include="bin\Aspose.Words.dll" />
|
||||||
|
<Content Include="bin\BLL.dll" />
|
||||||
|
<Content Include="bin\BLL.pdb" />
|
||||||
|
<Content Include="bin\BouncyCastle.Crypto.dll" />
|
||||||
|
<Content Include="bin\BouncyCastle.Crypto.xml" />
|
||||||
|
<Content Include="bin\EmitMapper.dll" />
|
||||||
|
<Content Include="bin\FastReport.Bars.dll" />
|
||||||
|
<Content Include="bin\FastReport.dll" />
|
||||||
|
<Content Include="bin\FastReport.Editor.dll" />
|
||||||
|
<Content Include="bin\FineUIPro.dll" />
|
||||||
|
<Content Include="bin\ICSharpCode.SharpZipLib.dll" />
|
||||||
|
<Content Include="bin\ICSharpCode.SharpZipLib.pdb" />
|
||||||
|
<Content Include="bin\ICSharpCode.SharpZipLib.xml" />
|
||||||
|
<Content Include="bin\Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||||
|
<Content Include="bin\Microsoft.Bcl.AsyncInterfaces.xml" />
|
||||||
|
<Content Include="bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" />
|
||||||
|
<Content Include="bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml" />
|
||||||
|
<Content Include="bin\Microsoft.Extensions.Logging.Abstractions.dll" />
|
||||||
|
<Content Include="bin\Microsoft.Extensions.Logging.Abstractions.xml" />
|
||||||
|
<Content Include="bin\Microsoft.QualityTools.Testing.Fakes.dll" />
|
||||||
|
<Content Include="bin\Microsoft.Web.Infrastructure.dll" />
|
||||||
|
<Content Include="bin\MiniExcel.dll" />
|
||||||
|
<Content Include="bin\Model.dll" />
|
||||||
|
<Content Include="bin\Model.pdb" />
|
||||||
|
<Content Include="bin\netstandard.dll" />
|
||||||
|
<Content Include="bin\Newtonsoft.Json.dll" />
|
||||||
|
<Content Include="bin\Newtonsoft.Json.xml" />
|
||||||
|
<Content Include="bin\NPOI.dll" />
|
||||||
|
<Content Include="bin\NPOI.OOXML.dll" />
|
||||||
|
<Content Include="bin\NPOI.OOXML.pdb" />
|
||||||
|
<Content Include="bin\NPOI.OOXML.xml" />
|
||||||
|
<Content Include="bin\NPOI.OpenXml4Net.dll" />
|
||||||
|
<Content Include="bin\NPOI.OpenXml4Net.pdb" />
|
||||||
|
<Content Include="bin\NPOI.OpenXml4Net.xml" />
|
||||||
|
<Content Include="bin\NPOI.OpenXmlFormats.dll" />
|
||||||
|
<Content Include="bin\NPOI.OpenXmlFormats.pdb" />
|
||||||
|
<Content Include="bin\NPOI.pdb" />
|
||||||
|
<Content Include="bin\NPOI.xml" />
|
||||||
|
<Content Include="bin\office.dll" />
|
||||||
|
<Content Include="bin\Pipelines.Sockets.Unofficial.dll" />
|
||||||
|
<Content Include="bin\Pipelines.Sockets.Unofficial.xml" />
|
||||||
|
<Content Include="bin\Quartz.dll" />
|
||||||
|
<Content Include="bin\Quartz.xml" />
|
||||||
|
<Content Include="bin\RestSharp.dll" />
|
||||||
|
<Content Include="bin\RestSharp.xml" />
|
||||||
|
<Content Include="bin\roslyn\csc.exe" />
|
||||||
|
<Content Include="bin\roslyn\csi.exe" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CodeAnalysis.CSharp.Scripting.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CodeAnalysis.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CodeAnalysis.Scripting.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.DiaSymReader.Native.x86.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.AppContext.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Collections.Immutable.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Console.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Diagnostics.FileVersionInfo.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Diagnostics.StackTrace.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.IO.Compression.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.IO.FileSystem.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.IO.FileSystem.Primitives.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.IO.Pipes.AccessControl.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.IO.Pipes.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Reflection.Metadata.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.AccessControl.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Claims.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Cryptography.Algorithms.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Cryptography.Encoding.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Cryptography.Primitives.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Cryptography.X509Certificates.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Security.Principal.Windows.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Text.Encoding.CodePages.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.ValueTuple.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Xml.ReaderWriter.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Xml.XmlDocument.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Xml.XPath.dll" />
|
||||||
|
<Content Include="bin\roslyn\System.Xml.XPath.XDocument.dll" />
|
||||||
|
<Content Include="bin\roslyn\vbc.exe" />
|
||||||
|
<Content Include="bin\roslyn\VBCSCompiler.exe" />
|
||||||
|
<Content Include="bin\SgManager.AI.dll" />
|
||||||
|
<Content Include="bin\SgManager.AI.pdb" />
|
||||||
|
<Content Include="bin\StackExchange.Redis.dll" />
|
||||||
|
<Content Include="bin\StackExchange.Redis.xml" />
|
||||||
|
<Content Include="bin\stdole.dll" />
|
||||||
|
<Content Include="bin\System.Buffers.dll" />
|
||||||
|
<Content Include="bin\System.Buffers.xml" />
|
||||||
|
<Content Include="bin\System.Configuration.ConfigurationManager.dll" />
|
||||||
|
<Content Include="bin\System.Configuration.ConfigurationManager.xml" />
|
||||||
|
<Content Include="bin\System.Diagnostics.DiagnosticSource.dll" />
|
||||||
|
<Content Include="bin\System.Diagnostics.DiagnosticSource.xml" />
|
||||||
|
<Content Include="bin\System.IO.Compression.dll" />
|
||||||
|
<Content Include="bin\System.IO.Pipelines.dll" />
|
||||||
|
<Content Include="bin\System.IO.Pipelines.xml" />
|
||||||
|
<Content Include="bin\System.Memory.dll" />
|
||||||
|
<Content Include="bin\System.Memory.xml" />
|
||||||
|
<Content Include="bin\System.Net.Http.Formatting.dll" />
|
||||||
|
<Content Include="bin\System.Net.Http.Formatting.xml" />
|
||||||
|
<Content Include="bin\System.Numerics.Vectors.dll" />
|
||||||
|
<Content Include="bin\System.Numerics.Vectors.xml" />
|
||||||
|
<Content Include="bin\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||||
|
<Content Include="bin\System.Runtime.CompilerServices.Unsafe.xml" />
|
||||||
|
<Content Include="bin\System.Runtime.InteropServices.RuntimeInformation.dll" />
|
||||||
|
<Content Include="bin\System.Threading.Channels.dll" />
|
||||||
|
<Content Include="bin\System.Threading.Channels.xml" />
|
||||||
|
<Content Include="bin\System.Threading.Tasks.Extensions.dll" />
|
||||||
|
<Content Include="bin\System.Threading.Tasks.Extensions.xml" />
|
||||||
|
<Content Include="bin\System.Web.Cors.dll" />
|
||||||
|
<Content Include="bin\System.Web.Helpers.dll" />
|
||||||
|
<Content Include="bin\System.Web.Helpers.xml" />
|
||||||
|
<Content Include="bin\System.Web.Http.Cors.dll" />
|
||||||
|
<Content Include="bin\System.Web.Http.Cors.xml" />
|
||||||
|
<Content Include="bin\System.Web.Http.dll" />
|
||||||
|
<Content Include="bin\System.Web.Http.WebHost.dll" />
|
||||||
|
<Content Include="bin\System.Web.Http.WebHost.xml" />
|
||||||
|
<Content Include="bin\System.Web.Http.xml" />
|
||||||
|
<Content Include="bin\System.Web.Mvc.dll" />
|
||||||
|
<Content Include="bin\System.Web.Mvc.xml" />
|
||||||
|
<Content Include="bin\System.Web.Optimization.dll" />
|
||||||
|
<Content Include="bin\System.Web.Optimization.xml" />
|
||||||
|
<Content Include="bin\System.Web.Razor.dll" />
|
||||||
|
<Content Include="bin\System.Web.Razor.xml" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.Deployment.dll" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.Deployment.xml" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.dll" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.Razor.dll" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.Razor.xml" />
|
||||||
|
<Content Include="bin\System.Web.WebPages.xml" />
|
||||||
|
<Content Include="bin\ThoughtWorks.QRCode.dll" />
|
||||||
|
<Content Include="bin\WebAPI.dll" />
|
||||||
|
<Content Include="bin\WebAPI.pdb" />
|
||||||
|
<Content Include="bin\WebAPI.xml" />
|
||||||
|
<Content Include="bin\WebGrease.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\Microsoft.QualityTools.Testing.Fakes.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Net.Http.Formatting.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Helpers.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Http.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Http.WebHost.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Mvc.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Optimization.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.Razor.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.WebPages.Deployment.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.WebPages.Razor.resources.dll" />
|
||||||
|
<Content Include="bin\zh-Hans\System.Web.WebPages.resources.dll" />
|
||||||
<Content Include="Content\bootstrap-theme.css" />
|
<Content Include="Content\bootstrap-theme.css" />
|
||||||
<Content Include="Content\bootstrap-theme.min.css" />
|
<Content Include="Content\bootstrap-theme.min.css" />
|
||||||
<Content Include="Content\bootstrap.css" />
|
<Content Include="Content\bootstrap.css" />
|
||||||
@@ -304,6 +455,19 @@
|
|||||||
<Content Include="Areas\HelpPage\Views\Help\ResourceModel.cshtml" />
|
<Content Include="Areas\HelpPage\Views\Help\ResourceModel.cshtml" />
|
||||||
<Content Include="Areas\HelpPage\Views\Shared\_Layout.cshtml" />
|
<Content Include="Areas\HelpPage\Views\Shared\_Layout.cshtml" />
|
||||||
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" />
|
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" />
|
||||||
|
<Content Include="bin\BLL.dll.config" />
|
||||||
|
<Content Include="bin\roslyn\csc.exe.config" />
|
||||||
|
<Content Include="bin\roslyn\csc.rsp" />
|
||||||
|
<Content Include="bin\roslyn\csi.exe.config" />
|
||||||
|
<Content Include="bin\roslyn\csi.rsp" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.CSharp.Core.targets" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.Managed.Core.targets" />
|
||||||
|
<Content Include="bin\roslyn\Microsoft.VisualBasic.Core.targets" />
|
||||||
|
<Content Include="bin\roslyn\vbc.exe.config" />
|
||||||
|
<Content Include="bin\roslyn\vbc.rsp" />
|
||||||
|
<Content Include="bin\roslyn\VBCSCompiler.exe.config" />
|
||||||
|
<Content Include="bin\SgManager.AI.dll.config" />
|
||||||
|
<Content Include="bin\WebAPI.dll.config" />
|
||||||
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.js" />
|
<Content Include="Scripts\jquery-3.3.1.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
||||||
|
|||||||
Reference in New Issue
Block a user