# Conflicts:
#	SGGL/FineUIPro.Web/Web.config
#	SGGL/FineUIPro.Web/common/Menu_JDGL.xml
This commit is contained in:
2024-05-14 23:28:44 +08:00
119 changed files with 4257 additions and 572 deletions
@@ -0,0 +1,4 @@
insert into Base_CNProfessional(CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex)
values('BD344C54-66CC-4547-89AF-04C297D60CD7','HSE','安全',111)
go
@@ -0,0 +1,338 @@
alter table [dbo].[JDGL_MonthPlan] add SortIndex int null
GO
--获取当前人待办事项
ALTER PROCEDURE [dbo].[Sp_Project_GetToDoItems]
@projectId NVARCHAR(50)=NULL,
@userId NVARCHAR(200)=NULL
AS
/*获取当前人待办事项*/
BEGIN
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待整改' AS MenuName
,register.RegisterDef AS Content
,UserId
,users.UserName
,register.RegisterDate AS DataTime
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
,'../HSSE/HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
FROM HSSE_Hazard_HazardRegister AS register
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE register.ProjectId=@projectId AND
((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') ))
)
UNION ALL
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待确认' AS MenuName
,register.RegisterDef AS Content
,UserId
,users.UserName
,register.RegisterDate AS DataTime
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
,'../HSSE/HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
FROM HSSE_Hazard_HazardRegister AS register
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE register.ProjectId=@projectId AND
register.states = '2' AND register.CheckManId =@userId
UNION ALL
SELECT CheckControlCode AS DataId
,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId
,'质量巡检待处理' AS MenuName
,checkControl.QuestionDef AS Content
,UserId
,users.UserName
,checkControl.CheckDate AS DataTime
,CONVERT(varchar(100),checkControl.CheckDate, 23) AS DataTimeStr
,'../CQMS/Check/ChecklistEdit.aspx?ToDo=ToDo&CheckControlCode='+checkControl.CheckControlCode AS PCUrl
FROM Check_CheckControl AS checkControl
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE checkControl.ProjectId=@projectId AND
checkControl.State != '7' AND checkControl.CheckControlCode in (select CheckControlCode from Check_CheckControlApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT GJSXID AS DataId
,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId
,'关键事项待处理' AS MenuName
,GJSX.Detail AS Content
,users.UserId
,users.UserName
,GJSX.CreateDate AS DataTime
,CONVERT(varchar(100),GJSX.CreateDate, 23) AS DataTimeStr
,'../PZHGL/GJSX/GJSXListEdit.aspx?ToDo=ToDo&EditType=Edit&ID='+GJSXID AS PCUrl
FROM GJSX
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE GJSX.ProjectId=@projectId AND
GJSX.State != 0 AND (((select count(*) from GJSX_detail detail where detail.Progress_user=@userId and detail.GJSXID=GJSX.GJSXID)=0
and (select count(*) from GJSX_Process process where process.UserId=@userId and process.GJSXID=GJSX.GJSXID)>0)
or (GJSX.User_Acceptance like '%'+@userId+'%' and (select count(*) from GJSX_detail detail where detail.GJSXID=GJSX.GJSXID)=(select count(*) from GJSX_Process process where process.GJSXID=GJSX.GJSXID))
)
UNION ALL
SELECT InspectionEquipmentId AS DataId
,'6c2c1e5e-1812-4e1c-a683-7125518e28c7' AS MenuId
,'设备材料报验待确认' AS MenuName
,Equipment.InspectionName AS Content
,UserId
,users.UserName
,Equipment.InspectionDate AS DataTime
,CONVERT(varchar(100),Equipment.InspectionDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionEquipmentEdit.aspx?ToDo=ToDo&InspectionEquipmentId='+Equipment.InspectionEquipmentId AS PCUrl
FROM Comprehensive_InspectionEquipment AS Equipment
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Equipment.ProjectId=@projectId and
Equipment.Status!='3' AND Equipment.InspectionEquipmentId in (select InspectionEquipmentId from Comprehensive_InspectionEquipmentApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验待确认' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,Person.CompileDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and
Person.Status!='3' AND Person.InspectionPersonId in (select InspectionPersonId from Comprehensive_InspectionPersonApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验待确认' AS MenuName
,Machine.InspectionMachineName AS Content
,UserId
,users.UserName
,Machine.CompileDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and
Machine.Status!='3' AND Machine.InspectionMachineId in (select InspectionMachineId from Comprehensive_InspectionMachineApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT ConstructSolutionId AS DataId
,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId
,'施工方案待处理' AS MenuName
,Solution.SolutionName AS Content
,UserId
,users.UserName
,Solution.CompileDate AS DataTime
,CONVERT(varchar(100),Solution.CompileDate, 23) AS DataTimeStr
,'../CQMS/Solution/EditConstructSolution.aspx?ToDo=ToDo&ConstructSolutionId='+Solution.ConstructSolutionId AS PCUrl
FROM Solution_CQMSConstructSolution AS Solution
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Solution.ProjectId=@projectId and
Solution.State!='3'
AND Solution.ConstructSolutionId in
(select top 1 ConstructSolutionId from (
SELECT Solution_CQMSConstructSolutionApprove.*
FROM Solution_CQMSConstructSolutionApprove,
(SELECT MIN([order]) AS [order],ConstructSolutionId FROM Solution_CQMSConstructSolutionApprove where ApproveType!='S' and ApproveDate is null GROUP BY ConstructSolutionId )b
WHERE Solution_CQMSConstructSolutionApprove.[order] = b.[order] and Solution_CQMSConstructSolutionApprove.ConstructSolutionId = b.ConstructSolutionId
) approve
where approve.ApproveMan=@userId )
UNION ALL
SELECT InspectionId AS DataId
,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId
,'共检通知单待处理' AS MenuName
,InspectionManagement.AcceptanceSite AS Content
,UserId
,users.UserName
,InspectionManagement.CompileDate AS DataTime
,CONVERT(varchar(100),InspectionManagement.CompileDate, 23) AS DataTimeStr
,'../CQMS/ProcessControl/InspectionNoticeEdit.aspx?View=View&InspectionId='+InspectionManagement.InspectionId AS PCUrl
FROM ProcessControl_InspectionManagement AS InspectionManagement
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE InspectionManagement.ProjectId=@projectId and
dateadd(day,3,InspectionManagement.CompileDate)>getdate() and InspectionManagement.AcceptanceCheckMan like '%'+@userId+'%'
UNION ALL
SELECT CheckSpecialId AS DataId
,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId
,'专项检查' AS MenuName
,CheckItemSet.CheckItemName AS Content
,UserId
,users.UserName
,CheckSpecial.CheckTime AS DataTime
,CONVERT(varchar(100),CheckSpecial.CheckTime, 23) AS DataTimeStr
,'../HSSE/Check/CheckSpecialView.aspx?CheckSpecialId='+CheckSpecial.CheckSpecialId AS PCUrl
FROM Check_CheckSpecial AS CheckSpecial
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId =CheckSpecial.CheckItemSetId
WHERE CheckSpecial.ProjectId=@projectId and
dateadd(day,3,CheckSpecial.CheckTime)>getdate() and CheckSpecial.PartInPersonIds like '%'+@userId+'%'
UNION ALL
SELECT CheckColligationId AS DataId
,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId
,'综合检查待处理' AS MenuName
,case CheckType when '0' then '周检' when '1' then '月检' else '其它' end AS Content
,users.UserId
,users.UserName
,CheckColligation.CheckTime AS DataTime
,CONVERT(varchar(100),CheckColligation.CheckTime, 23) AS DataTimeStr
,'../HSSE/Check/CheckColligationEdit.aspx?CheckColligationId='+CheckColligation.CheckColligationId AS PCUrl
FROM Check_CheckColligation AS CheckColligation
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckColligation.CheckColligationId=FlowOperate.DataId
LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId
WHERE CheckColligation.ProjectId=@projectId and FlowOperate.IsClosed <> 1 and FlowOperate.OperaterId=@userId
UNION ALL
SELECT PatrolPlanId AS DataId
,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId
,'风险巡检待处理' AS MenuName
,HazardListItem.HazardItems AS Content
,UserId
,users.UserName
,PatrolPlan.LimitCheckDate AS DataTime
,CONVERT(varchar(100),PatrolPlan.LimitCheckDate, 23) AS DataTimeStr
,'../HSSE/Hazard/RoutingInspectionEdit.aspx?PatrolPlanId='+PatrolPlan.PatrolPlanId AS PCUrl
FROM Hazard_PatrolPlan AS PatrolPlan
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=PatrolPlan.HazardSelectedItemId
WHERE HazardListItem.ProjectId=@projectId and
dateadd(day,-3,PatrolPlan.LimitCheckDate)<getdate() and PatrolPlan.DutyPerson=@userId
and (select COUNT(*) from Hazard_RoutingInspection ri where ri.PatrolPlanId=PatrolPlan.PatrolPlanId)=0
UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),PersonQuality.LimitDate))+'天过期' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,PersonQuality.LimitDate AS DataTime
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
FROM QualityAudit_PersonQuality AS PersonQuality
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
dateadd(day,-15,PersonQuality.LimitDate)<getdate() and getdate()<PersonQuality.LimitDate
UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质已过期'+convert(nvarchar(6),DATEDIFF(day,PersonQuality.LimitDate,getdate()))+'' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,PersonQuality.LimitDate AS DataTime
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
FROM QualityAudit_PersonQuality AS PersonQuality
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
PersonQuality.LimitDate<getdate()
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Person.ValidityDate))+'天过期' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,Person.CompileDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
dateadd(day,-15,Person.ValidityDate)<getdate() and getdate()<Person.ValidityDate
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验已过期'+convert(nvarchar(6),DATEDIFF(day,Person.ValidityDate,getdate()))+'' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,Person.CompileDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
Person.ValidityDate<getdate()
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Machine.NextTestDate))+'天过期' AS MenuName
,Machine.InspectionMachineName AS Content
,UserId
,users.UserName
,Machine.CompileDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
dateadd(day,-15,Machine.NextTestDate)<getdate() and getdate()<Machine.NextTestDate
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验已过期'+convert(nvarchar(6),DATEDIFF(day,Machine.NextTestDate,getdate()))+'' AS MenuName
,Machine.InspectionMachineName AS Content
,UserId
,users.UserName
,Machine.CompileDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
Machine.NextTestDate<getdate()
UNION ALL
SELECT Project.ProjectId AS DataId
,'2AE9D982-A499-497F-8F54-ADDA5856887E' AS MenuId
,'本月工程量完成情况尚未填报' AS MenuName
,'' AS Content
,users.UserId
,users.UserName
,GETDATE() AS DataTime
,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr
,'../JDGL/Check/QuantityCompletion.aspx?ToDo=ToDo' AS PCUrl
FROM Base_Project AS Project
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId
WHERE Project.ProjectId=@projectId
and (pu.RoleId like '%22F78A47-F59C-4FE8-9C43-2DD304CB2108%' or pu.RoleId like '%GCB64EF3-AB0A-40BC-824D-CC314598D5DC%') and ((DATENAME(DAY,GETDATE())>=22 and (select COUNT(*) from JDGL_QuantityCompletion WHERE ProjectId=@projectId and DATENAME(year,GETDATE())=DATENAME(year,EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,EndDate))=0)
or (DATEADD(day,60,(select top 1 EndDate from JDGL_QuantityCompletion WHERE ProjectId=@projectId order by EndDate desc))<GETDATE()))
UNION ALL
SELECT MonthPlan.MonthPlanId AS DataId
,'94287B92-7E96-4B90-BC6F-DAF30AE3B314' AS MenuId
,'月度计划尚未完成' AS MenuName
,'' AS Content
,users.UserId
,users.UserName
,GETDATE() AS DataTime
,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr
,'../JDGL/Check/MonthPlanEdit.aspx?ToDo=ToDo' AS PCUrl
FROM JDGL_MonthPlan AS MonthPlan
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId
WHERE MonthPlan.ProjectId=@projectId
and MonthPlan.DutyPerson=@userId and MonthPlan.RealDate is null and DATENAME(DAY,GETDATE())>=22 and
DATENAME(year,GETDATE())=DATENAME(year,MonthPlan.PlanDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,MonthPlan.PlanDate)
ORDER BY DataTime DESC
END
GO
@@ -0,0 +1,112 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
GO
CREATE TABLE [dbo].[JDGL_WeekPlan](
[WeekPlanId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[WeekNo] [nvarchar](50) NULL,
[StartDate] [datetime] NULL,
[EndDate] [datetime] NULL,
[UnitWork] [nvarchar](50) NULL,
[Major] [nvarchar](50) NULL,
[WorkContent] [nvarchar](500) NULL,
[UnitId] [nvarchar](50) NULL,
[DutyPerson] [nvarchar](50) NULL,
[PlanDate] [datetime] NULL,
[IsOK] [bit] NULL,
[Remark] [nvarchar](200) NULL,
[CompileMan] [nvarchar](50) NULL,
[CompileDate] [datetime] NULL,
[SortIndex] [int] NULL,
CONSTRAINT [PK_JDGL_WeekPlan] PRIMARY KEY CLUSTERED
(
[WeekPlanId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Project]
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] FOREIGN KEY([UnitId])
REFERENCES [dbo].[Base_Unit] ([UnitId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit]
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] FOREIGN KEY([DutyPerson])
REFERENCES [dbo].[Sys_User] ([UserId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Sys_User]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekPlanId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @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'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开始日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'StartDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'EndDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工序/单位工程' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitWork'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专业' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Major'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工作项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WorkContent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'责任单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @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'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'DutyPerson'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划完成时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'PlanDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完成状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'IsOK'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Remark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @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'JDGL_WeekPlan', @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'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'SortIndex'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'周进度计划表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan'
GO
@@ -0,0 +1,3 @@
update ProcessControl_InspectionManagement set IsOnceQualified=1
go
@@ -104,6 +104,19 @@ go
VALUES('F136D1B4-A988-42E7-AD7C-4A246B440D03','94287B92-7E96-4B90-BC6F-DAF30AE3B314','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1)
--GO
@@ -42,7 +42,7 @@ namespace FineUIPro.Web.BaseInfo
protected DataTable BindData()
{
string strSql = @"select CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex from [dbo].[Base_CNProfessional] where CNProfessionalId !='"+Const.CNProfessionalConstructId+"' ";
string strSql = @"select CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex from [dbo].[Base_CNProfessional] where CNProfessionalId !='" + Const.CNProfessionalConstructId + "' and CNProfessionalId !='" + Const.CNProfessionalHSEId + "' ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtCNProfessionalCode.Text.Trim()))
@@ -654,20 +654,10 @@ namespace FineUIPro.Web.CQMS.Check
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -456,20 +456,10 @@ namespace FineUIPro.Web.CQMS.Check
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -350,20 +350,10 @@ namespace FineUIPro.Web.CQMS.Check
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -280,20 +280,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -93,7 +93,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null)));
var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -85,7 +85,7 @@
<f:RenderField ColumnID="SendDate" DataField="SendDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发出日期" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:TemplateField ColumnID="ReceiveUnit" Width="180px" HeaderText="接收单位" HeaderTextAlign="Center" TextAlign="Center">
<f:TemplateField ColumnID="ReceiveUnit" Width="180px" HeaderText="上报接收单位" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("ReceiveUnit")) %>'></asp:Label>
</ItemTemplate>
@@ -368,20 +368,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -92,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.UnitService.GetUnit(this.drpSendUnitId, this.CurrUser.LoginProjectId, false);//发件单位
BLL.UnitService.GetUnit(this.drpReceiveUnit, this.CurrUser.LoginProjectId, false);//接收单位
BLL.UnitService.GetUnit(this.drpIssueToUnit, this.CurrUser.LoginProjectId, false);//下发至单位
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
BLL.CNProfessionalService.InitCNProfessionalDocDownList(this.drpCNProfessionalId, true);//专业
//LoadAuditSelect();
//this.agree.Hidden = true;
//this.options.Hidden = true;
@@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -333,20 +333,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -181,7 +181,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -269,7 +269,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -355,20 +355,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -176,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -263,7 +263,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -394,20 +394,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -257,7 +257,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -322,20 +322,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -91,7 +91,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null)));
var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -327,20 +327,23 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Right;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
font0.FontHeightInPoints = 11;
//font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -388,7 +391,7 @@ namespace FineUIPro.Web.Comprehensive
cell.SetCellValue(item.Supplier);//供货厂商
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.CellStyle = cellStyle0;
cell.SetCellValue(item.Counts);//本次数量
cell = row.CreateCell(8);
@@ -396,7 +399,7 @@ namespace FineUIPro.Web.Comprehensive
cell.SetCellValue(item.Unit);//单位
cell = row.CreateCell(9);
cell.CellStyle = cellStyle;
cell.CellStyle = cellStyle0;
cell.SetCellValue(item.SamplingCount);//本次抽检数量
cell = row.CreateCell(10);
@@ -243,7 +243,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -346,19 +346,20 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Right;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
font0.FontHeightInPoints = 11;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
@@ -445,7 +446,7 @@ namespace FineUIPro.Web.Comprehensive
cell.SetCellValue(isO);//是否在校验期内
cell = row.CreateCell(11);
cell.CellStyle = cellStyle;
cell.CellStyle = cellStyle0;
cell.SetCellValue(item.UnitsCount.HasValue ? item.UnitsCount.ToString() : "");//台数
cell = row.CreateCell(12);
@@ -193,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -268,7 +268,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -413,20 +413,11 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -225,7 +225,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
}
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -410,7 +410,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
}
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -288,20 +288,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -323,20 +323,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -90,7 +90,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null)));
var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -378,20 +378,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -201,7 +201,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -327,7 +327,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -315,20 +315,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -164,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -321,20 +321,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
if (drpUnit.SelectedValue != BLL.Const._Null)
{
var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -232,7 +232,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
if (drpUnit.SelectedValue != BLL.Const._Null)
{
var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -372,20 +372,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -293,7 +293,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -328,20 +328,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -174,7 +174,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -247,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -309,20 +309,10 @@ namespace FineUIPro.Web.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -169,7 +169,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -250,20 +250,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -69,7 +69,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null)));
var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@@ -429,20 +429,10 @@ namespace FineUIPro.Web.CQMS.ManageReport
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -225,20 +225,10 @@ namespace FineUIPro.Web.CQMS.ManageReport
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -177,20 +177,10 @@ namespace FineUIPro.Web.CQMS.ManageReport
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -194,20 +194,10 @@ namespace FineUIPro.Web.CQMS.ManageReport
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -177,7 +177,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//序号
value = " " + value;
}
p.ParagraphFormat.Alignment = ParagraphAlignment.Center;
p.AppendChild(new Run(doc, value));
@@ -231,8 +231,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Document doc = new Aspose.Words.Document(newUrl);
DocumentBuilder builder = new DocumentBuilder(doc);
#region
//业主单位
var unitsYz = (from x in db.Base_Unit
@@ -344,13 +342,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
row.Cells.Add(CreateCell(item.TargetValue, doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.MonthPer, doc, table.FirstRow.Cells[4].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
}
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
#endregion
#region
@@ -103,8 +103,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//加载所有专业
CNProfessionals = (from x in db.Base_CNProfessional
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
//&& x.CNProfessionalId != BLL.Const.ComprehensiveId
orderby x.SortIndex
&& x.CNProfessionalId != BLL.Const.CNProfessionalHSEId
orderby x.SortIndex
select new ProfessionalsClass
{
CNProfessionalId=x.CNProfessionalId,
@@ -178,6 +178,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
value = " " + value;
}
p.ParagraphFormat.Alignment = ParagraphAlignment.Center;
p.AppendChild(new Run(doc, value));
@@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//加载所有专业
CNProfessionals = (from x in db.Base_CNProfessional
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
//&& x.CNProfessionalId != BLL.Const.ComprehensiveId
&& x.CNProfessionalId != BLL.Const.CNProfessionalHSEId
orderby x.SortIndex
select new ProfessionalsClass
{
@@ -600,17 +600,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
int Quantity1Sum = 0;
int Quantity2Sum = 0;
//加载所有专业
//var CNProfessionals = from x in db.Base_CNProfessional
// where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
// && x.CNProfessionalId != BLL.Const.ComprehensiveId
// orderby x.SortIndex
// select new
// {
// x.CNProfessionalId,
// x.ProfessionalName
// };
foreach (var item in CNProfessionals)
{
@@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// <param name="cNProfessionalId"></param>
public void BindGvInspectionManagement()
{
//List<Model.NCRStatisc> StatisticsList = new List<Model.NCRStatisc>();
StatisticsList = new List<Model.NCRStatisc>();
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
StartDate = Convert.ToDateTime(project.StartDate);
EndDate = DateTime.Now;
@@ -60,17 +60,40 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
//统计所给时间段的全部数量
List<Model.ProcessControl_InspectionManagement> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, string.Empty, StartDate, DateTime.Now, false);
List<string> compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList();
foreach (var item in compileMans)
var checkMans = managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split(',').ToList());
List<string> compileMans = new List<string>();
foreach (var item in checkMans)
{
Model.Sys_User user = BLL.UserService.GetUserByUserId(item);
string id = item.FirstOrDefault().Trim();
compileMans.Add(id);
}
checkMans= managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split('、').ToList());
foreach (var item in checkMans)
{
string name = item.FirstOrDefault().Trim();
compileMans.Add(name);
}
//List<string> compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList();
foreach (var item in compileMans.Distinct())
{
Model.NCRStatisc Statistics = new Model.NCRStatisc();
Model.Sys_User user = BLL.UserService.GetUserByUserId(item);//新数据保存的用户Id
if (user != null)
{
Model.NCRStatisc Statistics = new Model.NCRStatisc();
Statistics.WorkName = user.UserName;
Statistics.CheckNum = managementListSunNumber.Where(x => x.CompileMan == item).Count();
Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count();
StatisticsList.Add(Statistics);
}
else
{
Model.Sys_User u = BLL.UserService.GetUserByUserName(item);//老数据保存的姓名
if (u!=null)
{
Statistics.WorkName = u.UserName;
Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count();
StatisticsList.Add(Statistics);
}
}
}
Model.NCRStatisc StatisticsLast = new Model.NCRStatisc();
StatisticsLast.WorkName = "合计";
@@ -114,20 +137,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -287,20 +287,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -288,20 +288,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -21,7 +21,8 @@
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpZhType" runat="server" Label="类别" LabelAlign="Right" EnableEdit="true" LabelWidth="110px" AutoPostBack="true" OnSelectedIndexChanged="drpZhType_SelectedIndexChanged">
<f:ListItem Value="1" Text="专业" Selected="true" />
<f:ListItem Value="" Text="-请选择-" />
<f:ListItem Value="1" Text="专业" />
<f:ListItem Value="2" Text="单位名称" />
</f:DropDownList>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="" LabelAlign="Right" EnableEdit="true">
@@ -3,10 +3,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.ProcessControl
{
@@ -29,7 +25,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
}
else
else if(drpZhType.SelectedValue.Equals("2"))
{
BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位名称 -", BLL.Const._Null));
@@ -73,14 +69,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
//统计所给时间段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
else if (ZyType == "2")
{
//统计所给时间段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
//统计所给时间段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -108,13 +110,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
}
else
else if (ZyType == "2")
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -142,7 +151,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
else if(ZyType=="2")
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
@@ -150,6 +159,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
@@ -178,13 +194,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
}
else
else if (ZyType == "2")
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -226,7 +249,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
else if(ZyType=="2")
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
@@ -234,6 +257,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -260,12 +290,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
}
else
else if(ZyType=="2")
{ //统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -333,13 +370,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
}
else
else if(ZyType=="2")
{
//统计所给时间段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
//统计所给时间段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
}
else
{
//统计所给事件段的全部数量
managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false);
//统计所给事件段的合格数量
managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true);
}
Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -515,7 +559,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
}
else
else if(drpZhType.SelectedValue.Equals("2"))
{
BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位 -", BLL.Const._Null));
@@ -105,11 +105,13 @@
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click" Hidden="true">
</f:MenuButton>
<f:MenuButton ID="btnPrinter" EnablePostBack="true" runat="server"
Text="导出" Icon="Printer" OnClick="btnPrinter_Click" EnableAjax="false" DisableControlBeforePostBack="false">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?" OnClick="btnMenuDel_Click" Hidden="true">
<f:MenuButton ID="btnMenuCopy" EnablePostBack="true" runat="server" Icon="DatabaseCopy" Text="复制" ConfirmText="确定复制当前数据?" OnClick="btnMenuCopy_Click" Hidden="true">
</f:MenuButton>
</Items>
</f:Menu>
@@ -8,6 +8,7 @@ using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace FineUIPro.Web.CQMS.ProcessControl
{
@@ -185,7 +186,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
//合格的情况下不允许修改
var model = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == Grid1.SelectedRowID);
if (model.IsOnceQualified==true)
if (model.IsOnceQualified == true)
{
Alert.ShowInTop("该共检通知单已合格,不允许修改!", MessageBoxIcon.Warning);
return;
@@ -253,6 +254,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
this.btnMenuDel.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnMenuCopy.Hidden = false;
}
}
}
#endregion
@@ -311,20 +316,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -435,17 +430,17 @@ namespace FineUIPro.Web.CQMS.ProcessControl
var units = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
where y.ProjectId==this.CurrUser.LoginProjectId && y.UnitType== BLL.Const.ProjectUnitType_4
where y.ProjectId == this.CurrUser.LoginProjectId && y.UnitType == BLL.Const.ProjectUnitType_4
orderby x.UnitName
select x).FirstOrDefault();
if (units!=null)
if (units != null)
{
bookmarkUnitName.Text = units.UnitName;
}
}
var projectModel = db.Base_Project.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).FirstOrDefault();
var inspectionModel = db.ProcessControl_InspectionManagement.Where(x => x.InspectionId == Id).FirstOrDefault();
//项目编号
Bookmark bookmarkProjectCode = doc.Range.Bookmarks["projectCode"];
if (bookmarkProjectCode != null)
@@ -575,7 +570,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
builder.StartTable();
builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Font.Size = 10;
@@ -591,7 +586,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
builder.RowFormat.Height = 200 / ManagementDetaillList.Count;
}
else {
else
{
builder.RowFormat.Height = 20;
}
builder.CellFormat.Borders.Left.LineWidth = 1;
@@ -602,7 +598,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
builder.CellFormat.Width = 156;
builder.Write(ConvertControlPointType(item.ControlPointType));
builder.CellFormat.Borders.Left.LineWidth = 0;
// 控制点等级
// 控制点等级
builder.InsertCell();
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
@@ -612,11 +608,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl
var ControlPointType = ConvertClass(item.ControlPointType);
#region
if (ControlPointType.Contains("A") )
if (ControlPointType.Contains("A"))
{
builder.Write("■A ");
}
else {
else
{
builder.Write("□A ");
}
if (ControlPointType.Contains("B"))
@@ -838,8 +835,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
builder.Write("注:如果业主有规定,执行业主的规定。 ");
#endregion
doc.Save(newUrl);
doc.Save(newUrl);
string fileName = Path.GetFileName(newUrl);
FileInfo info = new FileInfo(newUrl);
long fileSize = info.Length;
@@ -860,7 +857,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
}
public class WorkBranchList {
public class WorkBranchList
{
public string UnitWorkId { get; set; }
public string Branch { get; set; }
}
@@ -974,9 +972,84 @@ namespace FineUIPro.Web.CQMS.ProcessControl
uname = CarryUnitIds.ToString();
}
return uname;
}
#endregion
#endregion
/// <summary>
/// 复制
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuCopy_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
var inspection = BLL.InspectionManagementService.GetInspectionManagementById(this.Grid1.SelectedRowID);
if (inspection != null)
{
Model.ProcessControl_InspectionManagement newInspection = new Model.ProcessControl_InspectionManagement();
newInspection.InspectionId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagement));
newInspection.ProjectId = this.CurrUser.LoginProjectId;
newInspection.UnitId = inspection.UnitId;
newInspection.CNProfessionalId = inspection.CNProfessionalId;
newInspection.InspectionCode = inspection.InspectionCode;
newInspection.UnitWorkId = inspection.UnitWorkId;
newInspection.Branch = inspection.Branch;
newInspection.ControlPointType = inspection.ControlPointType;
newInspection.AcceptanceSite = inspection.AcceptanceSite;
newInspection.IsOnceQualified = inspection.IsOnceQualified;
newInspection.InspectionDate = inspection.InspectionDate;
newInspection.AttachUrl = inspection.AttachUrl;
newInspection.CheckDate = inspection.CheckDate;
newInspection.CheckMan = inspection.CheckMan;
newInspection.UnqualifiedReason = inspection.UnqualifiedReason;
//通知单编号后有字母递增,无则加“a”
string fisrtE = inspection.NoticeCode.Substring(0,inspection.NoticeCode.Length - 1);
string lastE = inspection.NoticeCode.Substring(inspection.NoticeCode.Length - 1, 1);
bool b = Regex.IsMatch(lastE, "[a-zA-Z]");
if (b)
{
int x = (int)Convert.ToByte(Convert.ToChar(lastE));
newInspection.NoticeCode = fisrtE + Convert.ToChar(x + 1);
}
else
{
newInspection.NoticeCode = inspection.NoticeCode + "a";
}
newInspection.AcceptanceCheckMan = inspection.AcceptanceCheckMan;
newInspection.ParentDivisionProjectId = inspection.ParentDivisionProjectId;
newInspection.CompileMan = this.CurrUser.UserId;
newInspection.CompileDate = DateTime.Now;
newInspection.FileType = inspection.FileType;
newInspection.AttachUrl2 = inspection.AttachUrl2;
BLL.InspectionManagementService.AddInspectionManagement(newInspection);
var details = InspectionManagementDetailService.GetInspectionDetails(inspection.InspectionId);
if (details.Count > 0)
{
foreach (var item in details)
{
Model.ProcessControl_InspectionManagementDetail newDetail = new Model.ProcessControl_InspectionManagementDetail();
newDetail.InspectionDetailId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagementDetail));
newDetail.InspectionId = newInspection.InspectionId;
newDetail.UnitWorkId = item.UnitWorkId;
newDetail.Branch = item.Branch;
newDetail.ControlPointType = item.ControlPointType;
newDetail.CreateDate = DateTime.Now;
BLL.InspectionManagementDetailService.AddInspectionDetail(newDetail);
}
}
ShowNotify("复制成功!");
BindGrid();
}
}
}
}
@@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class InspectionNotice
{
namespace FineUIPro.Web.CQMS.ProcessControl {
public partial class InspectionNotice {
/// <summary>
/// form1 控件。
/// </summary>
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolSearch 控件。
/// </summary>
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// drpUnitWork 控件。
/// </summary>
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitWork;
/// <summary>
/// drpCNProfessional 控件。
/// </summary>
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCNProfessional;
/// <summary>
/// txtStarTime 控件。
/// </summary>
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnSearch 控件。
/// </summary>
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// Label3 控件。
/// </summary>
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// lbtnFileUrl 控件。
/// </summary>
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -175,7 +173,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -184,7 +182,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -193,7 +191,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuModify 控件。
/// </summary>
@@ -202,16 +200,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnPrinter 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnPrinter;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
@@ -220,5 +209,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
/// <summary>
/// btnPrinter 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnPrinter;
/// <summary>
/// btnMenuCopy 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuCopy;
}
}
@@ -22,6 +22,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
if (!string.IsNullOrEmpty(Request.Params["View"]))
{
@@ -272,20 +272,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
@@ -259,20 +259,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
var font0 = workbook.CreateFont();
font0.FontHeightInPoints = 12;
font0.IsBold = true;
cellStyle0.SetFont(font0);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
+40
View File
@@ -1381,6 +1381,9 @@
<Content Include="JDGL\Check\MeterCompletionEdit.aspx" />
<Content Include="JDGL\Check\MeterCompletionIn.aspx" />
<Content Include="JDGL\Check\MonthPlan.aspx" />
<Content Include="JDGL\Check\MonthPlanEdit.aspx" />
<Content Include="JDGL\Check\MonthPlanIn.aspx" />
<Content Include="JDGL\Check\MonthPlanStatisc.aspx" />
<Content Include="JDGL\Check\PipelineCompletion.aspx" />
<Content Include="JDGL\Check\PipelineCompletionEdit.aspx" />
<Content Include="JDGL\Check\PipelineCompletionIn.aspx" />
@@ -1402,6 +1405,8 @@
<Content Include="JDGL\Check\UndergroundPipeCompletion.aspx" />
<Content Include="JDGL\Check\UndergroundPipeCompletionEdit.aspx" />
<Content Include="JDGL\Check\UndergroundPipeCompletionIn.aspx" />
<Content Include="JDGL\Check\WeekPlan.aspx" />
<Content Include="JDGL\Check\WeekPlanIn.aspx" />
<Content Include="JDGL\CostAnalysis\EarnedValueCurve.aspx" />
<Content Include="JDGL\CostAnalysis\JDReport.aspx" />
<Content Include="JDGL\CostAnalysis\PlanAdjust.aspx" />
@@ -13767,6 +13772,27 @@
<Compile Include="JDGL\Check\MonthPlan.aspx.designer.cs">
<DependentUpon>MonthPlan.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\MonthPlanEdit.aspx.cs">
<DependentUpon>MonthPlanEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\MonthPlanEdit.aspx.designer.cs">
<DependentUpon>MonthPlanEdit.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\MonthPlanIn.aspx.cs">
<DependentUpon>MonthPlanIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\MonthPlanIn.aspx.designer.cs">
<DependentUpon>MonthPlanIn.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\MonthPlanStatisc.aspx.cs">
<DependentUpon>MonthPlanStatisc.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\MonthPlanStatisc.aspx.designer.cs">
<DependentUpon>MonthPlanStatisc.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\PipelineCompletion.aspx.cs">
<DependentUpon>PipelineCompletion.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -13914,6 +13940,20 @@
<Compile Include="JDGL\Check\UndergroundPipeCompletionIn.aspx.designer.cs">
<DependentUpon>UndergroundPipeCompletionIn.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\WeekPlan.aspx.cs">
<DependentUpon>WeekPlan.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\WeekPlan.aspx.designer.cs">
<DependentUpon>WeekPlan.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\WeekPlanIn.aspx.cs">
<DependentUpon>WeekPlanIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\WeekPlanIn.aspx.designer.cs">
<DependentUpon>WeekPlanIn.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\CostAnalysis\EarnedValueCurve.aspx.cs">
<DependentUpon>EarnedValueCurve.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />
+5 -3
View File
@@ -16,7 +16,7 @@
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="月度计划情况" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="MonthPlanId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="1" DataIDField="MonthPlanId" AllowSorting="true" SortField="SortIndex,Name"
ClicksToEdit="1" DataIDField="MonthPlanId" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="1000"
AllowFilters="true" EnableTextSelection="True">
@@ -30,6 +30,8 @@
OnClick="btnSave_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="BtnAnalyse" ToolTip="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
@@ -53,7 +55,7 @@
SortField="UnitName" FieldType="String" HeaderText="责任单位" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="NodeContent" DataField="NodeContent"
<f:RenderField Width="250px" ColumnID="NodeContent" DataField="NodeContent"
SortField="NodeContent" FieldType="String" HeaderText="节点内容" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
@@ -78,7 +80,7 @@
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<f:Window ID="Window1" Title="入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
CloseAction="HidePostBack" Width="1200px" Height="700px">
</f:Window>
+19 -29
View File
@@ -19,7 +19,7 @@ namespace FineUIPro.Web.JDGL.Check
{
GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("MonthPlanEdit.aspx") + "return false;";
this.txtMonths.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BindGrid();
}
}
@@ -51,6 +51,7 @@ namespace FineUIPro.Web.JDGL.Check
protected void btnModify_Click(object sender, EventArgs e)
{
Window1.Title = "录入";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanEdit.aspx?Months={0}", this.txtMonths.Text, "编辑 - ")));
}
@@ -59,34 +60,9 @@ namespace FineUIPro.Web.JDGL.Check
/// </summary>
private void BindGrid()
{
string strSql = @"select qc.MonthPlanId,(select PlanNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as PlanNum,
(select RealNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as RealNum,
(select NextNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as NextNum,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex,
CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalPlanNum,
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalRealNum,
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(qc.PlanNum, 0) WHEN 0 THEN 0
ELSE 100 * ISNULL(qc.RealNum, 0) / (1.0 * qc.PlanNum) END AS DECIMAL(9, 2))))) + '%'
AS Rate,
CONVERT(NVARCHAR(10), ((CAST(CASE(select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) WHEN 0 THEN 0
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) END AS DECIMAL(9, 2)))))+'%'
AS TotalRate,
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(ql.DesignNum, 0) WHEN 0 THEN 0
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%'
AS SumRate,
CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalPlanNum,
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalRealNum
from[dbo].JDGL_QuantityList ql
left join dbo.[JDGL_MonthPlan] qc on ql.QuantityListId=qc.QuantityListId
where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.QuantityListId=qc.QuantityListId and q.Months<=@month order by q.Months desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name";
//string strSql = @"select *
// from dbo.View_JDGL_MonthPlan qc
// where qc.ProjectId=@ProjectId order by qc.SortIndex, qc.Name";
string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName from [dbo].[JDGL_MonthPlan] mp
left join Base_Unit u on u.UnitId=mp.UnitId
left join Sys_User us on us.UserId=mp.DutyPerson where mp.ProjectId=@ProjectId and mp.Months=@month order by mp.SortIndex";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@month", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01"))));
@@ -167,6 +143,7 @@ where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.Qu
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
Window1.Title = "导入";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - ")));
}
@@ -180,5 +157,18 @@ where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.Qu
BindGrid();
}
#endregion
#region
/// <summary>
/// 统计分析
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
Window1.Title = "统计";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanStatisc.aspx", "统计 - ")));
}
#endregion
}
}
@@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.Check {
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -0,0 +1,104 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanEdit.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Panel ID="Panel17" IsFluid="true" Title="月度计划情况" runat="server" EnableCollapse="false"
ShowHeader="true">
<Toolbars>
<f:Toolbar ID="Toolbar5" Position="top" ToolbarAlign="Right" runat="server" CssClass="Toolbar2">
<Items>
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right" LabelWidth="80px"
EnableEdit="true" DateFormatString="yyyy-MM" AutoPostBack="true" DisplayType="Month" OnTextChanged="txtMonths_TextChanged">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="Form15" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="月度计划情况">
<Rows>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false" OnRowCommand="Grid1_RowCommand"
DataKeyNames="MonthPlanId" DataIDField="MonthPlanId" EnableColumnLines="true" ForceFit="true" AllowCellEditing="true" ClicksToEdit="1">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnNew" ToolTip="新增" Text="" Icon="Add" EnablePostBack="true"
runat="server" OnClick="btnNew_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="UnitId" DataField="UnitId"
FieldType="String" HeaderText="责任单位" TextAlign="Center"
HeaderTextAlign="Center">
<Editor>
<f:DropDownList runat="server" ID="drpUnitId" EnableEdit="true"></f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField Width="250px" ColumnID="NodeContent" DataField="NodeContent"
FieldType="String" HeaderText="节点内容" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="txtNodeContent" runat="server" Text='<%# Bind("NodeContent") %>'>
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="95px" ColumnID="PlanDate" DataField="PlanDate" Renderer="Date" RendererArgument="yyyy-MM-dd"
FieldType="Date" HeaderText="计划完成时间" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:DatePicker ID="txtPlanDate" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" DateFormatString="yyyy-MM-dd"></f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DutyPerson" DataField="DutyPerson"
FieldType="String" HeaderText="五环责任人" TextAlign="Center"
HeaderTextAlign="Center">
<Editor>
<f:DropDownList runat="server" ID="drpDutyPerson" EnableEdit="true"></f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField Width="95px" ColumnID="RealDate" DataField="RealDate" Renderer="Date" RendererArgument="yyyy-MM-dd"
FieldType="Date" HeaderText="实际完成时间" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:DatePicker ID="txtRealDate" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" DateFormatString="yyyy-MM-dd"></f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="备注" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="txtRemark" runat="server" Text='<%# Bind("Remark") %>'>
</f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField Width="40px" TextAlign="Center" HeaderText="删除" ToolTip="删除" CommandName="del"
Icon="Delete" />
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Panel>
</form>
</body>
</html>
@@ -0,0 +1,188 @@
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.JDGL.Check
{
public partial class MonthPlanEdit : PageBase
{
/// <summary>
/// 项目id
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01");
if (!string.IsNullOrEmpty(Request.Params["Months"]))
{
months = Convert.ToDateTime(Request.Params["Months"] + "-01");
}
BLL.ProjectUnitService.InitUnitDropDownList2(drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
UserService.Init(drpDutyPerson, CurrUser.LoginProjectId, false);
this.txtMonth.Text = string.Format("{0:yyyy-MM}", months);
BindGrid();
}
}
/// <summary>
/// 加载Grid
/// </summary>
private void BindGrid()
{
DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01");
Model.SGGLDB db = Funs.DB;
Grid1.DataSource = from x in db.JDGL_MonthPlan
where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months
orderby x.SortIndex
select new
{
x.MonthPlanId,
x.ProjectId,
x.Months,
UnitId = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
x.NodeContent,
x.PlanDate,
DutyPerson = db.Sys_User.First(y => y.UserId == x.DutyPerson).UserName,
x.RealDate,
x.Remark,
};
Grid1.DataBind();
}
#region
/// <summary>
/// 月份选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtMonths_TextChanged(object sender, EventArgs e)
{
BindGrid();
}
#endregion
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtMonth.Text))
{
ShowNotify("请选择月份!", MessageBoxIcon.Warning);
}
SaveData(true);
}
private void SaveData(bool bl)
{
DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01");
var list = GetDetails();
var units = from x in Funs.DB.Base_Unit select x;
var users = from x in Funs.DB.Sys_User select x;
BLL.MonthPlanService.DeleteAllMonthPlan(this.CurrUser.LoginProjectId, months);
Model.SGGLDB db = Funs.DB;
int i = 1;
foreach (var item in list)
{
Model.JDGL_MonthPlan MonthPlan = new Model.JDGL_MonthPlan();
MonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan));
MonthPlan.ProjectId = this.CurrUser.LoginProjectId;
MonthPlan.Months = months;
var unit = units.FirstOrDefault(x => x.UnitName == item.UnitId);
if (unit != null)
{
MonthPlan.UnitId = unit.UnitId;
}
MonthPlan.NodeContent = item.NodeContent;
MonthPlan.PlanDate = item.PlanDate;
var user = users.FirstOrDefault(x => x.UserName == item.DutyPerson);
if (user != null)
{
MonthPlan.DutyPerson = user.UserId;
}
MonthPlan.RealDate = item.RealDate;
MonthPlan.Remark = item.Remark;
MonthPlan.CompileMan = this.CurrUser.UserId;
MonthPlan.CompileDate = DateTime.Now;
MonthPlan.SortIndex = i;
BLL.MonthPlanService.AddMonthPlan(MonthPlan);
i++;
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#region
/// <summary>
/// 增加按钮事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
var list = GetDetails();
Model.JDGL_MonthPlan ql = new Model.JDGL_MonthPlan();
ql.MonthPlanId = SQLHelper.GetNewID();
list.Add(ql);
Grid1.DataSource = list;
Grid1.DataBind();
}
private List<Model.JDGL_MonthPlan> GetDetails()
{
List<Model.JDGL_MonthPlan> list = new List<Model.JDGL_MonthPlan>();
foreach (JObject mergedRow in Grid1.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
int i = mergedRow.Value<int>("index");
Model.JDGL_MonthPlan ql = new Model.JDGL_MonthPlan();
ql.MonthPlanId = Grid1.Rows[i].RowID;
ql.UnitId = values.Value<string>("UnitId");
ql.NodeContent = values.Value<string>("NodeContent");
ql.PlanDate = Funs.GetNewDateTime(values.Value<string>("PlanDate"));
ql.DutyPerson = values.Value<string>("DutyPerson");
ql.RealDate = Funs.GetNewDateTime(values.Value<string>("RealDate"));
ql.Remark = values.Value<string>("Remark");
list.Add(ql);
}
return list;
}
#endregion
#region
/// <summary>
/// Grid行点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
string monthPlanId = Grid1.DataKeys[e.RowIndex][0].ToString();
var list = GetDetails();
if (e.CommandName == "del")//删除
{
var Report = list.FirstOrDefault(x => x.MonthPlanId == monthPlanId);
if (Report != null)
{
list.Remove(Report);
}
this.Grid1.DataSource = list;
this.Grid1.DataBind();
}
}
#endregion
}
}
@@ -0,0 +1,168 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.Check {
public partial class MonthPlanEdit {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel17 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel17;
/// <summary>
/// Toolbar5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar5;
/// <summary>
/// txtMonth 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMonth;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Form15 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form15;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtNodeContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtNodeContent;
/// <summary>
/// txtPlanDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPlanDate;
/// <summary>
/// drpDutyPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDutyPerson;
/// <summary>
/// txtRealDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtRealDate;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
}
}
@@ -0,0 +1,105 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<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="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right" DateFormatString="yyyy-MM" DisplayType="Month"
EnableEdit="true">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
<%--<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表" ValidateForms="SimpleForm1"
OnClick="btnOut_Click" Hidden="true"></f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server" ForceFit="true"
EnableColumnLines="true" BoxFlex="1" DataKeyNames="MonthPlanId" DataIDField="MonthPlanId"
AllowSorting="true" SortField="Name" PageSize="500" Height="400px">
<Columns>
<f:TemplateField Width="55px" HeaderText="序号">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="UnitName" Width="150px" HeaderText="责任单位" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertUnitName(Eval("UnitId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="NodeContent" DataField="NodeContent"
SortField="NodeContent" FieldType="String" HeaderText="节点内容" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="95px" ColumnID="PlanDate" DataField="PlanDate" SortField="PlanDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="DutyPersonName" Width="100px" HeaderText="五环责任人" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertDutyPersonName(Eval("DutyPerson")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="95px" ColumnID="RealDate" DataField="RealDate" SortField="RealDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:FormRow>
<%-- <f:FormRow>
<Items>
<f:Label ID="lblBottom" runat="server" Text="说明:1 人员信息导入模板中,灰色项为必填项。2 身份证号码必须为15或18位,所属单位、所在班组、单位工程、岗位、特岗证书等必须与基础信息中对应类型的名称一致,否则无法导入。3 如需修改已有人员信息,请到系统中修改。4 数据导入后,点击“保存”,即可完成人员信息导入。">
</f:Label>
</Items>
</f:FormRow>--%>
</Rows>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,615 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web.UI;
namespace FineUIPro.Web.JDGL.Check
{
public partial class MonthPlanIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 人员集合
/// </summary>
public static List<Model.JDGL_MonthPlan> MonthPlans = new List<Model.JDGL_MonthPlan>();
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
/// <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)
{
this.hdFileName.Text = string.Empty;
this.hdCheckResult.Text = string.Empty;
if (MonthPlans != null)
{
MonthPlans.Clear();
}
errorInfos = string.Empty;
this.ProjectId = Request.Params["ProjectId"];
}
}
#endregion
#region
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
try
{
if (this.fuAttachUrl.HasFile == false)
{
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls")
{
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
return;
}
if (MonthPlans != null)
{
MonthPlans.Clear();
}
if (!string.IsNullOrEmpty(errorInfos))
{
errorInfos = string.Empty;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
string filePath = initFullPath + this.hdFileName.Text;
this.fuAttachUrl.PostedFile.SaveAs(filePath);
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - ")));
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
}
catch (Exception ex)
{
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 6);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集行数</param>
/// <returns></returns>
private bool AddDatasetToSQL(DataTable pds, int Cols)
{
string result = string.Empty;
int ic, ir;
ic = pds.Columns.Count;
if (ic < Cols)
{
Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning);
}
ir = pds.Rows.Count;
Model.SGGLDB db = Funs.DB;
var projectUnits = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UnitId, y.UnitName };
var projectUsers = from x in db.Project_ProjectUser
join y in db.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UserId, y.UserName };
if (pds != null && ir > 0)
{
for (int i = 0; i < ir; i++)
{
string col0 = pds.Rows[i][0].ToString().Trim();
if (string.IsNullOrEmpty(col0))
{
result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|";
}
else
{
var unit = projectUnits.FirstOrDefault(e => e.UnitName == col0);
if (unit == null)
{
result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col0 + "]不在项目单位中!" + "|";
}
}
string col1 = pds.Rows[i][1].ToString().Trim();
if (string.IsNullOrEmpty(col1))
{
result += "第" + (i + 2).ToString() + "行," + "节点内容" + "," + "此项为必填项!" + "|";
}
string col2 = pds.Rows[i][2].ToString().Trim();
if (!string.IsNullOrEmpty(col2))
{
try
{
DateTime dec = Convert.ToDateTime(col2);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col2 + "]错误!" + "|";
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|";
}
string col3 = pds.Rows[i][3].ToString().Trim();
if (string.IsNullOrEmpty(col3))
{
result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|";
}
else
{
var user = projectUsers.FirstOrDefault(e => e.UserName == col3);
if (user == null)
{
result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col3 + "]不在项目用户信息中!" + "|";
}
}
string col4 = pds.Rows[i][4].ToString().Trim();
if (!string.IsNullOrEmpty(col4))
{
try
{
DateTime dec = Convert.ToDateTime(col4);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "实际完成时间" + "," + "[" + col4 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = result;
Alert alert = new Alert
{
Message = result,
Target = Target.Self
};
alert.Show();
}
else
{
errorInfos = string.Empty;
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
#region
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(errorInfos))
{
if (!string.IsNullOrEmpty(this.hdFileName.Text))
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
}
else
{
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 6);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集列数</param>
/// <returns></returns>
private bool AddDatasetToSQL2(DataTable pds, int Cols)
{
int ic, ir;
MonthPlans.Clear();
ic = pds.Columns.Count;
if (ic < Cols)
{
Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
ir = pds.Rows.Count;
Model.SGGLDB db = Funs.DB;
var projectUnits = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UnitId,y.UnitName};
var projectUsers = from x in db.Project_ProjectUser
join y in db.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UserId,y.UserName};
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
if (pds != null && ir > 0)
{
for (int i = 0; i < ir; i++)
{
Model.JDGL_MonthPlan MonthPlan = new Model.JDGL_MonthPlan();
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
if (!string.IsNullOrEmpty(col0))//责任单位
{
var projectUnit = projectUnits.FirstOrDefault(x=>x.UnitName==col0);
if (projectUnit != null)
{
MonthPlan.UnitId = projectUnit.UnitId;
}
}
if (!string.IsNullOrEmpty(col1))//节点内容
{
MonthPlan.NodeContent = col1;
}
if (!string.IsNullOrEmpty(col2))//计划完成时间
{
MonthPlan.PlanDate = Funs.GetNewDateTime(col2);
}
if (!string.IsNullOrEmpty(col3))//计划完成
{
var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col3);
if (projectUser != null)
{
MonthPlan.DutyPerson = projectUser.UserId;
}
}
if (!string.IsNullOrEmpty(col4))//实际完成时间
{
MonthPlan.RealDate = Funs.GetNewDateTime(col4);
}
if (!string.IsNullOrEmpty(col5))//备注
{
MonthPlan.Remark = col5;
}
int num = (from x in Funs.DB.JDGL_MonthPlan where x.Months == month && x.ProjectId == this.CurrUser.LoginProjectId select x).Count();
MonthPlan.SortIndex = num + 1;
MonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan));
MonthPlans.Add(MonthPlan);
}
if (MonthPlans.Count > 0)
{
this.Grid1.Hidden = false;
this.Grid1.DataSource = MonthPlans;
this.Grid1.DataBind();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
#region
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
ShowNotify("请选择月份!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(errorInfos))
{
var monthPlanLists = from x in Funs.DB.JDGL_MonthPlan where x.ProjectId == this.ProjectId select x;
string quantityListId = string.Empty;
int a = MonthPlans.Count();
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
for (int i = 0; i < a; i++)
{
var oldMonthPlan = monthPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Months == month && x.UnitId == MonthPlans[i].UnitId && x.NodeContent== MonthPlans[i].NodeContent);
if (oldMonthPlan == null)
{
Model.JDGL_MonthPlan newMonthPlan = new Model.JDGL_MonthPlan();
newMonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan));
newMonthPlan.ProjectId = this.ProjectId;
newMonthPlan.Months = month;
newMonthPlan.UnitId = MonthPlans[i].UnitId;
newMonthPlan.NodeContent = MonthPlans[i].NodeContent;
newMonthPlan.PlanDate = MonthPlans[i].PlanDate;
newMonthPlan.DutyPerson = MonthPlans[i].DutyPerson;
newMonthPlan.RealDate = MonthPlans[i].RealDate;
newMonthPlan.Remark = MonthPlans[i].Remark;
newMonthPlan.SortIndex= MonthPlans[i].SortIndex;
newMonthPlan.CompileMan = this.CurrUser.UserId;
newMonthPlan.CompileDate = DateTime.Now;
BLL.MonthPlanService.AddMonthPlan(newMonthPlan);
}
else
{
oldMonthPlan.NodeContent = MonthPlans[i].NodeContent;
oldMonthPlan.PlanDate = MonthPlans[i].PlanDate;
oldMonthPlan.DutyPerson = MonthPlans[i].DutyPerson;
oldMonthPlan.RealDate = MonthPlans[i].RealDate;
oldMonthPlan.Remark = MonthPlans[i].Remark;
BLL.MonthPlanService.UpdateMonthPlan(oldMonthPlan);
}
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
string filePath = initFullPath + this.hdFileName.Text;
if (filePath != string.Empty && System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);//删除上传的XLS文件
}
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 导出错误提示
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
//string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss");
//System.Web.HttpContext HC = System.Web.HttpContext.Current;
//HC.Response.Clear();
//HC.Response.Buffer = true;
//HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文
////---导出为Excel文件
//HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls");
//HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
//System.IO.StringWriter sw = new System.IO.StringWriter();
//System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
//this.gvErrorInfo.RenderControl(htw);
//HC.Response.Write(sw.ToString());
//HC.Response.End();
}
/// <summary>
/// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
/// </summary>
/// <param name="control"></param>
public override void VerifyRenderingInServerForm(Control control)
{
}
#endregion
#region
/// <summary>
/// 下载模板按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDownLoad_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
{
if (e.EventArgument == "Confirm_OK")
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.MonthPlanTemplateUrl;
string filePath = Const.MonthPlanTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertUnitName(object UnitId)
{
string name = string.Empty;
if (UnitId != null)
{
name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString());
}
return name;
}
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertDutyPersonName(object DutyPerson)
{
string name = string.Empty;
if (DutyPerson != null)
{
name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString());
}
return name;
}
}
}
+159
View File
@@ -0,0 +1,159 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.Check {
public partial class MonthPlanIn {
/// <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>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtMonth 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMonth;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// lbImageUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
}
}
@@ -0,0 +1,83 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanStatisc.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanStatisc" %>
<!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="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" Title="月度计划情况统计" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="true" SortDirection="DESC" BoxFlex="1" AllowCellEditing="true"
DataKeyNames="DesignId" EnableColumnLines="true" ClicksToEdit="2" AllowSorting="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
AllowFilters="true" EnableTextSelection="True" >
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" ID="txtMonths" DateFormatString="yyyy-MM" DisplayType="Month" AutoPostBack="true" OnTextChanged="ckType_SelectedIndexChanged"
Label="月份" LabelWidth="50px" Width="150px">
</f:DatePicker>
<f:RadioButtonList runat="server" ID="ckType" AutoPostBack="True" Width="300px"
OnSelectedIndexChanged="ckType_SelectedIndexChanged">
<f:RadioItem Value="1" Text="按责任单位" Selected="True"></f:RadioItem>
<f:RadioItem Value="2" Text="按五环责任人" ></f:RadioItem>
</f:RadioButtonList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Hidden="true"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Hidden="true"
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="NodeContent" DataField="NodeContent"
FieldType="String" HeaderText="责任单位" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UnitId" DataField="UnitId"
FieldType="String" HeaderText="计划项总数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="DutyPerson" DataField="DutyPerson"
FieldType="String" HeaderText="累计完成总数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="完成比例" TextAlign="Center" HeaderTextAlign="Center">
</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:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>
@@ -0,0 +1,280 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.JDGL.Check
{
public partial class MonthPlanStatisc : PageBase
{
private static List<Model.JDGL_MonthPlan> StatisticsList = new List<Model.JDGL_MonthPlan>();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BindStatisc();
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtMonths.Text.Trim()))
{
Alert.ShowInTop("月份不能为空!", MessageBoxIcon.Warning);
return;
}
BindStatisc();
}
#region GridView
/// <summary>
/// 绑定
/// </summary>
/// <param name="cNProfessionalId"></param>
public void BindStatisc()
{
DateTime months = Convert.ToDateTime(this.txtMonths.Text + "-01");
StatisticsList = new List<Model.JDGL_MonthPlan>();
int i = 1;
Model.SGGLDB db = Funs.DB;
//所有集合
var totalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x;
if (this.ckType.SelectedValue == "1") //按责任单位
{
var pUnit = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
orderby y.UnitCode
select y;
foreach (var item in pUnit)
{
//当期集合
var list = totalList.Where(x => x.UnitId == item.UnitId);
Model.JDGL_MonthPlan JDGL_MonthPlan = new Model.JDGL_MonthPlan();
JDGL_MonthPlan.NodeContent = item.UnitName;
int a = list.Count();
int b = list.Count(x => x.RealDate.HasValue);
JDGL_MonthPlan.UnitId = a.ToString();
JDGL_MonthPlan.DutyPerson = b.ToString();
if (a != 0)//被除数不能为零
{
JDGL_MonthPlan.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
JDGL_MonthPlan.Remark = "0%";
}
StatisticsList.Add(JDGL_MonthPlan);
i++;
}
}
else //按五环责任人
{
var user = (from x in db.Sys_User
join y in db.JDGL_MonthPlan on x.UserId equals y.DutyPerson
where y.ProjectId == this.CurrUser.LoginProjectId
orderby x.UserId
select x).Distinct().ToList();
foreach (var item in user)
{
//所有集合
var list = totalList.Where(x => x.DutyPerson == item.UserId);
Model.JDGL_MonthPlan JDGL_MonthPlan = new Model.JDGL_MonthPlan();
JDGL_MonthPlan.NodeContent = item.UserName;
int a = list.Count();
int b = list.Count(x => x.RealDate.HasValue);
JDGL_MonthPlan.UnitId = a.ToString();
JDGL_MonthPlan.DutyPerson = b.ToString();
if (a != 0)//被除数不能为零
{
JDGL_MonthPlan.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
JDGL_MonthPlan.Remark = "0%";
}
StatisticsList.Add(JDGL_MonthPlan);
i++;
}
}
if (StatisticsList.Count() > 0) //增加总计
{
Model.JDGL_MonthPlan StatisticsLast = new Model.JDGL_MonthPlan();
StatisticsLast.NodeContent = "合计";
int a = totalList.Count();
int b = totalList.Count(x => x.RealDate.HasValue);
StatisticsLast.UnitId = a.ToString();
StatisticsLast.DutyPerson = b.ToString();
if (a != 0)//被除数不能为零
{
StatisticsLast.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
StatisticsLast.Remark = "0%";
}
StatisticsList.Add(StatisticsLast);
}
this.Grid1.DataSource = StatisticsList;
this.Grid1.DataBind();
}
#endregion
protected void ckType_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.ckType.SelectedValue == "1")
{
this.Grid1.Columns[1].HeaderText = "责任单位";
}
else
{
this.Grid1.Columns[1].HeaderText = "五环责任人";
}
BindStatisc();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindStatisc();
}
#region
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
//string rootPath = Server.MapPath("~/");
//string initTemplatePath = Const.JDGL_MonthPlanTemlUrl;
//string uploadfilepath = string.Empty;
//string newUrl = string.Empty;
//uploadfilepath = rootPath + initTemplatePath;
//if (StatisticsList != null)
//{
// string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
// newUrl = uploadfilepath.Replace("NCR统计模板", "NCR统计(" + projectName + DateTime.Now.ToString("yyyyMMdd") + "");
// File.Copy(uploadfilepath, newUrl);
// // 第一步:读取文件流
// NPOI.SS.UserModel.IWorkbook workbook;
// using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
// {
// //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
// workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
// }
// // 创建单元格样式
// NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
// cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
// cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
// cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
// cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
// cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
// cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
// cellStyle.WrapText = true;//自动换行
// var font = workbook.CreateFont();
// font.FontHeightInPoints = 11;
// cellStyle.SetFont(font);
// // 第二步:创建新数据行
// NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
// NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
// NPOI.SS.UserModel.ICell cell;
// int i = 2;
// foreach (var item in StatisticsList)
// {
// // 第二步:创建新数据行
// row = sheet.CreateRow(i);
// // 添加数据
// cell = row.CreateCell(0);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.WorkName);//工作名称
// cell = row.CreateCell(1);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.CheckNum);
// cell = row.CreateCell(2);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.OKNum);
// cell = row.CreateCell(3);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.NotOKNum);
// cell = row.CreateCell(4);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.OKRate);
// cell = row.CreateCell(5);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.Remark);
// i++;
// }
// // 第三步:写入文件流
// using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
// {
// workbook.Write(stream);
// workbook.Close();
// }
// string fileName = Path.GetFileName(newUrl);
// FileInfo info = new FileInfo(newUrl);
// long fileSize = info.Length;
// Response.Clear();
// Response.ContentType = "application/x-zip-compressed";
// Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
// Response.AddHeader("Content-Length", fileSize.ToString());
// Response.TransmitFile(newUrl, 0, fileSize);
// Response.Flush();
// Response.Close();
// File.Delete(newUrl);
//}
//else
//{
// Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
//}
}
/// <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>");
// grid.PageSize = 10000;
// BindStatisc();
// 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("labNumber") as AspNet.Label).Text;
// }
// sb.AppendFormat("<td>{0}</td>", html);
// }
// sb.Append("</tr>");
// }
// sb.Append("</table>");
// return sb.ToString();
//}
#endregion
}
}
@@ -0,0 +1,132 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.Check {
public partial class MonthPlanStatisc {
/// <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>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtMonths 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMonths;
/// <summary>
/// ckType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList ckType;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <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;
}
}
@@ -19,7 +19,7 @@ namespace FineUIPro.Web.JDGL.Check
{
GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("QuantityCompletionEdit.aspx") + "return false;";
this.txtMonths.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BindGrid();
}
}
@@ -95,61 +95,6 @@
</f:Form>
</Items>
</f:Panel>
<%--<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right" LabelWidth="150px"
EnableEdit="true" >
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtName" runat="server" Label="类型" LabelAlign="Right" LabelWidth="150px" ShowRedStar="true" Required="true"
MaxLength="50">
</f:TextBox>
<f:TextBox ID="txtUnit" runat="server" Label="单位" LabelAlign="Right" ShowRedStar="true" Required="true"
MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtDesignNum" Required="true" ShowRedStar="true" Label="设计数量" LabelWidth="150px" NoDecimal="false" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtPlanNum" Required="true" ShowRedStar="true" Label="计划完成" LabelWidth="150px" NoDecimal="false" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtRealNum" Required="true" ShowRedStar="true" Label="实际完成" LabelWidth="150px" NoDecimal="false" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtNextNum" Label="下月计划" LabelWidth="150px" NoDecimal="false" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false"
runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>--%>
</form>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More