diff --git a/DataBase/版本日志/SGGLDB_V2023-03-24-002.sql b/DataBase/版本日志/SGGLDB_V2023-03-24-002.sql new file mode 100644 index 00000000..3e843138 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-03-24-002.sql @@ -0,0 +1,1076 @@ +ALTER TABLE Base_WorkPost ADD IsCQMS BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_WorkPost', @level2type=N'COLUMN',@level2name=N'IsCQMS' +GO + +ALTER TABLE Solution_LargerHazard ADD IsSuperLargerHazard BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷΣ󹤳' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_LargerHazard', @level2type=N'COLUMN',@level2name=N'IsSuperLargerHazard' +GO +ALTER TABLE Solution_LargerHazard ADD TrainPersonNum INT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_LargerHazard', @level2type=N'COLUMN',@level2name=N'TrainPersonNum' +GO + + +CREATE TABLE [dbo].[Comprehensive_InspectionMachine]( + [InspectionMachineId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [InspectionMachineCode] [nvarchar](50) NOT NULL, + [InspectionMachineName] [nvarchar](50) NULL, + [SpecificationModel] [nvarchar](50) NULL, + [NextTestDate] [datetime] NULL, + [TestCycle] [nvarchar](50) NULL, + [IsVerification] [bit] NULL, + [InspectionDate] [datetime] NULL, + [AttachUrl] [nvarchar](2000) NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [IsOnSite] [bit] NULL, + [InspectionType] [nvarchar](20) NULL, + [LeaveDate] [datetime] NULL, + [UnitsCount] [int] NULL, + [AuditMan] [nvarchar](50) NULL, + [Status] [nvarchar](2) NULL, + [IsCheckOK] [bit] NULL, + CONSTRAINT [PK_Comprehensive_InspectionMachine] PRIMARY KEY CLUSTERED +( + [InspectionMachineId] 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].[Comprehensive_InspectionMachine] WITH CHECK ADD CONSTRAINT [Comprehensive_InspectionMachine_Base_CNProfessional] FOREIGN KEY([CNProfessionalId]) +REFERENCES [dbo].[Base_CNProfessional] ([CNProfessionalId]) +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionMachine] CHECK CONSTRAINT [Comprehensive_InspectionMachine_Base_CNProfessional] +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionMachine] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_InspectionMachine_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionMachine] CHECK CONSTRAINT [FK_Comprehensive_InspectionMachine_Base_Project] +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionMachine] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_InspectionMachine_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionMachine] CHECK CONSTRAINT [FK_Comprehensive_InspectionMachine_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'InspectionMachineId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @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'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'InspectionMachineCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'InspectionMachineName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'SpecificationModel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'´μ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'NextTestDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'TestCycle' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷУ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'IsVerification' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'У' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'InspectionDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'볡ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'LeaveDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'̨' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine', @level2type=N'COLUMN',@level2name=N'UnitsCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'߱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionMachine' +GO + +CREATE TABLE [dbo].[Comprehensive_InspectionMachineApprove]( + [InspectionMachineApproveId] [nvarchar](50) NOT NULL, + [InspectionMachineId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_InspectionMachineApprove] PRIMARY KEY CLUSTERED +( + [InspectionMachineApproveId] 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 + + +CREATE TABLE [dbo].[Comprehensive_InspectionPerson]( + [InspectionPersonId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [InspectionPersonCode] [nvarchar](50) NOT NULL, + [PersonName] [nvarchar](50) NULL, + [PostId] [nvarchar](50) NULL, + [CertificateNumber] [nvarchar](50) NULL, + [QualifiedProjectCode] [nvarchar](500) NULL, + [ValidityDate] [datetime] NULL, + [ApprovalTime] [datetime] NULL, + [DepartureTime] [datetime] NULL, + [Remark] [nvarchar](150) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [IsOnSite] [bit] NULL, + [UnitWorkId] [nvarchar](500) NULL, + [AuditMan] [nvarchar](50) NULL, + [Status] [nvarchar](2) NULL, + [IsTrain] [bit] NULL, + CONSTRAINT [PK_Comprehensive_InspectionPerson] PRIMARY KEY CLUSTERED +( + [InspectionPersonId] 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].[Comprehensive_InspectionPerson] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_InspectionPerson_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionPerson] CHECK CONSTRAINT [FK_Comprehensive_InspectionPerson_Base_Project] +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionPerson] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_InspectionPerson_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Comprehensive_InspectionPerson] CHECK CONSTRAINT [FK_Comprehensive_InspectionPerson_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'InspectionPersonId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鵥λid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @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'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'InspectionPersonCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'PostId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'CertificateNumber' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϸĿţ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'QualifiedProjectCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ч' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'ValidityDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'׼ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'ApprovalTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'볡ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'DepartureTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @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'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson', @level2type=N'COLUMN',@level2name=N'UnitWorkId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionPerson' +GO + +CREATE TABLE [dbo].[Comprehensive_InspectionPersonApprove]( + [InspectionPersonApproveId] [nvarchar](50) NOT NULL, + [InspectionPersonId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_InspectionPersonApprove] PRIMARY KEY CLUSTERED +( + [InspectionPersonApproveId] 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 Hazard_HazardSelectedItem ADD IsStart BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'IsStart' +GO + +CREATE TABLE [dbo].[Base_RiskLevel]( + [RiskLevelId] [nvarchar](50) NOT NULL, + [RiskLevel] [int] NULL, + [RiskLevelName] [nvarchar](50) NULL, + [MinValue] [int] NULL, + [MaxValue] [int] NULL, + [ControlMeasures] [nvarchar](500) NULL, + [Days] [int] NULL, + [Remark] [nvarchar](100) NULL, + CONSTRAINT [PK_Base_RiskLevel] PRIMARY KEY CLUSTERED +( + [RiskLevelId] 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 + +CREATE TABLE [dbo].[Comprehensive_DesignDetails]( + [DesignDetailsId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [DesignDetailsCode] [nvarchar](50) NOT NULL, + [DetailsMan] [nvarchar](20) NULL, + [DetailsDate] [datetime] NULL, + [UnitWorkId] [nvarchar](500) NULL, + [UnitName] [nvarchar](500) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [AuditMan] [nvarchar](50) NULL, + [Status] [nvarchar](2) NULL, + [JoinPersonNum] [int] NULL, + CONSTRAINT [PK_Comprehensive_DesignDetails] PRIMARY KEY CLUSTERED +( + [DesignDetailsId] 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].[Comprehensive_DesignDetails] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_DesignDetails_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Comprehensive_DesignDetails] CHECK CONSTRAINT [FK_Comprehensive_DesignDetails_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'DesignDetailsId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'CNProfessionalId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ױ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'DesignDetailsCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'DetailsMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'DetailsDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'UnitWorkId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'μӵλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'UnitName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƽ׹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_DesignDetails' +GO + +CREATE TABLE [dbo].[Comprehensive_DesignDetailsApprove]( + [DesignDetailsApproveId] [nvarchar](50) NOT NULL, + [DesignDetailsId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DesignDetailsApprove] PRIMARY KEY CLUSTERED +( + [DesignDetailsApproveId] 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 Hazard_HazardSelectedItem ADD ProjectId nvarchar(50) null +go + +ALTER TABLE Accident_AccidentReport ADD AccidentDegree char(1) null +go + + + +CREATE TABLE [dbo].[Supervise_SuperviseCheckReport]( + [SuperviseCheckReportId] [nvarchar](50) NOT NULL, + [SuperviseCheckReportCode] [nvarchar](50) NOT NULL, + [CheckDate] [datetime] NULL, + [ProjectId] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [CheckTeam] [nvarchar](150) NULL, + [EvaluationResult] [nvarchar](2000) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [IsIssued] [char](1) NULL, + [CheckType] [char](1) NULL, + CONSTRAINT [PK_Supervise_SuperviseCheckReport] PRIMARY KEY CLUSTERED +( + [SuperviseCheckReportId] 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].[Supervise_SuperviseCheckReport] WITH CHECK ADD CONSTRAINT [FK_Supervise_SuperviseCheckReport_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Supervise_SuperviseCheckReport] CHECK CONSTRAINT [FK_Supervise_SuperviseCheckReport_Base_Project] +GO + +ALTER TABLE [dbo].[Supervise_SuperviseCheckReport] WITH CHECK ADD CONSTRAINT [FK_Supervise_SuperviseCheckReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Supervise_SuperviseCheckReport] CHECK CONSTRAINT [FK_Supervise_SuperviseCheckReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'SuperviseCheckReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'SuperviseCheckReportCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'CheckDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @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'Supervise_SuperviseCheckReport', @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'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'CheckTeam' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'EvaluationResult' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫල鱨' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReport' +GO + + + +CREATE TABLE [dbo].[Supervise_SuperviseCheckReportItem]( + [SuperviseCheckReportItemId] [nvarchar](50) NOT NULL, + [SuperviseCheckReportId] [nvarchar](50) NOT NULL, + [RectifyItemId] [nvarchar](50) NULL, + [IsSelected] [bit] NULL, + [AttachUrl] [nvarchar](2000) NULL, + CONSTRAINT [PK_Supervise_SuperviseCheckReportItem] PRIMARY KEY CLUSTERED +( + [SuperviseCheckReportItemId] 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].[Supervise_SuperviseCheckReportItem] WITH CHECK ADD CONSTRAINT [FK_Supervise_SuperviseCheckReportItem_Supervise_SuperviseCheckReport] FOREIGN KEY([SuperviseCheckReportId]) +REFERENCES [dbo].[Supervise_SuperviseCheckReport] ([SuperviseCheckReportId]) +GO + +ALTER TABLE [dbo].[Supervise_SuperviseCheckReportItem] CHECK CONSTRAINT [FK_Supervise_SuperviseCheckReportItem_Supervise_SuperviseCheckReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReportItem', @level2type=N'COLUMN',@level2name=N'SuperviseCheckReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫල鱨Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReportItem', @level2type=N'COLUMN',@level2name=N'SuperviseCheckReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫල鱨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Supervise_SuperviseCheckReportItem' +GO + +CREATE TABLE [dbo].[Check_ProjectLeaderCheck]( + [ProjectLeaderCheckId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [UnitIds] [nvarchar](500) NULL, + [CheckCode] [nvarchar](50) NULL, + [LeaderIds] [nvarchar](500) NULL, + [CheckDate] [datetime] NULL, + [QuestionDef] [nvarchar](2000) NULL, + [IsHoldMeet] [bit] NULL, + [Requirement] [nvarchar](2000) NULL, + [LeaderNames] [nvarchar](500) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_Check_ProjectLeaderCheck] PRIMARY KEY CLUSTERED +( + [ProjectLeaderCheckId] 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].[Check_ProjectLeaderCheck] WITH CHECK ADD CONSTRAINT [FK_Check_ProjectLeaderCheck_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Check_ProjectLeaderCheck] CHECK CONSTRAINT [FK_Check_ProjectLeaderCheck_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'ProjectLeaderCheckId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ελId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'UnitIds' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'CheckCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'쵼id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'LeaderIds' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'CheckDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'QuestionDef' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿٿר⽲' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'IsHoldMeet' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'Requirement' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'쵼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'LeaderNames' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ˴' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck' +GO + +ALTER TABLE Base_TrainType ADD TrainType char(1) null +go + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͣ1ȫѵ2רѵ3ҵѵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_TrainType', @level2type=N'COLUMN',@level2name=N'TrainType' +GO + + +CREATE TABLE [dbo].[Emergency_DrillRecordList_Unit]( + [DrillRecordListId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [DrillRecordCode] [nvarchar](50) NULL, + [DrillRecordName] [nvarchar](500) NULL, + [UnitIds] [nvarchar](4000) NULL, + [UnitNames] [nvarchar](4000) NULL, + [UserIds] [nvarchar](4000) NULL, + [UserNames] [nvarchar](4000) NULL, + [DrillRecordDate] [datetime] NULL, + [DrillRecordContents] [nvarchar](max) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [States] [char](1) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [DrillRecordType] [char](1) NULL, + [JointPersonNum] [int] NULL, + [DrillCost] [decimal](9, 2) NULL, + CONSTRAINT [PK_DrillRecordList_Unit_DrillRecordListId] PRIMARY KEY CLUSTERED +( + [DrillRecordListId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + + + +CREATE TABLE [dbo].[Emergency_EmergencyList_Unit]( + [EmergencyListId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [EmergencyCode] [nvarchar](50) NULL, + [EmergencyName] [nvarchar](500) NULL, + [UnitId] [nvarchar](50) NULL, + [EmergencyTypeId] [nvarchar](50) NULL, + [VersionCode] [nvarchar](50) NULL, + [EmergencyContents] [nvarchar](max) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [States] [char](1) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [AuditMan] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + CONSTRAINT [PK_EmergencyList_Unit_EmergencyListId] PRIMARY KEY CLUSTERED +( + [EmergencyListId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +CREATE TABLE [dbo].[Environmental_ArchitectureReport]( + [ArchitectureReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [Year] [int] NULL, + [Quarters] [int] NULL, + [FillingMan] [nvarchar](50) NULL, + [FillingDate] [datetime] NULL, + [DutyPerson] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + CONSTRAINT [PK_Environmental_ArchitectureReport] PRIMARY KEY CLUSTERED +( + [ArchitectureReportId] 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].[Environmental_ArchitectureReport] WITH CHECK ADD CONSTRAINT [FK_Environmental_ArchitectureReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Environmental_ArchitectureReport] CHECK CONSTRAINT [FK_Environmental_ArchitectureReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @level2type=N'COLUMN',@level2name=N'ArchitectureReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @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'Environmental_ArchitectureReport', @level2type=N'COLUMN',@level2name=N'Year' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @level2type=N'COLUMN',@level2name=N'Quarters' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @level2type=N'COLUMN',@level2name=N'FillingMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @level2type=N'COLUMN',@level2name=N'FillingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReport', @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'Environmental_ArchitectureReport' +GO + + + +CREATE TABLE [dbo].[Environmental_ArchitectureReportItem]( + [ArchitectureReportItemId] [nvarchar](50) NOT NULL, + [ArchitectureReportId] [nvarchar](50) NULL, + [SortIndex] [nvarchar](50) NULL, + [LastYearValue] [nvarchar](50) NULL, + [ThisYearValue] [nvarchar](50) NULL, + [Rate] [nvarchar](50) NULL, + CONSTRAINT [PK_Environmental_ArchitectureReportItem] PRIMARY KEY CLUSTERED +( + [ArchitectureReportItemId] 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].[Environmental_ArchitectureReportItem] WITH CHECK ADD CONSTRAINT [FK_Environmental_ArchitectureReportItem_Environmental_ArchitectureReport] FOREIGN KEY([ArchitectureReportId]) +REFERENCES [dbo].[Environmental_ArchitectureReport] ([ArchitectureReportId]) +GO + +ALTER TABLE [dbo].[Environmental_ArchitectureReportItem] CHECK CONSTRAINT [FK_Environmental_ArchitectureReportItem_Environmental_ArchitectureReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem', @level2type=N'COLUMN',@level2name=N'ArchitectureReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem', @level2type=N'COLUMN',@level2name=N'ArchitectureReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem', @level2type=N'COLUMN',@level2name=N'LastYearValue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem', @level2type=N'COLUMN',@level2name=N'ThisYearValue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬڱȽ(%)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem', @level2type=N'COLUMN',@level2name=N'Rate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵԴԼ̬ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ArchitectureReportItem' +GO + +CREATE TABLE [dbo].[Environmental_ChemicalReport]( + [ChemicalReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [Year] [int] NULL, + [Month] [int] NULL, + [FillingMan] [nvarchar](50) NULL, + [FillingDate] [datetime] NULL, + [DutyPerson] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + CONSTRAINT [PK_Environmental_ChemicalReport] PRIMARY KEY CLUSTERED +( + [ChemicalReportId] 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].[Environmental_ChemicalReport] WITH CHECK ADD CONSTRAINT [FK_Environmental_ChemicalReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Environmental_ChemicalReport] CHECK CONSTRAINT [FK_Environmental_ChemicalReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @level2type=N'COLUMN',@level2name=N'ChemicalReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @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'Environmental_ChemicalReport', @level2type=N'COLUMN',@level2name=N'Year' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @level2type=N'COLUMN',@level2name=N'Month' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @level2type=N'COLUMN',@level2name=N'FillingMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @level2type=N'COLUMN',@level2name=N'FillingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReport', @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'Environmental_ChemicalReport' +GO + + + +CREATE TABLE [dbo].[Environmental_ChemicalReportItem]( + [ChemicalReportItemId] [nvarchar](50) NOT NULL, + [ChemicalReportId] [nvarchar](50) NULL, + [SortIndex] [nvarchar](50) NULL, + [LastYearValue] [nvarchar](50) NULL, + [ThisYearValue] [nvarchar](50) NULL, + [Rate] [nvarchar](50) NULL, + CONSTRAINT [PK_Environmental_ChemicalReportItem] PRIMARY KEY CLUSTERED +( + [ChemicalReportItemId] 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].[Environmental_ChemicalReportItem] WITH CHECK ADD CONSTRAINT [FK_Environmental_ChemicalReportItem_Environmental_ChemicalReport] FOREIGN KEY([ChemicalReportId]) +REFERENCES [dbo].[Environmental_ChemicalReport] ([ChemicalReportId]) +GO + +ALTER TABLE [dbo].[Environmental_ChemicalReportItem] CHECK CONSTRAINT [FK_Environmental_ChemicalReportItem_Environmental_ChemicalReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem', @level2type=N'COLUMN',@level2name=N'ChemicalReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem', @level2type=N'COLUMN',@level2name=N'ChemicalReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem', @level2type=N'COLUMN',@level2name=N'LastYearValue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem', @level2type=N'COLUMN',@level2name=N'ThisYearValue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬڱȽ(%)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem', @level2type=N'COLUMN',@level2name=N'Rate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵԴԼ̬ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_ChemicalReportItem' +GO + + + + +ALTER VIEW [dbo].[View_HJGL_WeldJoint] +AS +SELECT jot.[ProjectId] --ĿId + ,pipe.[UnitWorkId] --λId + ,uw.UnitWorkName --λ + ,pipe.[UnitId] --λId + ,unit.UnitName --λ + ,jot.[PipelineCode] --ߺ + ,pipe.[SingleNumber] --ͼ + ,pipe.[SingleName] --ͼֽ + ,pipe.[MediumId] --Id + ,medium.MediumCode + ,medium.MediumName -- + ,pipe.[PipingClassId] --ܵȼId + ,pipingClass.PipingClassCode --ܵȼ + ,pipe.[DetectionRateId] --̽˱Id + ,dr.DetectionRateCode --̽˱51020 + ,pipe.DetectionType --̽Id(ܶм|ָ) + ,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType + WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --̽ͣܶм,ָ + ,pipe.DesignTemperature --¶ȡ + ,pipe.DesignPress --ѹMpa(g) + ,pipe.TestMedium --ѹId + ,tm.MediumName AS TestMediumName --ѹ + ,pipe.TestPressure --ѹѹMpa(g) + ,pipe.PressurePipingClassId --ѹܵId + ,ppc.PressurePipingClassCode --ѹܵ + ,pipe.PipeLenth --߳(m) + ,pipe.LeakMedium --й¶Id + ,tm2.MediumName AS LeakMediumName --й¶ + ,pipe.LeakPressure --й¶ѹMpa(g) + ,pipe.PCMedium --ϴҪId + ,pm.PurgeMethodCode --ϴҪ + ,pipe.VacuumPressure --ѹKpa(a) + ,pipe.MaterialId --Id + ,mat.MaterialCode AS PipeMaterialCode -- + ,pipe.Remark AS PipeRemark --ע + + ,jot.[WeldJointId] --Id + ,jot.[WeldJointCode] --ں + ,jot.[Material1Id] --1Id + ,mat1.MaterialCode AS Material1Code --1 + ,jot.[Material2Id] --2Id + ,mat2.MaterialCode AS Material2Code --2 + ,jot.[Dia] --⾶ + ,jot.DNDia --DNֱ + ,jot.[Size] -- + ,jot.[Thickness] --ں + ,jot.[Specification] -- + ,jot.[WeldTypeId] --Id + ,WeldType.WeldTypeCode -- + ,jot.[DetectionTypeId] --Id + ,ndt.DetectionTypeCode -- + ,jot.[Components1Id] --1Id + ,com1.ComponentsCode AS ComponentsCode1 --1 + ,jot.[Components2Id] --2Id + ,com2.ComponentsCode AS ComponentsCode2 --2 + ,jot.DesignIsHotProess --Ƿȴ + ,CASE jot.DesignIsHotProess WHEN 1 THEN '' ELSE '' END AS DesignIsHotProessStr --Ƿȴ + ,jot.[WeldingMethodId] --ӷId + ,WeldingMethod.WeldingMethodCode --ӷ + ,jot.WPQId --WPSId + ,wps.WPQCode --WPS + ,jot.[GrooveTypeId] --¿Id + ,GrooveType.GrooveTypeCode --¿ + ,jot.[WeldingRod] --Id + ,rod.ConsumablesCode AS WeldingRodCode -- + ,jot.[WeldingWire] --˿Id + ,wire.ConsumablesCode AS WeldingWireCode --˿ + ,jot.PreTemperature --Ԥ¶ + ,jot.[JointAttribute] -- + ,jot.TwoJointType --κ + ,daily.WeldingDate as WeldingDateD + ,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate -- + ,BackingWelder.WelderCode AS BackingWelderCode --׺ + ,CoverWelder.WelderCode AS CoverWelderCode --溸 + ,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt + LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId + WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --ȴ + ,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '' WHEN 0 THEN 'δ' ELSE 'δȴ' END) AS HotProessResult --ȴ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht + LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID + WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --Ӳȱ + ,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN 'ϸ' WHEN 0 THEN 'ϸ' ELSE '' END) AS HardResult --Ӳȼ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --ίе + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde + LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --ⵥ + ,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN 'ϸ' WHEN '2' THEN 'ϸ' ELSE '' END) AS CheckResult -- + ,jot.PipelineId + ,jot.[JointArea] + ,jot.[WeldingLocationId] + ,jot.[HeartNo1] + ,jot.[HeartNo2] + ,jot.[IsHotProess] + ,jot.[WeldingDailyId] + ,jot.[BackingWelderId] + ,jot.[CoverWelderId] + ,jot.WeldingMode + ,jot.Remark + ,jot.IsTwoJoint + ,jot.SubmitMan + ,jot.AuditMan + ,jot.AuditDate + ,WeldingLocation.WeldingLocationCode + ,CASE WHEN jot.WeldingDailyId IS NULL THEN '' ELSE '' END AS IsWelding + ,CASE WHEN jot.IsHotProess=1 THEN '' ELSE '' END AS IsHotProessStr, + BackingWelder.PersonName AS BackingWelderName, + CoverWelder.PersonName AS CoverWelderName, + (CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL + THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode + ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, -- + (CASE WHEN mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL + THEN mat1.MaterialCode + '/' + mat2.MaterialCode + ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, -- + + daily.WeldingDailyCode, + pointItem.PointBatchId, + point.PointBatchCode, + (CASE WHEN pointItem.PointState='1' THEN 'ѵ' WHEN pointItem.PointState='2' THEN '͸' ELSE '' END) AS IsPoint + FROM [dbo].[HJGL_WeldJoint] jot +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId +LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId +LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId +LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId +LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium +LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium +LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium +LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId +LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId +LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id +LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id +LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId +LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId +LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire +LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod +LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId +LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id +LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id +LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId +LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId +LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId +LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId +LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId +LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId +LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId + +GO + + + +CREATE TABLE [dbo].[Meeting_CompanySafetyMeeting]( + [CompanySafetyMeetingId] [nvarchar](50) NOT NULL, + [CompanySafetyMeetingCode] [nvarchar](50) NULL, + [CompanySafetyMeetingName] [nvarchar](50) NULL, + [CompanySafetyMeetingDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + [CompanySafetyMeetingContents] [nvarchar](max) NULL, + [CompileDate] [datetime] NULL, + [AttentPersonNum] [int] NULL, + [MeetingHours] [decimal](9, 1) NULL, + [MeetingHostMan] [nvarchar](50) NULL, + [AttentPerson] [nvarchar](300) NULL, + [MeetingPlace] [nvarchar](200) NULL, + [MeetingHostManId] [nvarchar](50) NULL, + [AttentPersonIds] [nvarchar](4000) NULL, + [MeetingHostManOther] [nvarchar](500) NULL, + CONSTRAINT [PK_Meeting_CompanySafetyMeeting] PRIMARY KEY CLUSTERED +( + [CompanySafetyMeetingId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'CompanySafetyMeetingId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'CompanySafetyMeetingCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'CompanySafetyMeetingName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'CompanySafetyMeetingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @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'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'CompanySafetyMeetingContents' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @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'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'AttentPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'AttentPerson' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ص' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'MeetingPlace' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Աid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'AttentPersonIds' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostManOther' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵί' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySafetyMeeting' +GO + + +CREATE TABLE [dbo].[Meeting_CompanySpecialMeeting]( + [CompanySpecialMeetingId] [nvarchar](50) NOT NULL, + [CompanySpecialMeetingCode] [nvarchar](50) NULL, + [CompanySpecialMeetingName] [nvarchar](50) NULL, + [CompanySpecialMeetingDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + [CompanySpecialMeetingContents] [nvarchar](max) NULL, + [CompileDate] [datetime] NULL, + [AttentPersonNum] [int] NULL, + [MeetingHours] [decimal](9, 1) NULL, + [MeetingHostMan] [nvarchar](50) NULL, + [AttentPerson] [nvarchar](300) NULL, + [MeetingPlace] [nvarchar](200) NULL, + [MeetingHostManId] [nvarchar](50) NULL, + [AttentPersonIds] [nvarchar](4000) NULL, + [MeetingHostManOther] [nvarchar](500) NULL, + CONSTRAINT [PK_Meeting_CompanySpecialMeeting] PRIMARY KEY CLUSTERED +( + [CompanySpecialMeetingId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'CompanySpecialMeetingId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'CompanySpecialMeetingCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'CompanySpecialMeetingName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'CompanySpecialMeetingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @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'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'CompanySpecialMeetingContents' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @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'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'AttentPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'AttentPerson' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ص' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'MeetingPlace' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Աid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'AttentPersonIds' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting', @level2type=N'COLUMN',@level2name=N'MeetingHostManOther' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵר' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_CompanySpecialMeeting' +GO + + + +CREATE TABLE [dbo].[Meeting_SafetyLeaderGroupMeeting]( + [SafetyLeaderGroupMeetingId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [SafetyLeaderGroupMeetingCode] [nvarchar](50) NULL, + [SafetyLeaderGroupMeetingName] [nvarchar](50) NULL, + [SafetyLeaderGroupMeetingDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + [SafetyLeaderGroupMeetingContents] [nvarchar](max) NULL, + [CompileDate] [datetime] NULL, + [States] [char](1) NULL, + [AttentPersonNum] [int] NULL, + [MeetingHours] [decimal](9, 1) NULL, + [MeetingHostMan] [nvarchar](50) NULL, + [AttentPerson] [nvarchar](300) NULL, + [MeetingPlace] [nvarchar](200) NULL, + [UnitId] [nvarchar](50) NULL, + [MeetingHostManId] [nvarchar](50) NULL, + [AttentPersonIds] [nvarchar](4000) NULL, + [MeetingHostManOther] [nvarchar](500) NULL, + CONSTRAINT [PK_Meeting_SafetyLeaderGroupMeeting] PRIMARY KEY CLUSTERED +( + [SafetyLeaderGroupMeetingId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_SafetyLeaderGroupMeeting', @level2type=N'COLUMN',@level2name=N'SafetyLeaderGroupMeetingId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_SafetyLeaderGroupMeeting', @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'Meeting_SafetyLeaderGroupMeeting', @level2type=N'COLUMN',@level2name=N'SafetyLeaderGroupMeetingCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_SafetyLeaderGroupMeeting', @level2type=N'COLUMN',@level2name=N'SafetyLeaderGroupMeetingName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_SafetyLeaderGroupMeeting', @level2type=N'COLUMN',@level2name=N'SafetyLeaderGroupMeetingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Meeting_SafetyLeaderGroupMeeting', @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'Meeting_SafetyLeaderGroupMeeting' +GO + + diff --git a/SGGL/BLL/BaseInfo/TrainTypeService.cs b/SGGL/BLL/BaseInfo/TrainTypeService.cs index 135a24bf..375f2c12 100644 --- a/SGGL/BLL/BaseInfo/TrainTypeService.cs +++ b/SGGL/BLL/BaseInfo/TrainTypeService.cs @@ -34,7 +34,8 @@ namespace BLL TrainTypeName = trainType.TrainTypeName, Remark = trainType.Remark, IsAboutSendCard = trainType.IsAboutSendCard, - IsRepeat = trainType.IsRepeat + IsRepeat = trainType.IsRepeat, + TrainType=trainType.TrainType, }; db.Base_TrainType.InsertOnSubmit(newTrainType); db.SubmitChanges(); @@ -55,6 +56,7 @@ namespace BLL newTrainType.Remark = trainType.Remark; newTrainType.IsAboutSendCard = trainType.IsAboutSendCard; newTrainType.IsRepeat = trainType.IsRepeat; + newTrainType.TrainType = trainType.TrainType; db.SubmitChanges(); } } diff --git a/SGGL/BLL/BaseInfo/WorkPostService.cs b/SGGL/BLL/BaseInfo/WorkPostService.cs index 45aebdeb..9f1692c3 100644 --- a/SGGL/BLL/BaseInfo/WorkPostService.cs +++ b/SGGL/BLL/BaseInfo/WorkPostService.cs @@ -31,6 +31,7 @@ namespace BLL WorkPostCode = workPost.WorkPostCode, WorkPostName = workPost.WorkPostName, PostType = workPost.PostType, + IsCQMS=workPost.IsCQMS, IsHsse = workPost.IsHsse, CNCodes = workPost.CNCodes, Remark = workPost.Remark @@ -54,6 +55,7 @@ namespace BLL newWorkPost.WorkPostName = workPost.WorkPostName; newWorkPost.PostType = workPost.PostType; newWorkPost.IsHsse = workPost.IsHsse; + newWorkPost.IsCQMS = workPost.IsCQMS; newWorkPost.CNCodes = workPost.CNCodes; newWorkPost.Remark = workPost.Remark; db.SubmitChanges(); diff --git a/SGGL/BLL/Common/AttachFileService.cs b/SGGL/BLL/Common/AttachFileService.cs index 445bdddd..77260f32 100644 --- a/SGGL/BLL/Common/AttachFileService.cs +++ b/SGGL/BLL/Common/AttachFileService.cs @@ -149,6 +149,22 @@ namespace BLL } + /// + /// + /// + /// + /// + /// + public static IList GetBeforeFileList(string toKeyId, string menuId) + { + List listToKeyId = new List(); + listToKeyId.Add(toKeyId); + // listToKeyId.Add(toKeyId + "r"); + //listToKeyId.Add(toKeyId + "re"); + var list = Funs.DB.AttachFile.Where(p => listToKeyId.Contains(p.ToKeyId) && p.MenuId == menuId).ToList(); + return list; + + } /// /// /// diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 323a60a3..29f52ac4 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -317,6 +317,16 @@ #endregion #region 内置岗位 + /// + /// 安全总监岗位Id + /// + public static string WorkPost_HSSEDirector = "8A7C2CDF-AFB5-4826-9951-343253342DAC"; + + /// + /// 项目安全总监岗位Id + /// + public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa"; + /// /// HSE工程师岗位Id /// diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 1c4a3268..620aae67 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -29,7 +29,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.View_SitePerson_Person + private static IQueryable getDataLists = from x in Funs.DB.View_SitePerson_Person select x; /// @@ -637,7 +637,7 @@ namespace BLL var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId); if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo)) { - string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId); + string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) + "-"; var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo); if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5) { @@ -660,7 +660,7 @@ namespace BLL var getSitePerson = GetSitePersonById(sitepersinId); if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo)) { - cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId)); + cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) +"-"); getSitePerson.CardNo = cardNo; Funs.DB.SubmitChanges(); } diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx index a47ba03b..fa16c79b 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx +++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx @@ -23,6 +23,14 @@ + + + + + + + @@ -59,6 +67,12 @@ + + + + + @@ -128,6 +142,7 @@ var hfFormIDClientID = '<%= hfFormID.ClientID %>'; var txtCodeClientID = '<%= txtTrainTypeCode.ClientID %>'; var txtNameClientID = '<%= txtTrainTypeName.ClientID %>'; + var drpTrainTypeClientID = '<%= drpTrainType.ClientID %>'; var ckbIsAboutSendCardClientID = '<%= ckbIsAboutSendCard.ClientID %>'; var ckbIsRepeatClientID = '<%= ckbIsRepeat.ClientID %>'; var txtRemarkClientID = '<%=txtRemark.ClientID %>'; @@ -145,6 +160,7 @@ F(hfFormIDClientID).setValue(rowId); F(txtCodeClientID).setValue(rowValue['TrainTypeCode']); F(txtNameClientID).setValue(rowValue['TrainTypeName']); + F(drpTrainTypeClientID).setValue(rowValue['TrainType']); F(ckbIsAboutSendCardClientID).setValue(rowValue['IsAboutSendCard']); F(ckbIsRepeatClientID).setValue(rowValue['IsRepeat']); F(txtRemarkClientID).setValue(rowValue['Remark']); diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs index 84bdb52b..ba3d7c8a 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs @@ -176,6 +176,7 @@ namespace FineUIPro.Web.BaseInfo this.ckbIsRepeat.Checked = false; } this.txtRemark.Text = trainType.Remark; + this.drpTrainType.Text = trainType.TrainType; hfFormID.Text = Id; this.btnDelete.Enabled = true; } @@ -210,6 +211,10 @@ namespace FineUIPro.Web.BaseInfo { newTrainType.IsRepeat = false; } + if (this.drpTrainType.SelectedValue != BLL.Const._Null) + { + newTrainType.TrainType = this.drpTrainType.SelectedValue; + } newTrainType.Remark = txtRemark.Text.Trim(); if (string.IsNullOrEmpty(strRowID)) { @@ -332,5 +337,34 @@ namespace FineUIPro.Web.BaseInfo PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainTypeEdit.aspx?TrainTypeId={0}", Grid1.SelectedRowID, "设置 - "))); } + + #region 格式化字符串 + /// + /// 格式化字符串 + /// + /// + /// + protected string ConvertTrainType(object TrainType) + { + string name = string.Empty; + if (TrainType != null) + { + string trainType = TrainType.ToString().Trim(); + if (trainType == "1") + { + name = "三级安全教育培训"; + } + else if (trainType == "2") + { + name = "专项培训"; + } + if (trainType == "3") + { + name = "特种作业培训"; + } + } + return name; + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs index f483866a..dcfd6454 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.BaseInfo { - - - public partial class TrainType { - +namespace FineUIPro.Web.BaseInfo +{ + + + public partial class TrainType + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,16 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// ToolbarSeparator1 控件。 /// @@ -56,7 +67,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -65,7 +76,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -74,7 +85,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// SimpleForm1 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.SimpleForm SimpleForm1; - + /// /// hfFormID 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hfFormID; - + /// /// txtTrainTypeCode 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTrainTypeCode; - + /// /// txtTrainTypeName 控件。 /// @@ -110,7 +121,16 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTrainTypeName; - + + /// + /// drpTrainType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpTrainType; + /// /// ckbIsAboutSendCard 控件。 /// @@ -119,7 +139,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbIsAboutSendCard; - + /// /// ckbIsRepeat 控件。 /// @@ -128,7 +148,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbIsRepeat; - + /// /// txtRemark 控件。 /// @@ -137,7 +157,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// Toolbar1 控件。 /// @@ -146,7 +166,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnNew 控件。 /// @@ -155,7 +175,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnDelete 控件。 /// @@ -164,7 +184,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// ToolbarFill1 控件。 /// @@ -173,7 +193,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -182,7 +202,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// Window1 控件。 /// @@ -191,7 +211,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -200,7 +220,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -209,7 +229,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// @@ -218,7 +238,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuDelete; - + /// /// btnMenuSet 控件。 /// diff --git a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx index 74808af6..9e471377 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx +++ b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx @@ -47,6 +47,10 @@ RendererFunction="renderIsHsse" HeaderText="安管人员" HeaderTextAlign="Center" TextAlign="Center"> + + @@ -92,7 +96,9 @@ ShowRedStar="true" LabelWidth="80px"> - + + + private void BindGrid() { - string strSql = @"SELECT wp.WorkPostId,wp.WorkPostName, wp.WorkPostCode, wp.Remark,wp.PostType,wp.IsHsse,wp.CNCodes, + string strSql = @"SELECT wp.WorkPostId,wp.WorkPostName, wp.WorkPostCode, wp.Remark,wp.PostType,wp.IsHsse,wp.IsCQMS,wp.CNCodes, case wp.IsHsse when 1 then '是' else '否' end as IsHsseStr,const.ConstText as PostTypeName FROM dbo.Base_WorkPost AS wp LEFT JOIN Sys_Const AS const ON const.ConstValue = wp.PostType and const.GroupId = '" + ConstValue.Group_PostType + "' " + @@ -166,6 +166,10 @@ namespace FineUIPro.Web.BaseInfo { this.ckbIsHsse.Checked = true; } + if (workPost.IsCQMS == true) + { + this.ckbIsCQMS.Checked = true; + } if (!string.IsNullOrEmpty(workPost.CNCodes)) { txtCNCodes.Values = workPost.CNCodes.Split(','); @@ -205,6 +209,7 @@ namespace FineUIPro.Web.BaseInfo WorkPostName = this.txtWorkPostName.Text.Trim(), PostType = this.drpPostType.SelectedValue, IsHsse = Convert.ToBoolean(this.ckbIsHsse.Checked), + IsCQMS = Convert.ToBoolean(this.ckbIsCQMS.Checked), CNCodes = string.Join(",", txtCNCodes.Values), Remark = txtRemark.Text.Trim() }; diff --git a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx.designer.cs index a077de0d..fdfc4a4a 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx.designer.cs @@ -185,6 +185,15 @@ namespace FineUIPro.Web.BaseInfo /// protected global::FineUIPro.CheckBox ckbIsHsse; + /// + /// ckbIsCQMS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckbIsCQMS; + /// /// txtCNCodes 控件。 /// diff --git a/SGGL/FineUIPro.Web/DataShow/Accident.aspx b/SGGL/FineUIPro.Web/DataShow/Accident.aspx new file mode 100644 index 00000000..9c3085f2 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Accident.aspx @@ -0,0 +1,131 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Accident.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Accident" %> + + + + + + + + 安全事故 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs new file mode 100644 index 00000000..6acf2f3f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs @@ -0,0 +1,197 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class Accident : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + + if (rbType.SelectedValue == "0" || rbType.SelectedValue == "1") + { + strSql = @"SELECT Record.AccidentPersonRecordId AS ID,Record.ProjectId,Project.ProjectCode,Project.ProjectName, + Record.AccidentTypeId,AccidentType.AccidentTypeName,Record.AccidentDate + ,Unit.UnitId,Unit.UnitName,Record.States, 1 AS PeopleNum + ,(CASE WHEN Record.Injury =1 THEN '死亡' WHEN Record.Injury =2 THEN '重伤' ELSE '轻伤' END) AS Info + FROM Accident_AccidentPersonRecord AS Record + LEFT JOIN Base_AccidentType AS AccidentType ON AccidentType.AccidentTypeId = Record.AccidentTypeId + LEFT JOIN Base_Project AS Project ON Record.ProjectId = Project.ProjectId + LEFT JOIN SitePerson_Person AS Person ON Person.PersonId = Record.PersonId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId + WHERE 1=1 "; + + if (rbType.SelectedValue == "0") + { + strSql += " AND AccidentType.AccidentTypeName LIKE @values"; + listStr.Add(new SqlParameter("@values", "% 未遂%")); + } + else + { + strSql += " AND '未遂' NOT IN (AccidentType.AccidentTypeName)"; + } + } + else + { + strSql = @"SELECT Record.AccidentReportId AS ID,Record.ProjectId,Project.ProjectCode,Project.ProjectName, + Record.AccidentTypeId,ConstText AS AccidentTypeName,Record.AccidentDate + ,Unit.UnitId,Unit.UnitName,Record.States, 1 AS PeopleNum + , Record.Abstract AS Info + FROM Accident_AccidentReport AS Record + LEFT JOIN Sys_Const AS AccidentType ON AccidentType.ConstValue = Record.AccidentTypeId AND GroupId='AccidentReportRegistration' + LEFT JOIN Base_Project AS Project ON Record.ProjectId = Project.ProjectId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Record.UnitId + WHERE 1 = 1 "; + if (rbType.SelectedValue == "2") + { + strSql += " AND Record.AccidentDegree ='1'"; + } + else if (rbType.SelectedValue == "3") + { + strSql += " AND Record.AccidentDegree ='2'"; + } + else if (rbType.SelectedValue == "4") + { + strSql += " AND Record.AccidentDegree ='3'"; + } + else if (rbType.SelectedValue == "5") + { + strSql += " AND Record.AccidentDegree ='4'"; + } + } + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Record.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbType.SelectedValue == "0" || this.rbType.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Accident/AccidentPersonRecordView.aspx?AccidentPersonRecordId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Accident/AccidentReportView.aspx?AccidentReportId={0}", Grid1.SelectedRowID, "查看 - "))); + } + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.designer.cs new file mode 100644 index 00000000..4a52699e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Accident + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx b/SGGL/FineUIPro.Web/DataShow/Check.aspx new file mode 100644 index 00000000..070d979e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx @@ -0,0 +1,130 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Check.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Check" %> + + + + + + + + 安全监督检查 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs new file mode 100644 index 00000000..278005a8 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs @@ -0,0 +1,288 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DataShow +{ + public partial class Check : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + if (this.rbCom.SelectedValue == "1" || this.rbCom.SelectedValue == "2" || this.rbCom.SelectedValue == "3") + { + string strSql = @"SELECT S.SuperviseCheckReportId AS ID,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued,case S.CheckType when '1' then '企业负责人带班检查' when '2' then '企业综合检查' when '3' then '企业专项检查' else '' end as CheckTypeName" + + @" FROM dbo.Supervise_SuperviseCheckReport AS S" + + @" LEFT JOIN dbo.Base_Project AS P ON P.ProjectId=S.ProjectId" + + @" LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=S.UnitId" + + @" WHERE 1=1 "; + List listStr = new List(); + strSql += " AND S.CheckType= @CheckType"; + listStr.Add(new SqlParameter("@CheckType", this.rbCom.SelectedValue)); + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND S.CheckDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND S.CheckDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + ///项目负责人带班检查 + else if (this.rbCom.SelectedValue == "4") + { + string strSql = @"select C.ProjectLeaderCheckId AS ID,C.UnitIds,C.ProjectId,P.ProjectName,C.LeaderIds,C.LeaderNames AS CheckTeam,C.CheckDate + ,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +C.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'') + ,CheckTeam= STUFF((SELECT ',' + PersonName FROM dbo.Person_Persons where PATINDEX('%,' + RTRIM(PersonId) + ',%',',' +C.LeaderIds + ',')>0 FOR XML PATH('')), 1, 1,'') + from Check_ProjectLeaderCheck AS C + LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId + where 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND C.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND C.CheckDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND C.CheckDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = false; + } + ///项目专业检查 + else if (this.rbCom.SelectedValue == "5") + { + string strSql = @"select C.HazardRegisterId AS ID,C.ResponsibleUnit,C.ProjectId,P.ProjectName,C.CheckManId,U.PersonName AS CheckTeam,C.CheckTime AS CheckDate,Ut.UnitName + from HSSE_Hazard_HazardRegister AS C + LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId + LEFT JOIN Person_Persons AS U ON C.CheckManId=U.PersonId + LEFT JOIN Base_Unit AS Ut ON C.ResponsibleUnit=Ut.UnitId + where 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND C.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND C.CheckTime >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND C.CheckTime <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = false; + } + ///项目专项目检查 + else if (this.rbCom.SelectedValue == "6") + { + string strSql = @"select C.CheckSpecialId AS ID,C.ProjectId,P.ProjectName, ISNULL(C.PartInPersonNames,'') AS CheckTeam,C.CheckTime AS CheckDate + ,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +(C.PartInUnits) + ',')>0 FOR XML PATH('')), 1, 1,'') + from Check_CheckSpecial AS C + LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId + where 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND C.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND C.CheckTime >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND C.CheckTime <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = false; + } + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + if (this.rbCom.SelectedValue == "4" || this.rbCom.SelectedValue == "5" || this.rbCom.SelectedValue == "6") + { + this.drpProject.Hidden = false; + } + else + { + this.drpProject.Hidden = true; + } + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbCom.SelectedValue == "1"|| this.rbCom.SelectedValue == "2" || this.rbCom.SelectedValue == "3") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Supervise/SuperviseCheckReportEdit.aspx?SuperviseCheckReportId={0}&type=-1", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "4") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Check/ProjectLeaderCheckView.aspx?ProjectLeaderCheckId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "5") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/HiddenInspection/HiddenRectificationView.aspx?HazardRegisterId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "6") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Check/CheckSpecialView.aspx?CheckSpecialId={0}", Grid1.SelectedRowID, "查看 - "))); + } + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Check.aspx.designer.cs new file mode 100644 index 00000000..be33626f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Check + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx new file mode 100644 index 00000000..8450374f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyPerson.aspx.cs" + Inherits="FineUIPro.Web.DataShow.CompanyPerson" %> + + + + + + + + 企业总部人员 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs new file mode 100644 index 00000000..596a5978 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs @@ -0,0 +1,126 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class CompanyPerson : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + + string strSql = @"SELECT Person.PersonId,Unit.UnitName, Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone + FROM Person_Persons AS Person + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId + LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; + List listStr = new List(); + string UnitId = Const.UnitId_SEDIN; + if (this.rbCom.SelectedValue == "0") + { + strSql += " AND Person.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", UnitId)); + } + else + { + strSql += " AND Unit.IsBranch =1"; + } + if (rbType.SelectedValue == "0") + { + strSql += " AND Person.WorkPostId = @WorkPostId"; + listStr.Add(new SqlParameter("@WorkPostId", Const.WorkPost_HSSEDirector)); + } + else + { + strSql += " AND WorkPost.IsHsse = 1"; + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.designer.cs new file mode 100644 index 00000000..3c98fe80 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class CompanyPerson + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx new file mode 100644 index 00000000..373bc94f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx @@ -0,0 +1,140 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionEquipment.aspx.cs" + Inherits="FineUIPro.Web.DataShow.ConstructionEquipment" %> + + + + + + + + 施工机具 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs new file mode 100644 index 00000000..dd7d28eb --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs @@ -0,0 +1,189 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class ConstructionEquipment : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + // btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + + strSql = @"SELECT ID,ProjectId,ProjectCode,ProjectName,UnitId,UnitName,SpecialEquipmentId,SpecialEquipmentName,SizeModel,OwnerCheck,CertificateNum,CompileDate,EQType + FROM (SELECT Item.EquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId + ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,EQ.CompileDate,'特种设备' AS EQType + FROM InApproveManager_EquipmentInItem AS Item + LEFT JOIN InApproveManager_EquipmentIn AS EQ ON EQ.EquipmentInId = Item.EquipmentInId + LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId + LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId + UNION ALL SELECT Item.GeneralEquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId + ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,EQ.CompileDate,'一般设备' AS EQType + FROM InApproveManager_GeneralEquipmentInItem AS Item + LEFT JOIN InApproveManager_GeneralEquipmentIn AS EQ ON EQ.GeneralEquipmentInId = Item.GeneralEquipmentInId + LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId + LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId ) V + WHERE 1=1 "; + + //strSql += " AND V.IsUsed = @IsUsed"; + //listStr.Add(new SqlParameter("@IsUsed", "1")); + if (this.rbType.SelectedValue == "2") + { + strSql += " AND V.EQType = @EQType"; + listStr.Add(new SqlParameter("@EQType", "特种设备")); + } + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND V.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND V.CompileDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND V.CompileDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var getEQ = Funs.DB.InApproveManager_EquipmentInItem.FirstOrDefault(x => x.EquipmentInItemId == Grid1.SelectedRowID); + if (getEQ != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/InApproveManager/EquipmentInView.aspx?EquipmentInId={0}", getEQ.EquipmentInId, "查看 - "))); + } + else + { + var getGEQ = Funs.DB.InApproveManager_GeneralEquipmentInItem.FirstOrDefault(x => x.GeneralEquipmentInItemId == Grid1.SelectedRowID); + if (getGEQ != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/InApproveManager/GeneralEquipmentInView.aspx?EquipmentInId={0}", getGEQ.GeneralEquipmentInId, "查看 - "))); + } + } + + + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.designer.cs new file mode 100644 index 00000000..1d814f00 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class ConstructionEquipment + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx new file mode 100644 index 00000000..32b611d3 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx @@ -0,0 +1,133 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EduTrain.aspx.cs" + Inherits="FineUIPro.Web.DataShow.EduTrain" %> + + + + + + + + 教育培训 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs new file mode 100644 index 00000000..551eb391 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs @@ -0,0 +1,160 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class EduTrain : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + // btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + + strSql = @"select TrainRecord.TrainingId,TrainRecord.TrainTitle,TrainType.TrainTypeName,Project.ProjectId,Project.ProjectCode,Project.ProjectName + ,TrainRecord.TrainStartDate,TrainRecord.TrainEndDate,TrainRecord.TrainPersonNum,TrainRecord.UnitIds + ,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'') + from EduTrain_TrainRecord AS TrainRecord + LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId + LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId + WHERE 1=1 "; + + strSql += " AND TrainType.TrainType =@TrainType"; + listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue)); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND TrainRecord.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND TrainRecord.TrainEndDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND TrainRecord.TrainEndDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/EduTrain/TrainRecordView.aspx?TrainingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.designer.cs new file mode 100644 index 00000000..a7d0f0e5 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class EduTrain + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx new file mode 100644 index 00000000..98748361 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx @@ -0,0 +1,215 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Emergency.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Emergency" %> + + + + + + + + 应急信息 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs new file mode 100644 index 00000000..9b12f610 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs @@ -0,0 +1,359 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class Emergency : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + ddlPageSize2.SelectedValue = Grid2.PageSize.ToString(); + // 绑定表格t + BindGrid(); + BindGrid2(); + } + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + if (this.rbCom.SelectedValue == "1") + { + this.drpProject.Hidden = false; + } + else + { + this.drpProject.Hidden = true; + } + this.BindGrid(); + this.BindGrid2(); + } + #endregion + + #region 数据绑定1 + /// + /// 绑定数据 + /// + private void BindGrid() + { + if (this.rbCom.SelectedValue == "0") + { + string strSql = @"SELECT Em.EmergencyListId,Em.UnitId,Unit.UnitName,EmergencyType.EmergencyTypeName + ,Em.EmergencyName,Em.CompileDate,Em.CompileMan + ,Em.VersionCode,Em.States + FROM Emergency_EmergencyList_Unit AS Em + LEFT JOIN Base_Unit AS Unit ON Em.UnitId=Unit.UnitId + LEFT JOIN Base_EmergencyType AS EmergencyType ON Em.EmergencyTypeId=EmergencyType.EmergencyTypeId + WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Em.CompileDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Em.CompileDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = true; + } + else if (this.rbCom.SelectedValue == "1") + { + string strSql = @"SELECT Em.EmergencyListId,Project.ProjectId,Project.ProjectCode,Project.ProjectName + ,Em.UnitId,Unit.UnitName,EmergencyType.EmergencyTypeName + ,Em.EmergencyName,Em.CompileDate,Em.CompileMan + ,Em.VersionCode,Em.States + FROM Emergency_EmergencyList AS Em + LEFT JOIN Base_Unit AS Unit ON Em.UnitId=Unit.UnitId + LEFT JOIN Base_Project AS Project ON Em.ProjectId=Project.ProjectId + LEFT JOIN Base_EmergencyType AS EmergencyType ON Em.EmergencyTypeId=EmergencyType.EmergencyTypeId + WHERE 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Project.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Em.CompileDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Em.CompileDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = true; + } + } + + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData1(); + } + + /// + /// + /// + private void EditData1() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbCom.SelectedValue == "0") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Emergency/EmergencyListView.aspx?EmergencyListId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Emergency/EmergencyListView.aspx?EmergencyListId={0}", Grid1.SelectedRowID, "查看 - "))); + } + + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData1(); + } + + protected void btnView2_Click(object sender, EventArgs e) + { + EditData2(); + } + + + #region 数据绑定2 + /// + /// 绑定数据 + /// + private void BindGrid2() + { + if (this.rbCom.SelectedValue == "0") + { + string strSql = @"SELECT List.DrillRecordListId + ,DrillRecordType.ConstText AS DrillRecordTypeName,List.JointPersonNum,List.DrillCost + ,List.DrillRecordName,List.DrillRecordDate + ,List.UnitIds,List.UnitNames + ,List.States + FROM Emergency_DrillRecordList_Unit AS List + LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = List.DrillRecordType + and DrillRecordType.GroupId='DrillRecordType' + WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Em.CompileDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Em.CompileDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid2.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + this.Grid2.Columns[1].Hidden = true; + } + else if (this.rbCom.SelectedValue == "1") + { + string strSql = @"SELECT List.DrillRecordListId,List.ProjectId,Project.PostCode,Project.ProjectName + ,DrillRecordType.ConstText AS DrillRecordTypeName,List.JointPersonNum,List.DrillCost + ,List.DrillRecordName,List.DrillRecordDate + ,List.UnitIds,List.UnitNames + ,List.States + FROM Emergency_DrillRecordList AS List + LEFT JOIN Base_Project AS Project ON List.Projectid = Project.ProjectId + LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = List.DrillRecordType + and DrillRecordType.GroupId='DrillRecordType' + WHERE 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Project.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Em.CompileDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Em.CompileDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid2.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + this.Grid2.Columns[1].Hidden = true; + } + } + + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid2(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid2_Sort(object sender, GridSortEventArgs e) + { + BindGrid2(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e) + { + Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue); + BindGrid2(); + } + + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid2_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData2(); + } + + /// + /// + /// + private void EditData2() + { + if (Grid2.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbCom.SelectedValue == "0") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Emergency/DrillRecordListView.aspx?DrillRecordListId={0}", Grid2.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Emergency/DrillRecordListView.aspx?DrillRecordListId={0}", Grid2.SelectedRowID, "查看 - "))); + } + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.designer.cs new file mode 100644 index 00000000..6ab11a35 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.designer.cs @@ -0,0 +1,269 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Emergency + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Tab1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Tab3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab3; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// ToolbarSeparator2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2; + + /// + /// ToolbarText2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText2; + + /// + /// ddlPageSize2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize2; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + + /// + /// Menu2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu2; + + /// + /// btnView2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView2; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx new file mode 100644 index 00000000..80785d6a --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Environmental.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Environmental" %> + + + + + + + 环保数据 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs new file mode 100644 index 00000000..5e316a2e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs @@ -0,0 +1,184 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class Environmental : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + // btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + if (this.rbType.SelectedValue == "1") + { + strSql = @"SELECT Report.ChemicalReportId AS ID,Report.Year,Report.Month AS M,Report.FillingDate + ,(SELECT ThisYearValue FROM Environmental_ChemicalReportItem WHERE SortIndex='01' + AND ChemicalReportId=Report.ChemicalReportId) AS TotalEnergyConsumption + ,0 AS IncomeComprehensiveEnergyConsumption + ,(SELECT ThisYearValue FROM Environmental_ChemicalReportItem WHERE SortIndex='25' + AND ChemicalReportId=Report.ChemicalReportId) AS TotalEnergyConsumption + FROM Environmental_ChemicalReport AS Report"; + } + else + { + strSql = @"SELECT Report.ArchitectureReportId AS ID,Report.Year,Report.Quarters AS M,Report.FillingDate + ,(SELECT ThisYearValue FROM Environmental_ArchitectureReportItem WHERE SortIndex='01' + AND ArchitectureReportId=Report.ArchitectureReportId) AS TotalEnergyConsumption + ,(SELECT ThisYearValue FROM Environmental_ArchitectureReportItem WHERE SortIndex='15' + AND ArchitectureReportId=Report.ArchitectureReportId) AS IncomeComprehensiveEnergyConsumption + ,(SELECT ThisYearValue FROM Environmental_ArchitectureReportItem WHERE SortIndex='24' + AND ArchitectureReportId=Report.ArchitectureReportId) AS TotalEnergyConsumption + FROM Environmental_ArchitectureReport AS Report + WHERE 1=1 "; + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Report.FillingDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Report.FillingDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + if (this.rbType.SelectedValue == "1") + { + Grid1.Columns[2].HeaderText = "月份"; + Grid1.Columns[4].Hidden = true; + } + else + { + Grid1.Columns[2].HeaderText = "季度"; + Grid1.Columns[4].Hidden = false; + } + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbType.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Environmental/ChemicalReportSave.aspx?ChemicalReportId={0}&type=-1", Grid1.SelectedRowID, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Environmental/ArchitectureReportSave.aspx?ArchitectureReportId={0}&type=-1", Grid1.SelectedRowID, "查看 - "))); + } + + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.designer.cs new file mode 100644 index 00000000..0fc67a5f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Environmental + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx new file mode 100644 index 00000000..ae18ca6b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx @@ -0,0 +1,115 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HJGLDefect.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HJGLDefect" %> + + + + + + + + 缺陷分析 + + +
+ + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs new file mode 100644 index 00000000..ee6edf1c --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs @@ -0,0 +1,127 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class HJGLDefect : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + #endregion + + #region 加载页面 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT newid() as ID, Project.ProjectId,Project.ProjectName, CheckDefects,COUNT(Item.NDEItemID) AS Counts + FROM HJGL_Batch_NDEItem AS Item + LEFT JOIN HJGL_Batch_NDE AS Checks ON Item.NDEID =Checks.NDEID + LEFT JOIN Base_Project AS Project ON Checks.ProjectId =Project.ProjectId + WHERE 1=1 "; + + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Checks.projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + //} + strSql += " GROUP BY Project.ProjectId,Project.ProjectName,CheckDefects"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.designer.cs new file mode 100644 index 00000000..029e3470 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.designer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HJGLDefect + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx new file mode 100644 index 00000000..0ac5bd04 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HJGLWelder.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HJGLWelder" %> + + + + + + + + 焊工 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs new file mode 100644 index 00000000..1aa484ac --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs @@ -0,0 +1,149 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class HJGLWelder : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT Welder.SitePersonId as WED_ID,Welder.ProjectId,Project.ProjectCode,Project.ProjectName,Welder.UnitId AS WED_Unit,Unit.UnitName + ,Welder.WelderCode as WED_WorkCode,Welder.PersonName + FROM SitePerson_Person AS Welder + LEFT JOIN Base_Project AS Project ON Welder.ProjectId = Project.ProjectId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Welder.UnitId + LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId = Welder.TeamGroupId + WHERE Welder.WorkPostId=@WorkPostId AND Welder.ProjectId IS NOT NULL"; + List listStr = new List(); + listStr.Add(new SqlParameter("@WorkPostId", Const.WorkPost_Welder)); + if (this.drpProject.SelectedValue !=Const._Null) + { + strSql += " AND Welder.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../Person/PersonView.aspx?PersonId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.designer.cs new file mode 100644 index 00000000..0a827aaf --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HJGLWelder + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx new file mode 100644 index 00000000..f288b3c2 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx @@ -0,0 +1,130 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HJGLWelding.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HJGLWelding" %> + + + + + + + + 焊接数据 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs new file mode 100644 index 00000000..d3445496 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs @@ -0,0 +1,280 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class HJGLWelding : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HJGLWeldingItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 总工时数 + /// + /// + /// + protected decimal Count1(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var getD1 = from x in Funs.DB.HJGL_WeldJoint + where x.ProjectId == projectId.ToString() + select x; + if (getD1.Count() > 0) + { + cout1 = getD1.Sum(x => x.Size ?? 0); + } + } + return cout1; + } + + /// + /// 损失工时数 + /// + /// + /// + protected decimal Count2(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getD1 = from x in Funs.DB.HJGL_WeldJoint + join y in Funs.DB.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId + where x.ProjectId == projectId.ToString() + select new { x.Size, y.WeldingDate }; + if (datetime1.HasValue) + { + getD1 = getD1.Where(x => x.WeldingDate >= datetime1); + } + if (datetime2.HasValue) + { + getD1 = getD1.Where(x => x.WeldingDate <= datetime2); + } + if (getD1.Count() > 0) + { + cout1 += getD1.Sum(x => x.Size ?? 0); + } + } + return cout1; + } + + /// + /// 焊接数据数 + /// + /// + /// + protected decimal Count3(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getC1 = from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.HJGL_Batch_NDE on x.NDEID equals y.NDEID + where y.ProjectId == projectId.ToString() + select new { x.TotalFilm, y.NDEDate }; + + if (datetime1.HasValue) + { + getC1 = getC1.Where(x => x.NDEDate >= datetime1); + } + if (datetime2.HasValue) + { + getC1 = getC1.Where(x => x.NDEDate <= datetime2); + } + if (getC1.Count() > 0) + { + cout1 = getC1.Sum(x => x.TotalFilm ?? 0); + } + + } + return cout1; + } + + /// + /// 焊接数据数 + /// + /// + /// + protected decimal Count4(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getC1 = from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.HJGL_Batch_NDE on x.NDEID equals y.NDEID + where y.ProjectId == projectId.ToString() + select new { x.PassFilm, y.NDEDate }; + + if (datetime1.HasValue) + { + getC1 = getC1.Where(x => x.NDEDate >= datetime1); + } + if (datetime2.HasValue) + { + getC1 = getC1.Where(x => x.NDEDate <= datetime2); + } + if (getC1.Count() > 0) + { + cout1 = getC1.Sum(x => x.PassFilm ?? 0); + } + + } + return cout1; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.designer.cs new file mode 100644 index 00000000..a00a73ef --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HJGLWelding + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx new file mode 100644 index 00000000..cd8d7537 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx @@ -0,0 +1,179 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HJGLWeldingItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HJGLWeldingItem" %> + + + + + + + + 焊接数据 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs new file mode 100644 index 00000000..d0cbf024 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs @@ -0,0 +1,119 @@ +using BLL; +using Microsoft.Office.Interop.Word; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class HJGLWeldingItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var View_HJGL_WeldJoint =from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == Request.Params["projectId"] select x; + if (datetime1.HasValue) + { + View_HJGL_WeldJoint = View_HJGL_WeldJoint.Where(x => x.WeldingDateD >= datetime1.Value); + } + if (datetime2.HasValue) + { + View_HJGL_WeldJoint = View_HJGL_WeldJoint.Where(x => x.WeldingDateD <= datetime2.Value); + } + + Grid1.RecordCount = View_HJGL_WeldJoint.Count(); + // var table = this.GetPagedDataTable(Grid1, list); + var table = View_HJGL_WeldJoint.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + /// + /// 转换当日人工时 + /// + /// + /// + protected string ConvertPersonWorkTimeSum(object dayReportId) + { + if (dayReportId != null) + { + return (Funs.DB.SitePerson_DayReportDetail.Where(x => x.DayReportId == dayReportId.ToString()).Sum(x => x.PersonWorkTime) ?? 0).ToString(); + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.designer.cs new file mode 100644 index 00000000..dc1ba2aa --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HJGLWeldingItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx new file mode 100644 index 00000000..e81213c3 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HiddenRectification.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HiddenRectification" %> + + + + + + + + 隐患排查 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs new file mode 100644 index 00000000..b82fb4db --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs @@ -0,0 +1,181 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DataShow +{ + public partial class HiddenRectification : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount, + (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2)) + else 0 end) as rateV + from (select h.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount, + isnull((select COUNT(*) from HSSE_Hazard_HazardRegister as c + where c.ProjectId=h.ProjectId and states =3 + and '1' = @cpara + group by c.ProjectId),0) as cCount + from HSSE_Hazard_HazardRegister as h + left join Base_Project as p on h.ProjectId=p.ProjectId + where p.projectId is not null "; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND h.projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + + cpara += " AND c.projectId ="+ this.drpProject.SelectedValue; + } + + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND h.RegisterDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND h.RegisterDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + } + if (!string.IsNullOrEmpty(cpara)) + { + listStr.Add(new SqlParameter("@cpara"," '1' And "+ cpara)); + } + else + { + listStr.Add(new SqlParameter("@cpara", "'1'")); + } + strSql += " group by h.ProjectId,p.ProjectCode,p.ProjectName) as v"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs new file mode 100644 index 00000000..cb8fa00e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HiddenRectification + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx new file mode 100644 index 00000000..0bee361e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HiddenRectificationItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.HiddenRectificationItem" %> + + + + + + + + 隐患排查详细 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs new file mode 100644 index 00000000..ab53787b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs @@ -0,0 +1,177 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class HiddenRectificationItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + + this.drpStates.DataValueField = "Id"; + this.drpStates.DataTextField = "Name"; + List handleSteps = new List(); + Model.HandleStep handleStep1 = new Model.HandleStep(); + handleStep1.Id = "1"; + handleStep1.Name = "待整改"; + handleSteps.Add(handleStep1); + Model.HandleStep handleStep2 = new Model.HandleStep(); + handleStep2.Id = "2"; + handleStep2.Name = "已整改-待复查验收"; + handleSteps.Add(handleStep2); + Model.HandleStep handleStep3 = new Model.HandleStep(); + handleStep3.Id = "3"; + handleStep3.Name = "已闭环"; + handleSteps.Add(handleStep3); + //Model.HandleStep handleStep4 = new Model.HandleStep(); + //handleStep4.Id = "4"; + //handleStep4.Name = "已作废"; + //handleSteps.Add(handleStep4); + this.drpStates.DataSource = handleSteps; ; + this.drpStates.DataBind(); + Funs.FineUIPleaseSelect(this.drpStates); + + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes in ('1' ,'2') "; + List listStr = new List(); + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND CheckTime >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND CheckTime <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + if (this.drpStates.SelectedValue != BLL.Const._Null) + { + strSql += " AND States LIKE @States"; + listStr.Add(new SqlParameter("@States", "%" + this.drpStates.SelectedValue + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + /// + /// 获取整改前图片(放于Img中) + /// + /// + /// + protected string ConvertImageUrlByImage(object registrationId) + { + string url = string.Empty; + if (registrationId != null) + { + var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); + if (registration != null) + { + url = BLL.UploadAttachmentService.ShowImage("../", registration.ImageUrl); + } + } + return url; + } + + + /// + /// 获取整改后图片(放于Img中) + /// + /// + /// + protected string ConvertImgUrlByImage(object registrationId) + { + string url = string.Empty; + if (registrationId != null) + { + var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); + if (registration != null) + { + url = BLL.UploadAttachmentService.ShowImage("../", registration.RectificationImageUrl); + } + } + return url; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs new file mode 100644 index 00000000..2be8e568 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class HiddenRectificationItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// drpStates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpStates; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lbImageUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl1; + + /// + /// lbImageUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl2; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx new file mode 100644 index 00000000..023fdc02 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx @@ -0,0 +1,140 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargeEngineering.aspx.cs" + Inherits="FineUIPro.Web.DataShow.LargeEngineering" %> + + + + + + + + 危大工程 + + +
+ + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs new file mode 100644 index 00000000..c680fc8d --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs @@ -0,0 +1,248 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.ServiceModel.Configuration; +using System.Text; + +namespace FineUIPro.Web.DataShow +{ + public partial class LargeEngineering : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + LargerHazard = (from x in Funs.DB.Solution_LargerHazard + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x).ToList(); + // 绑定表格t + BindGrid(); + } + } + + public static List LargerHazard = new List(); + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LargeEngineeringItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 获取危大工程数 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.IsSuperLargerHazard == false).Count(); + } + return cout1; + } + + /// + /// 获取超危大工程数 + /// + /// + /// + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.IsSuperLargerHazard == true).Count(); + } + return cout1; + } + /// + /// 在施危大工程数量 + /// + /// + /// + protected int Count3(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.States == Const.State_2).Count(); + } + return cout1; + } + + /// + /// 审批完成数量 + /// + /// + /// + protected int Count4(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.States == Const.State_1).Count(); + } + return cout1; + } + + + /// + /// 培训人次数 + /// + /// + /// + protected int Count5(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString()).Sum(x=>x.TrainPersonNum ?? 0); + } + return cout1; + } + + /// + /// 完工个数 + /// + /// + /// + protected int Count6(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.States == Const.State_3).Count(); + } + return cout1; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.designer.cs new file mode 100644 index 00000000..a183be96 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class LargeEngineering + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label6; + + /// + /// Label7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label7; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx new file mode 100644 index 00000000..9b6187cd --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargeEngineeringItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.LargeEngineeringItem" %> + + + + + + + + 危大工程 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs new file mode 100644 index 00000000..82cb08ac --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs @@ -0,0 +1,150 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class LargeEngineeringItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT L.HazardId,L.ProjectId,L.Address,L.ExpectedTime,L.RecordTime ,L.TrainPersonNum + ,case L.States when '1' then '审批完成' when '2' then '作业中' when '3' then '已关闭' + when '0' then '已取消' else '' end as StatesStr + , case when L.IsArgument=1 then '是' else '否' end as IsArgumentStr,Const.ConstText as TypeName + ,case when L.IsSuperLargerHazard=1 then '是' else '否' end as IsSuperLargerHazardStr + FROM Solution_LargerHazard AS L + LEFT JOIN Sys_Const AS Const ON L.HazardType=Const.ConstValue and Const.GroupId='LargerHazardType' + WHERE 1=1 "; + List listStr = new List(); + strSql += " AND L.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND L.RecordTime >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND L.RecordTime <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Solution/LargerHazardView.aspx?HazardId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.designer.cs new file mode 100644 index 00000000..0fb4bd57 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class LargeEngineeringItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx b/SGGL/FineUIPro.Web/DataShow/License.aspx new file mode 100644 index 00000000..4d0f4dd7 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx @@ -0,0 +1,141 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="License.aspx.cs" + Inherits="FineUIPro.Web.DataShow.License" %> + + + + + + + + 施工机具 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs new file mode 100644 index 00000000..d79c411b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs @@ -0,0 +1,161 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class License : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + // btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + + strSql = @"T V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName + ,V.WorkAreaName,V.CompileDate,V.StartDate,V.EndDate,V.LicenseTypeId,V.UnitId,V.LicenseManageContents + ,V.CompileMan,V.CompileDate,V.States + FROM View_License_LicenseManager AS V + WHERE 1=1"; + if (this.rbType.SelectedValue=="2") + { + strSql += " AND V.States = @WorkStates"; + listStr.Add(new SqlParameter("@WorkStates", Const.State_2)); + } + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND V.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND V.StartDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND V.StartDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/License/LicenseManagerView.aspx?LicenseManagerId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/License.aspx.designer.cs new file mode 100644 index 00000000..545e7144 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class License + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx new file mode 100644 index 00000000..af2ca81f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx @@ -0,0 +1,130 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Meeting.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Meeting" %> + + + + + + + + 会议 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs new file mode 100644 index 00000000..7369b149 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs @@ -0,0 +1,290 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DataShow +{ + public partial class Meeting : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + if (this.rbCom.SelectedValue == "0") + { + string strSql = @"SELECT Meeting.CompanySafetyMeetingId AS ID,Meeting.CompanySafetyMeetingName AS MeetingName + ,Meeting.CompanySafetyMeetingDate AS MeetingDate,Meeting.MeetingHours + ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson + FROM Meeting_CompanySafetyMeeting AS Meeting + where 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Meeting.CompanySafetyMeetingDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Meeting.CompanySafetyMeetingDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = true; + } + else if (this.rbCom.SelectedValue == "1") + { + string strSql = @"SELECT Meeting.CompanySpecialMeetingId AS ID,Meeting.CompanySpecialMeetingName AS MeetingName + ,Meeting.CompanySpecialMeetingDate AS MeetingDate,Meeting.MeetingHours + ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson + FROM Meeting_CompanySpecialMeeting AS Meeting + where 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Meeting.CompanySpecialMeetingDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Meeting.CompanySpecialMeetingDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = true; + } + else if (this.rbCom.SelectedValue == "2") + { + string strSql = @"SELECT Project.ProjectName,Meeting.SafetyLeaderGroupMeetingId AS ID,Meeting.SafetyLeaderGroupMeetingName AS MeetingName,Meeting.SafetyLeaderGroupMeetingDate AS MeetingDate,Meeting.MeetingHours + ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson + FROM Meeting_SafetyLeaderGroupMeeting AS Meeting + LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId + where 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Project.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND Meeting.SafetyLeaderGroupMeetingDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND Meeting.SafetyLeaderGroupMeetingDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = false; + } + + else if (this.rbCom.SelectedValue == "3") + { + string strSql = @"SELECT ProjectId,ProjectName, ID, MeetingName, MeetingDate,MeetingHours,HostMan,AttentPersonNum,AttentPerson + FROM (SELECT Project.ProjectId,Project.ProjectName,Meeting.MonthMeetingId AS ID,Meeting.MonthMeetingName AS MeetingName,Meeting.MonthMeetingDate AS MeetingDate,Meeting.MeetingHours + ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson + FROM Meeting_MonthMeeting AS Meeting + LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId + union all + SELECT Project.ProjectId,Project.ProjectName,Meeting.WeekMeetingId AS ID,Meeting.WeekMeetingName AS MeetingName,Meeting.WeekMeetingDate AS MeetingDate,Meeting.MeetingHours + ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson + FROM Meeting_WeekMeeting AS Meeting + LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId ) V + where 1=1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND V.ProjectId =@ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND V.MeetingDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND V.MeetingDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + this.Grid1.Columns[1].Hidden = false; + } + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + if (this.rbCom.SelectedValue == "2" || this.rbCom.SelectedValue == "3") + { + this.drpProject.Hidden = false; + } + else + { + this.drpProject.Hidden = true; + } + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbCom.SelectedValue == "0") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Meeting/CompanySafetyMeetingView.aspx?CompanySafetyMeetingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Meeting/CompanySpecialMeetingView.aspx?CompanySpecialMeetingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "2") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx?SafetyLeaderGroupMeetingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else if (this.rbCom.SelectedValue == "3") + { + var getMeet = BLL.WeekMeetingService.GetWeekMeetingById(Grid1.SelectedRowID); + if (getMeet != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Meeting/WeekMeetingView.aspx?WeekMeetingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Meeting/MonthMeetingView.aspx?MonthMeetingId={0}", Grid1.SelectedRowID, "查看 - "))); + } + } + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.designer.cs new file mode 100644 index 00000000..10881159 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Meeting + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx b/SGGL/FineUIPro.Web/DataShow/Project.aspx new file mode 100644 index 00000000..bc647473 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx @@ -0,0 +1,154 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Project.aspx.cs" + Inherits="FineUIPro.Web.DataShow.Project" %> + + + + + + + + 项目 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs new file mode 100644 index 00000000..4f5ad20a --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs @@ -0,0 +1,196 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Windows.Forms; + +namespace FineUIPro.Web.DataShow +{ + public partial class Project : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT Project.ProjectId,Project.ProjectCode,Project.ProjectName,unit.UnitName,Project.StartDate,Project.EndDate,Project.ProjectAddress,ShortName, ConstructionMoney + , ProjectMoney, DATEDIFF(DAY, Project.StartDate, GETDATE()) AS DayCount, ProjectType.ProjectTypeName AS ProjectTypeName + FROM Base_Project AS Project LEFT JOIN Base_Unit as unit on unit.UnitId = Project.UnitId + LEFT JOIN Base_ProjectType AS ProjectType ON Project.ProjectType = ProjectType.ProjectTypeId + WHERE 1 = 1"; + List listStr = new List(); + + if (this.ckState.SelectedValue != "0") + { + if (this.ckState.SelectedValue == "1") + { + strSql += " AND (ProjectState = '1' OR ProjectState IS NULL)"; + } + else + { + strSql += " AND (ProjectState = @states )"; + listStr.Add(new SqlParameter("@states", this.ckState.SelectedValue)); + } + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + Grid1.DataSource = this.GetPagedDataTable(Grid1, tb); + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 项目经理 + + /// + /// 施工经理 + /// + /// + /// + protected string ConvertConstructionManager(object projectId) + { + return SitePerson_PersonService.GetProjectPersonNameByRoleId(projectId.ToString(), BLL.Const.ConstructionManager); + } + + /// + /// 施工分包商 + /// + /// + /// + protected string ConvertSubcontractor(object projectId) + { + string unitName = string.Empty; + if (projectId != null) + { + unitName = ProjectService.getProjectUnitNameByUnitType(projectId.ToString(), Const.ProjectUnitType_2); + } + return unitName; + } + + protected string ConvertOwn(object projectId) + { + string unitName = string.Empty; + if (projectId != null) + { + unitName = ProjectService.getProjectUnitNameByUnitType(projectId.ToString(), Const.ProjectUnitType_4); + } + return unitName; + } + #endregion + + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ProjectData/ProjectSetView.aspx?ProjectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/Project.aspx.designer.cs new file mode 100644 index 00000000..5270a3dc --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class Project + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ckState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList ckState; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lblCM 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblCM; + + /// + /// lbSubcontractor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbSubcontractor; + + /// + /// lbOwn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbOwn; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx new file mode 100644 index 00000000..531053d0 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx @@ -0,0 +1,125 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectDivision.aspx.cs" + Inherits="FineUIPro.Web.DataShow.ProjectDivision" %> + + + + + + + + 工程划分 + + +
+ + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs new file mode 100644 index 00000000..a621a1c6 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs @@ -0,0 +1,128 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class ProjectDivision : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + #endregion + + #region 加载页面 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT P.ProjectId,P.ProjectCode,P.ProjectName + ,(SELECT COUNT(*) FROM ProjectData_MainItem AS A WHERE A.ProjectId =P.ProjectId ) AS count1 + ,(SELECT COUNT(*) FROM WBS_UnitWork AS B WHERE B.ProjectId =P.ProjectId) AS count2 + ,(SELECT COUNT(*) FROM WBS_ControlItemProject AS C WHERE C.ProjectId =P.ProjectId ) AS count3 + ,(SELECT COUNT(*) FROM WBS_ControlItemProject AS D WHERE D.ProjectId =P.ProjectId ) AS count4 + ,(SELECT COUNT(*) FROM WBS_ControlItemAndCycle AS E WHERE E.ProjectId =P.ProjectId ) AS count5 + FROM Base_Project AS P + WHERE P.ProjectState = 1 "; + List listStr = new List(); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND P.projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + //} + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.designer.cs new file mode 100644 index 00000000..c39c6292 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.designer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class ProjectDivision + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx new file mode 100644 index 00000000..03550327 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx @@ -0,0 +1,137 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectPerson.aspx.cs" + Inherits="FineUIPro.Web.DataShow.ProjectPerson" %> + + + + + + + + 项目人员 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs new file mode 100644 index 00000000..abe4758d --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs @@ -0,0 +1,178 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class ProjectPerson : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName, + Person.PersonName,Person.PersonId,Person.IdentityCard,Persons.Sex,Person.WorkPostId,WorkPost.WorkPostName,Persons.Telephone + ,(CASE WHEN Persons.Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr + FROM SitePerson_Person AS Person + LEFT JOIN Person_Persons AS Persons ON Person.PersonId =Persons.PersonId + LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId + LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId + LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId + WHERE States=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) "; + List listStr = new List(); + if (this.drpProject.SelectedValue !=Const._Null) + { + strSql += " AND Person.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (rbType.SelectedValue == "0") + { + strSql += " AND Person.WorkPostId = @WorkPostId"; + listStr.Add(new SqlParameter("@WorkPostId", Const.WorkPost_HSSEDirector)); + } + else if (rbType.SelectedValue == "1") + { + strSql += " AND WorkPost.IsHsse = 1"; + } + else if (rbType.SelectedValue == "2") + { + strSql += " AND Person.IsSafetyMonitoring = 1"; + } + else if (rbType.SelectedValue == "3") + { + strSql += " AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId =Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND IsRegisterHSSE =1) > 0"; + } + else if (rbType.SelectedValue == "4") + { + strSql += " AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId =Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND CertificateType ='A') > 0"; + } + else if (rbType.SelectedValue == "5") + { + strSql += " AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId =Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND CertificateType ='B') > 0"; + } + else if (rbType.SelectedValue == "6") + { + strSql += " AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId =Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND CertificateType ='C') > 0"; + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../Person/PersonView.aspx?PersonId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.designer.cs new file mode 100644 index 00000000..c3c2155a --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class ProjectPerson + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx new file mode 100644 index 00000000..f899c548 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityAcceptance.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityAcceptance" %> + + + + + + + + 质量验收 + + +
+ + + + + + + + + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs new file mode 100644 index 00000000..a458d0a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs @@ -0,0 +1,137 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityAcceptance : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + #endregion + + #region 加载页面 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount, + (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2)) + else 0 end) as rateV + from (select B.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount, + isnull((select COUNT(*) + from ProcessControl_InspectionManagementDetail AS Detail + LEFT JOIN WBS_BreakdownProject AS Breakp ON Detail.ControlPointType=Breakp.BreakdownProjectId + LEFT JOIN ProcessControl_InspectionManagement AS Inspection ON Detail.InspectionId=Inspection.InspectionId + where Breakp.CheckAcceptType =@type AND Inspection.IsOnceQualified = 1 + group by Breakp.ProjectId),0) as cCount + FROM ProcessControl_InspectionManagementDetail AS A + LEFT JOIN WBS_BreakdownProject AS B ON A.ControlPointType=B.BreakdownProjectId + left join Base_Project as p on B.ProjectId=p.ProjectId + where p.projectId is not null AND B.CheckAcceptType =@type "; + + List listStr = new List(); + listStr.Add(new SqlParameter("@type", this.rbType.SelectedValue)); + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND B.projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + //} + strSql += " group by B.ProjectId,p.ProjectCode,p.ProjectName) as v"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs new file mode 100644 index 00000000..d628a759 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityAcceptance + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx new file mode 100644 index 00000000..5563db0b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityControlPoint.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityControlPoint" %> + + + + + + + + 质量控制点 + + +
+ + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs new file mode 100644 index 00000000..4fe02965 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs @@ -0,0 +1,200 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityControlPoint : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + #endregion + + #region 加载页面 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + /// + /// 控制点 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(), "S"); + } + return cout1; + } + + /// + /// 控制点 + /// + /// + /// + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(), "A"); + } + return cout1; + } + + /// + /// 控制点 + /// + /// + /// + protected int Count3(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1= getcount(projectId.ToString(), "B"); + } + return cout1; + } + + protected int Count4(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(), "C"); + } + return cout1; + } + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in Funs.DB.WBS_ControlItemAndCycle + select x; + /// + /// + /// + /// + /// + /// + private int getcount(string projectId, string level) + { + int count = 0; + count = getDataLists.Where(x => x.ProjectId == projectId && x.ControlPoint.Contains(level)).Count(); + return count; + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.designer.cs new file mode 100644 index 00000000..eb094496 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityControlPoint + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx new file mode 100644 index 00000000..6ac5fdad --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx @@ -0,0 +1,121 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityInstruments.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityInstruments" %> + + + + + + + + 计量器具 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs new file mode 100644 index 00000000..9f6846b5 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs @@ -0,0 +1,218 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityInstruments : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityInstrumentsItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 总工时数 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") + select x; + if (datetime1.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate <= datetime2); + } + + cout1 = getD1.Count(); + } + return cout1; + } + + /// + /// 损失工时数 + /// + /// + /// + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true + select x; + if (datetime1.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate <= datetime2); + } + + cout1 = getD1.Count(); + } + return cout1; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.designer.cs new file mode 100644 index 00000000..5287b22b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.designer.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityInstruments + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx new file mode 100644 index 00000000..f87ebe4a --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx @@ -0,0 +1,123 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityInstrumentsItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityInstrumentsItem" %> + + + + + + + + 计量器具 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs new file mode 100644 index 00000000..4a4bd54e --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs @@ -0,0 +1,130 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityInstrumentsItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status, + InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate, + (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification,(CASE WHEN IsCheckOK=1 THEN '是' WHEN IsCheckOK=0 THEN '否' ELSE '' END) AS IsCheckOK, InspectionType, LeaveDate, UnitsCount + from Comprehensive_InspectionMachine C + left join Base_Unit U on C.UnitId=U.UnitId + left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId + where C.ProjectId = @ProjectId"; + List listStr = new List(); + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND C.InspectionDate >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND C.InspectionDate <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + /// + /// 转换当日人工时 + /// + /// + /// + protected string ConvertPersonWorkTimeSum(object dayReportId) + { + if (dayReportId != null) + { + return (Funs.DB.SitePerson_DayReportDetail.Where(x => x.DayReportId == dayReportId.ToString()).Sum(x => x.PersonWorkTime) ?? 0).ToString(); + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.designer.cs new file mode 100644 index 00000000..c2a12f1c --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityInstrumentsItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx new file mode 100644 index 00000000..03d44a3d --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx @@ -0,0 +1,118 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityPerson.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityPerson" %> + + + + + + + + 质量人员 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs new file mode 100644 index 00000000..889cb3e7 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs @@ -0,0 +1,144 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityPerson : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + if (this.rbCom.SelectedValue != "3") + { + strSql = @"SELECT Person.CompanyBranchPersonId AS ID,Unit.UnitName, Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr + ,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.IsOnJob,Person.Remark, '' as ProjectName " + + @" FROM Person_CompanyBranchPerson AS Person " + + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId " + + @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 "; + string UnitId =Const.UnitId_SEDIN; + if (this.rbCom.SelectedValue == "1") + { + strSql += " AND Person.UnitId = @UnitId"; + } + else + { + strSql += " AND Person.UnitId != @UnitId"; + } + listStr.Add(new SqlParameter("@UnitId", UnitId)); + this.Grid1.Columns[1].Hidden = true; + } + else + { + strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.Remark + FROM SitePerson_Person AS Person + LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId + LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 "; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND Person.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + this.Grid1.Columns[1].Hidden = false; + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + if (this.rbCom.SelectedValue == "3") + { + this.drpProject.Hidden = false; + } + else + { + this.drpProject.Hidden = true; + } + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.designer.cs new file mode 100644 index 00000000..fd068a50 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityPerson + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx new file mode 100644 index 00000000..248487b7 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx @@ -0,0 +1,123 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityProblem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityProblem" %> + + + + + + + + 质量问题 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs new file mode 100644 index 00000000..2d5685f4 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs @@ -0,0 +1,177 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityProblem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount, + (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2)) + else 0 end) as rateV + from (select h.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount, + isnull((select COUNT(*) from Check_CheckControl as c + where c.ProjectId=h.ProjectId and State =7 + and '1' = @cpara + group by c.ProjectId),0) as cCount + from Check_CheckControl as h + left join Base_Project as p on h.ProjectId=p.ProjectId + where p.projectId is not null "; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND h.projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + + cpara += " AND c.projectId ="+ this.drpProject.SelectedValue; + } + + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND h.CheckDate >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + cpara += " AND c.CheckDate >=" + this.txtStartTime.Text; + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND h.CheckDate <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + cpara += " AND c.CheckDate <=" + this.txtEndTime.Text; + } + if (!string.IsNullOrEmpty(cpara)) + { + listStr.Add(new SqlParameter("@cpara"," '1' And "+ cpara)); + } + else + { + listStr.Add(new SqlParameter("@cpara", "'1'")); + } + strSql += " group by h.ProjectId,p.ProjectCode,p.ProjectName) as v"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityProblemItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs new file mode 100644 index 00000000..5c220053 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityProblem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx new file mode 100644 index 00000000..194ea691 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx @@ -0,0 +1,118 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityProblemItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityProblemItem" %> + + + + + + + + 质量问题详细 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs new file mode 100644 index 00000000..8d648474 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs @@ -0,0 +1,194 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityProblemItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT chec.CheckControlCode,chec.CheckSite,chec.ProjectId,chec.unitId,cNProfessional.ProfessionalName, + QualityQuestionType.QualityQuestionType as QuestionType, + chec.checkman,chec.CheckDate,chec.DocCode,chec.submitman,chec.state,chec.CNProfessionalCode, + unit.UnitName,unitWork.UnitWorkName+(case unitWork.ProjectType when '1' then '(建筑)' else '(安装)' end) as UnitWorkName + FROM Check_CheckControl chec + left join Base_Unit unit on unit.unitId=chec.unitId + left join Base_CNProfessional cNProfessional on cNProfessional.CNProfessionalId=chec.CNProfessionalCode + left join WBS_UnitWork unitWork on unitWork.UnitWorkId = chec.UnitWorkId + left join Base_QualityQuestionType QualityQuestionType on QualityQuestionType.QualityQuestionTypeId = chec.QuestionType + WHERE 1=1 "; + List listStr = new List(); + strSql += " AND chec.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') "; + listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : "")); + listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : "")); + if (dpHandelStatus.SelectedValue != "0") + { + if (dpHandelStatus.SelectedValue.Equals("1")) + { + strSql += " AND (chec.state='5' or chec.state='6')"; + } + else if (dpHandelStatus.SelectedValue.Equals("2")) + { + strSql += " AND chec.state='7'"; + } + else if (dpHandelStatus.SelectedValue.Equals("3")) + { + strSql += " AND DATEADD(day,1,chec.LimitDate)< GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7"; + } + else if (dpHandelStatus.SelectedValue.Equals("4")) + { + strSql += " AND DATEADD(day,1,chec.LimitDate)> GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7"; + } + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + protected string ConvertImageUrlByImage(object registrationId) + { + string url = string.Empty; + if (registrationId != null) + { + IList sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckListMenuId); + + if (sourlist != null && sourlist.Count > 0) + { + string AttachUrl = ""; + foreach (var item in sourlist) + { + if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png")) + AttachUrl += item.AttachUrl.TrimEnd(',') + ","; + } + url = BLL.UploadAttachmentService.ShowImage("../", AttachUrl.TrimEnd(',')); + } + } + return url; + } + protected string ConvertImgUrlByImage(object registrationId) + { + string url = string.Empty; + + if (registrationId != null) + { + IList sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId); + + if (sourlist != null && sourlist.Count > 0) + { + string AttachUrl = ""; + foreach (var item in sourlist) + { + if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png")) + AttachUrl += item.AttachUrl.TrimEnd(',') + ","; + } + url = BLL.UploadAttachmentService.ShowImage("../", AttachUrl.TrimEnd(',')); + } + } + return url; + } + + public string Convertstatus(Object code) + { + Model.Check_CheckControl checkControl = BLL.CheckControlService.GetCheckControl(code.ToString()); + if (checkControl.State.Equals("5") || checkControl.State.Equals("6")) + { + return "未确认"; + } + else if (checkControl.State == Const.CheckControl_Complete) + { //闭环 + return "已闭环"; + } + //else if( checkControl.LimitDate> ) + else if (Convert.ToDateTime(checkControl.LimitDate).AddDays(1) < DateTime.Now) //延期未整改 + { + return "超期未整改"; + + } + else //期内未整改 + { + return "未整改"; + + } + } + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.designer.cs new file mode 100644 index 00000000..d9377d68 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityProblemItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// dpHandelStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList dpHandelStatus; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl; + + /// + /// lbImageUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl2; + + /// + /// lbState2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbState2; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx new file mode 100644 index 00000000..0836f4a6 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx @@ -0,0 +1,121 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityTraining.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityTraining" %> + + + + + + + + 质量培训 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs new file mode 100644 index 00000000..8a11f4c8 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs @@ -0,0 +1,214 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityTraining : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (this.rbCom.SelectedValue == "1") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityTrainingItem1.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityTrainingItem2.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 数量 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + if (this.rbCom.SelectedValue == "1") + { + var getT = Funs.DB.Comprehensive_InspectionPerson.Where(x => x.ProjectId == projectId.ToString() && x.IsTrain == true); + if (datetime1.HasValue) + { + getT = getT.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getT = getT.Where(x => x.CompileDate <= datetime2); + } + cout1 = getT.Count(); + } + else + { + var getT = Funs.DB.Comprehensive_DesignDetails.Where(x => x.ProjectId == projectId.ToString()); + if (datetime1.HasValue) + { + getT = getT.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getT = getT.Where(x => x.CompileDate <= datetime2); + } + if (getT.Count() > 0) + { + cout1 = getT.Sum(x => x.JoinPersonNum ?? 0); + } + } + } + return cout1; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.designer.cs new file mode 100644 index 00000000..3ac9ca04 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.designer.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityTraining + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// rbCom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbCom; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx new file mode 100644 index 00000000..8802be55 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx @@ -0,0 +1,127 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityTrainingItem1.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityTrainingItem1" %> + + + + + + + + 质量培训 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs new file mode 100644 index 00000000..c3a38788 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs @@ -0,0 +1,150 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityTrainingItem1 : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status, + CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime, + DepartureTime, AttachUrl,CompileMan, CompileDate, + IsOnSite, UnitWorkId,U.UnitName,CN.ProfessionalName ,P.WorkPostName as PostName + from Comprehensive_InspectionPerson C + left join Base_Unit U on C.UnitId=U.UnitId + left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId + left join Base_WorkPost P on C.PostId=P.WorkPostId + where C.ProjectId = @ProjectId"; + List listStr = new List(); + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND C.CompileDate >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND C.CompileDate <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region 格式化字符串 + /// + /// 获取单位工程名称 + /// + /// + /// + protected string ConvertUnitWork(object CarryUnitWorks) + { + string CarryUnitWorkName = string.Empty; + if (CarryUnitWorks != null) + { + string[] Ids = CarryUnitWorks.ToString().Split(','); + foreach (string t in Ids) + { + var UnitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(t); + if (UnitWork != null) + { + CarryUnitWorkName += UnitWork.UnitWorkName + ","; + } + } + } + if (CarryUnitWorkName != string.Empty) + { + return CarryUnitWorkName.Substring(0, CarryUnitWorkName.Length - 1); + } + else + { + return ""; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.designer.cs new file mode 100644 index 00000000..74f0bacb --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityTrainingItem1 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx new file mode 100644 index 00000000..4af1b43b --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx @@ -0,0 +1,106 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityTrainingItem2.aspx.cs" + Inherits="FineUIPro.Web.DataShow.QualityTrainingItem2" %> + + + + + + + + 质量培训 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs new file mode 100644 index 00000000..c79981bc --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs @@ -0,0 +1,176 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class QualityTrainingItem2 : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status, + UnitName, AttachUrl, CompileMan, CN.ProfessionalName + from Comprehensive_DesignDetails C + left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId + where C.ProjectId = @ProjectId"; + List listStr = new List(); + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND C.DetailsDate >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND C.DetailsDate <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region 格式化字符串 + /// + /// 获取单位工程名称 + /// + /// + /// + protected string ConvertUnitWork(object CarryUnitWorks) + { + string CarryUnitWorkName = string.Empty; + if (CarryUnitWorks != null) + { + string[] Ids = CarryUnitWorks.ToString().Split(','); + foreach (string t in Ids) + { + var UnitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(t); + if (UnitWork != null) + { + CarryUnitWorkName += UnitWork.UnitWorkName + ","; + } + } + } + if (CarryUnitWorkName != string.Empty) + { + return CarryUnitWorkName.Substring(0, CarryUnitWorkName.Length - 1); + } + else + { + return ""; + } + } + + /// + /// 获取单位名称 + /// + /// + /// + protected string ConvertCarryUnit(object CarryUnitIds) + { + string CarryUnitName = string.Empty; + if (CarryUnitIds != null) + { + string[] Ids = CarryUnitIds.ToString().Split(','); + foreach (string t in Ids) + { + var type = BLL.UnitService.GetUnitByUnitId(t); + if (type != null) + { + CarryUnitName += type.UnitName + ","; + } + } + } + if (CarryUnitName != string.Empty) + { + return CarryUnitName.Substring(0, CarryUnitName.Length - 1); + } + else + { + return ""; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.designer.cs new file mode 100644 index 00000000..5def9f8c --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class QualityTrainingItem2 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx new file mode 100644 index 00000000..2dcaa379 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx @@ -0,0 +1,126 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SecurityCost.aspx.cs" + Inherits="FineUIPro.Web.DataShow.SecurityCost" %> + + + + + + + + 安全费用 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs new file mode 100644 index 00000000..b94246ad --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs @@ -0,0 +1,159 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class SecurityCost : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + // btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + List listStr = new List(); + + strSql = @"SELECT cost.CostSmallDetailId, p.ProjectId,p.ProjectCode,p.ProjectName,cost.UnitId,Unit.UnitName,cost.Months + ,(CAST((SELECT SUM(ISNULL(CostMoney,0)) FROM CostGoods_CostSmallDetailItem + WHERE CostSmallDetailId=cost.CostSmallDetailId) *1.0 /10000 as decimal(18, 2) ))AS SUMCost + FROM CostGoods_CostSmallDetail as cost + left join Base_Project as p on cost.ProjectId =p.ProjectId + left join Base_Unit as Unit on cost.UnitId =Unit.UnitId + WHERE 1=1"; + + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND cost.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + { + strSql += " AND cost.Months >=@StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + strSql += " AND cost.Months <=@EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/CostGoods/CostSmallDetailView.aspx?CostSmallDetailId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.designer.cs new file mode 100644 index 00000000..cf334106 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class SecurityCost + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx new file mode 100644 index 00000000..fcc62310 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx @@ -0,0 +1,131 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SecurityRisk.aspx.cs" + Inherits="FineUIPro.Web.DataShow.SecurityRisk" %> + + + + + + + + 安全风险 + + +
+ + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs new file mode 100644 index 00000000..ace6f7b4 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs @@ -0,0 +1,248 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class SecurityRisk : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + #endregion + + #region 加载页面 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SecurityRiskItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + /// + /// + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 总工时数 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(), 1); + } + return cout1; + } + + /// + /// 损失工时数 + /// + /// + /// + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(),2); + } + return cout1; + } + + /// + /// 安全工时数 + /// + /// + /// + protected int Count3(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1= getcount(projectId.ToString(), 3); + } + return cout1; + } + + protected int Count4(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + cout1 = getcount(projectId.ToString(), 4); + } + return cout1; + } + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in Funs.DB.Hazard_HazardList + select x; + /// + /// 定义变量 + /// + private static IQueryable getDataItemLists = from x in Funs.DB.Hazard_HazardSelectedItem + where x.IsStart == true + select x; + /// + /// + /// + /// + /// + /// + private int getcount(string projectId, int level) + { + int count = 0; + var getlevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => x.RiskLevel == level); + if (getlevel != null) + { + count = getDataItemLists.Where(x => x.ProjectId == projectId && x.HazardLevel == getlevel.RiskLevelId).Count(); + } + return count; + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.designer.cs new file mode 100644 index 00000000..531461aa --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class SecurityRisk + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx new file mode 100644 index 00000000..719a7784 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx @@ -0,0 +1,134 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SecurityRiskItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.SecurityRiskItem" %> + + + + + + + + 安全工时 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs new file mode 100644 index 00000000..9c06345f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs @@ -0,0 +1,205 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.DataShow +{ + public partial class SecurityRiskItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select Item.HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId + , Item.HazardListTypeId,Item.HazardId,Item.HazardItems,Item.DefectsType,Item.MayLeadAccidents + ,Item.HelperMethod,Item.HazardJudge_L,Item.HazardJudge_E,Item.HazardJudge_C,Item.HazardJudge_E + ,level.RiskLevelName,Item.ControlMeasures + from Hazard_HazardSelectedItem AS Item + LEFT JOIN Hazard_HazardList AS List on List.HazardListId = Item.HazardListId + LEFT JOIN Base_RiskLevel as level on level.RiskLevelId = Item.HazardLevel + WHERE List.States = " + BLL.Const.State_2; + List listStr = new List(); + strSql += " AND List.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND List.IdentificationDate >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND List.IdentificationDate <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + + #region 转换字符串 + /// + /// 转换工作阶段 + /// + /// + /// + protected string ConvertWorkStage(object workStage) + { + if (workStage != null) + { + string workStages = string.Empty; + string[] strList = workStage.ToString().Split(','); + foreach (string str in strList) + { + Model.Base_WorkStage c = BLL.WorkStageService.GetWorkStageById(str); + if (c != null) + { + workStages += c.WorkStageName + ","; + } + } + if (!string.IsNullOrEmpty(workStages)) + { + workStages = workStages.Substring(0, workStages.LastIndexOf(",")); + } + return workStages; + } + return ""; + } + + /// + /// 获取危险源编号 + /// + /// + /// + protected string ConvertHazardCode(object HazardId) + { + string hazardCode = string.Empty; + if (HazardId != null) + { + Model.Technique_HazardList hazardList = BLL.HazardListService.GetHazardListById(HazardId.ToString()); + if (hazardList != null) + { + hazardCode = hazardList.HazardCode; + } + } + return hazardCode; + } + + /// + /// 获取危险源类别 + /// + /// + /// + protected string ConvertSupHazardListTypeId(object hazardListTypeId) + { + if (hazardListTypeId != null) + { + Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString()); + if (hazardListType != null) + { + var hazard = BLL.HazardListTypeService.GetHazardListTypeById(hazardListType.SupHazardListTypeId); + if (hazard != null) + { + return hazard.HazardListTypeName; + } + } + } + return null; + } + + /// + /// 获取危险源项 + /// + /// + /// + protected string ConvertHazardListTypeId(object hazardListTypeId) + { + if (hazardListTypeId != null) + { + Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString()); + if (hazardListType != null) + { + return hazardListType.HazardListTypeName; + } + } + return null; + } + + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.designer.cs new file mode 100644 index 00000000..a2ef7d65 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class SecurityRiskItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// lblHazardId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblHazardId; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx new file mode 100644 index 00000000..d3420f13 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx @@ -0,0 +1,125 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkingHours.aspx.cs" + Inherits="FineUIPro.Web.DataShow.WorkingHours" %> + + + + + + + + 安全工时 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs new file mode 100644 index 00000000..c232f3c5 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs @@ -0,0 +1,298 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class WorkingHours : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); + // 绑定表格t + BindGrid(); + } + } + + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; + List listStr = new List(); + string cpara = string.Empty; + if (this.drpProject.SelectedValue != Const._Null) + { + strSql += " AND projectId = @projectId"; ///状态为已完成 + listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); + } + + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid双击事件 编辑 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + /// + /// + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkingHoursItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); + } + #endregion + + + protected void btnView_Click(object sender, EventArgs e) + { + EditData(); + } + + + /// + /// 总工时数 + /// + /// + /// + protected decimal Count1(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getD1 = from x in Funs.DB.SitePerson_DayReport + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + if (datetime1.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getD1 = getD1.Where(x => x.CompileDate <= datetime2); + } + var getC = from x in Funs.DB.SitePerson_DayReportDetail + join y in getD1 on x.DayReportId equals y.DayReportId + where y.ProjectId == projectId.ToString() + select x; + if (getC.Count() > 0) + { + cout1 = getC.Sum(x => x.PersonWorkTime ?? 0); + } + } + return cout1; + } + + /// + /// 损失工时数 + /// + /// + /// + protected decimal Count2(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getD1 = from x in Funs.DB.Accident_AccidentHandle + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + var getD2 = from x in Funs.DB.Accident_AccidentReport + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + if (datetime1.HasValue) + { + getD1 = getD1.Where(x => x.AccidentDate >= datetime1); + getD2 = getD2.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getD1 = getD1.Where(x => x.AccidentDate <= datetime2); + getD2 = getD2.Where(x => x.CompileDate <= datetime2); + } + if (getD1.Count() > 0) + { + cout1 += getD1.Sum(x => x.WorkHoursLoss ?? 0); + } + if (getD2.Count() > 0) + { + cout1 += getD2.Sum(x => x.WorkingHoursLoss ?? 0); + } + } + return cout1; + } + + /// + /// 安全工时数 + /// + /// + /// + protected decimal Count3(object projectId) + { + decimal cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getC1 = from x in Funs.DB.SitePerson_DayReport + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + + var getD1 = from x in Funs.DB.Accident_AccidentHandle + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + var getD2 = from x in Funs.DB.Accident_AccidentReport + join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState == Const.ProjectState_1 + select x; + + if (datetime1.HasValue) + { + getC1 = getC1.Where(x => x.CompileDate >= datetime1); + getD1 = getD1.Where(x => x.AccidentDate >= datetime1); + getD2 = getD2.Where(x => x.CompileDate >= datetime1); + } + if (datetime2.HasValue) + { + getC1 = getC1.Where(x => x.CompileDate <= datetime2); + getD1 = getD1.Where(x => x.AccidentDate <= datetime2); + getD2 = getD2.Where(x => x.CompileDate <= datetime2); + } + var getC = from x in Funs.DB.SitePerson_DayReportDetail + join y in getC1 on x.DayReportId equals y.DayReportId + where y.ProjectId == projectId.ToString() + select x; + if (getC.Count() > 0) + { + cout1 = getC.Sum(x => x.PersonWorkTime ?? 0); + } + + if (getD1.Count() > 0) + { + cout1 = cout1 -getD1.Sum(x => x.WorkHoursLoss ?? 0); + } + if (getD2.Count() > 0) + { + cout1 = cout1- getD2.Sum(x => x.WorkingHoursLoss ?? 0); + } + } + return cout1; + } + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.designer.cs new file mode 100644 index 00000000..1f9e1eb8 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class WorkingHours + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx new file mode 100644 index 00000000..54435244 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx @@ -0,0 +1,84 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkingHoursItem.aspx.cs" + Inherits="FineUIPro.Web.DataShow.WorkingHoursItem" %> + + + + + + + + 安全工时 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs new file mode 100644 index 00000000..22fdd1bb --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs @@ -0,0 +1,124 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class WorkingHoursItem : PageBase + { + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = Request.Params["projectId"]; + this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"select DayReportId,CompileDate,ProjectId from SitePerson_DayReport WHERE 1=1 "; + List listStr = new List(); + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + strSql += " AND CompileDate >= @StartTime"; + listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + strSql += " AND CompileDate <= @EndTime"; + listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + /// + /// 转换当日人工时 + /// + /// + /// + protected string ConvertPersonWorkTimeSum(object dayReportId) + { + if (dayReportId != null) + { + return (Funs.DB.SitePerson_DayReportDetail.Where(x => x.DayReportId == dayReportId.ToString()).Sum(x => x.PersonWorkTime) ?? 0).ToString(); + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.designer.cs new file mode 100644 index 00000000..6b77216f --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class WorkingHoursItem + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lblWorkTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblWorkTime; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 17e7a92f..2beb7686 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -444,6 +444,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7108,6 +7143,251 @@ WorkPackageSet2In.aspx + + Accident.aspx + ASPXCodeBehind + + + Accident.aspx + + + Check.aspx + ASPXCodeBehind + + + Check.aspx + + + CompanyPerson.aspx + ASPXCodeBehind + + + CompanyPerson.aspx + + + ConstructionEquipment.aspx + ASPXCodeBehind + + + ConstructionEquipment.aspx + + + EduTrain.aspx + ASPXCodeBehind + + + EduTrain.aspx + + + Emergency.aspx + ASPXCodeBehind + + + Emergency.aspx + + + Environmental.aspx + ASPXCodeBehind + + + Environmental.aspx + + + HiddenRectification.aspx + ASPXCodeBehind + + + HiddenRectification.aspx + + + HiddenRectificationItem.aspx + ASPXCodeBehind + + + HiddenRectificationItem.aspx + + + HJGLDefect.aspx + ASPXCodeBehind + + + HJGLDefect.aspx + + + HJGLWelder.aspx + ASPXCodeBehind + + + HJGLWelder.aspx + + + HJGLWelding.aspx + ASPXCodeBehind + + + HJGLWelding.aspx + + + HJGLWeldingItem.aspx + ASPXCodeBehind + + + HJGLWeldingItem.aspx + + + LargeEngineering.aspx + ASPXCodeBehind + + + LargeEngineering.aspx + + + LargeEngineeringItem.aspx + ASPXCodeBehind + + + LargeEngineeringItem.aspx + + + License.aspx + ASPXCodeBehind + + + License.aspx + + + Meeting.aspx + ASPXCodeBehind + + + Meeting.aspx + + + Project.aspx + ASPXCodeBehind + + + Project.aspx + + + ProjectDivision.aspx + ASPXCodeBehind + + + ProjectDivision.aspx + + + ProjectPerson.aspx + ASPXCodeBehind + + + ProjectPerson.aspx + + + QualityAcceptance.aspx + ASPXCodeBehind + + + QualityAcceptance.aspx + + + QualityControlPoint.aspx + ASPXCodeBehind + + + QualityControlPoint.aspx + + + QualityInstruments.aspx + ASPXCodeBehind + + + QualityInstruments.aspx + + + QualityInstrumentsItem.aspx + ASPXCodeBehind + + + QualityInstrumentsItem.aspx + + + QualityPerson.aspx + ASPXCodeBehind + + + QualityPerson.aspx + + + QualityProblem.aspx + ASPXCodeBehind + + + QualityProblem.aspx + + + QualityProblemItem.aspx + ASPXCodeBehind + + + QualityProblemItem.aspx + + + QualityTraining.aspx + ASPXCodeBehind + + + QualityTraining.aspx + + + QualityTrainingItem1.aspx + ASPXCodeBehind + + + QualityTrainingItem1.aspx + + + QualityTrainingItem2.aspx + ASPXCodeBehind + + + QualityTrainingItem2.aspx + + + SecurityCost.aspx + ASPXCodeBehind + + + SecurityCost.aspx + + + SecurityRisk.aspx + ASPXCodeBehind + + + SecurityRisk.aspx + + + SecurityRiskItem.aspx + ASPXCodeBehind + + + SecurityRiskItem.aspx + + + WorkingHours.aspx + ASPXCodeBehind + + + WorkingHours.aspx + + + WorkingHoursItem.aspx + ASPXCodeBehind + + + WorkingHoursItem.aspx + TrainRecordAnalysis.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx index 7aa6aab7..48b07d37 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx @@ -62,6 +62,9 @@ + + @@ -91,9 +94,9 @@ - <%-- - --%> + + diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs index 93deef23..09c34fc4 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using Microsoft.Office.Core; using System; using System.Linq; @@ -311,5 +312,35 @@ namespace FineUIPro.Web.Person { this.BindGrid(); } + + protected void btnResetCardNo_Click(object sender, EventArgs e) + { + string projectId = this.drpProject.SelectedValue; + + if (projectId != Const._Null) + { + int count = 0; + var getSitePersons = from x in Funs.DB.SitePerson_Person + join y in Funs.DB.EduTrain_TrainRecordDetail on x.PersonId equals y.PersonId + join z in Funs.DB.EduTrain_TrainRecord on y.TrainingId equals z.TrainingId + where x.ProjectId == projectId && z.ProjectId == projectId && (x.CardNo == null || x.CardNo == "") + && y.CheckResult == true + select x; + if (getSitePersons.Count() > 0) + { + foreach (var person in getSitePersons) + { + SitePerson_PersonService.SendCardNo(person.SitePersonId); + count++; + } + } + Alert.ShowInParent("操作完成!共补卡号" + count.ToString() + "个。", MessageBoxIcon.Information); + BindGrid(); + } + else + { + Alert.ShowInParent("请先选择项目!", MessageBoxIcon.Warning); + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.designer.cs index b59641e3..9b0f416e 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.designer.cs @@ -158,6 +158,15 @@ namespace FineUIPro.Web.Person /// protected global::FineUIPro.Button btnImport; + /// + /// btnResetCardNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnResetCardNo; + /// /// Label1 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index f4fdd7ff..bd0cd881 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -197,6 +197,9 @@ namespace Model partial void InsertBase_RewardType(Base_RewardType instance); partial void UpdateBase_RewardType(Base_RewardType instance); partial void DeleteBase_RewardType(Base_RewardType instance); + partial void InsertBase_RiskLevel(Base_RiskLevel instance); + partial void UpdateBase_RiskLevel(Base_RiskLevel instance); + partial void DeleteBase_RiskLevel(Base_RiskLevel instance); partial void InsertBase_RulesRegulationsType(Base_RulesRegulationsType instance); partial void UpdateBase_RulesRegulationsType(Base_RulesRegulationsType instance); partial void DeleteBase_RulesRegulationsType(Base_RulesRegulationsType instance); @@ -323,6 +326,9 @@ namespace Model partial void InsertCheck_PauseNoticeFlowOperate(Check_PauseNoticeFlowOperate instance); partial void UpdateCheck_PauseNoticeFlowOperate(Check_PauseNoticeFlowOperate instance); partial void DeleteCheck_PauseNoticeFlowOperate(Check_PauseNoticeFlowOperate instance); + partial void InsertCheck_ProjectLeaderCheck(Check_ProjectLeaderCheck instance); + partial void UpdateCheck_ProjectLeaderCheck(Check_ProjectLeaderCheck instance); + partial void DeleteCheck_ProjectLeaderCheck(Check_ProjectLeaderCheck instance); partial void InsertCheck_PunishNotice(Check_PunishNotice instance); partial void UpdateCheck_PunishNotice(Check_PunishNotice instance); partial void DeleteCheck_PunishNotice(Check_PunishNotice instance); @@ -359,6 +365,24 @@ namespace Model partial void InsertCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); partial void UpdateCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); partial void DeleteCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); + partial void InsertComprehensive_DesignDetails(Comprehensive_DesignDetails instance); + partial void UpdateComprehensive_DesignDetails(Comprehensive_DesignDetails instance); + partial void DeleteComprehensive_DesignDetails(Comprehensive_DesignDetails instance); + partial void InsertComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); + partial void UpdateComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); + partial void DeleteComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); + partial void InsertComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); + partial void UpdateComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); + partial void DeleteComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); + partial void InsertComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); + partial void UpdateComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); + partial void DeleteComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); + partial void InsertComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); + partial void UpdateComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); + partial void DeleteComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); + partial void InsertComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); + partial void UpdateComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); + partial void DeleteComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); partial void InsertCostGoods_CostManage(CostGoods_CostManage instance); partial void UpdateCostGoods_CostManage(CostGoods_CostManage instance); partial void DeleteCostGoods_CostManage(CostGoods_CostManage instance); @@ -413,9 +437,15 @@ namespace Model partial void InsertEmergency_DrillRecordList(Emergency_DrillRecordList instance); partial void UpdateEmergency_DrillRecordList(Emergency_DrillRecordList instance); partial void DeleteEmergency_DrillRecordList(Emergency_DrillRecordList instance); + partial void InsertEmergency_DrillRecordList_Unit(Emergency_DrillRecordList_Unit instance); + partial void UpdateEmergency_DrillRecordList_Unit(Emergency_DrillRecordList_Unit instance); + partial void DeleteEmergency_DrillRecordList_Unit(Emergency_DrillRecordList_Unit instance); partial void InsertEmergency_EmergencyList(Emergency_EmergencyList instance); partial void UpdateEmergency_EmergencyList(Emergency_EmergencyList instance); partial void DeleteEmergency_EmergencyList(Emergency_EmergencyList instance); + partial void InsertEmergency_EmergencyList_Unit(Emergency_EmergencyList_Unit instance); + partial void UpdateEmergency_EmergencyList_Unit(Emergency_EmergencyList_Unit instance); + partial void DeleteEmergency_EmergencyList_Unit(Emergency_EmergencyList_Unit instance); partial void InsertEmergency_EmergencyProcess(Emergency_EmergencyProcess instance); partial void UpdateEmergency_EmergencyProcess(Emergency_EmergencyProcess instance); partial void DeleteEmergency_EmergencyProcess(Emergency_EmergencyProcess instance); @@ -431,6 +461,18 @@ namespace Model partial void InsertEmergency_EmergencyTeamItem(Emergency_EmergencyTeamItem instance); partial void UpdateEmergency_EmergencyTeamItem(Emergency_EmergencyTeamItem instance); partial void DeleteEmergency_EmergencyTeamItem(Emergency_EmergencyTeamItem instance); + partial void InsertEnvironmental_ArchitectureReport(Environmental_ArchitectureReport instance); + partial void UpdateEnvironmental_ArchitectureReport(Environmental_ArchitectureReport instance); + partial void DeleteEnvironmental_ArchitectureReport(Environmental_ArchitectureReport instance); + partial void InsertEnvironmental_ArchitectureReportItem(Environmental_ArchitectureReportItem instance); + partial void UpdateEnvironmental_ArchitectureReportItem(Environmental_ArchitectureReportItem instance); + partial void DeleteEnvironmental_ArchitectureReportItem(Environmental_ArchitectureReportItem instance); + partial void InsertEnvironmental_ChemicalReport(Environmental_ChemicalReport instance); + partial void UpdateEnvironmental_ChemicalReport(Environmental_ChemicalReport instance); + partial void DeleteEnvironmental_ChemicalReport(Environmental_ChemicalReport instance); + partial void InsertEnvironmental_ChemicalReportItem(Environmental_ChemicalReportItem instance); + partial void UpdateEnvironmental_ChemicalReportItem(Environmental_ChemicalReportItem instance); + partial void DeleteEnvironmental_ChemicalReportItem(Environmental_ChemicalReportItem instance); partial void InsertEnvironmental_EIAReport(Environmental_EIAReport instance); partial void UpdateEnvironmental_EIAReport(Environmental_EIAReport instance); partial void DeleteEnvironmental_EIAReport(Environmental_EIAReport instance); @@ -779,6 +821,12 @@ namespace Model partial void InsertMeeting_ClassMeeting(Meeting_ClassMeeting instance); partial void UpdateMeeting_ClassMeeting(Meeting_ClassMeeting instance); partial void DeleteMeeting_ClassMeeting(Meeting_ClassMeeting instance); + partial void InsertMeeting_CompanySafetyMeeting(Meeting_CompanySafetyMeeting instance); + partial void UpdateMeeting_CompanySafetyMeeting(Meeting_CompanySafetyMeeting instance); + partial void DeleteMeeting_CompanySafetyMeeting(Meeting_CompanySafetyMeeting instance); + partial void InsertMeeting_CompanySpecialMeeting(Meeting_CompanySpecialMeeting instance); + partial void UpdateMeeting_CompanySpecialMeeting(Meeting_CompanySpecialMeeting instance); + partial void DeleteMeeting_CompanySpecialMeeting(Meeting_CompanySpecialMeeting instance); partial void InsertMeeting_CQMSMeeting(Meeting_CQMSMeeting instance); partial void UpdateMeeting_CQMSMeeting(Meeting_CQMSMeeting instance); partial void DeleteMeeting_CQMSMeeting(Meeting_CQMSMeeting instance); @@ -788,6 +836,9 @@ namespace Model partial void InsertMeeting_MonthMeeting(Meeting_MonthMeeting instance); partial void UpdateMeeting_MonthMeeting(Meeting_MonthMeeting instance); partial void DeleteMeeting_MonthMeeting(Meeting_MonthMeeting instance); + partial void InsertMeeting_SafetyLeaderGroupMeeting(Meeting_SafetyLeaderGroupMeeting instance); + partial void UpdateMeeting_SafetyLeaderGroupMeeting(Meeting_SafetyLeaderGroupMeeting instance); + partial void DeleteMeeting_SafetyLeaderGroupMeeting(Meeting_SafetyLeaderGroupMeeting instance); partial void InsertMeeting_SpecialMeeting(Meeting_SpecialMeeting instance); partial void UpdateMeeting_SpecialMeeting(Meeting_SpecialMeeting instance); partial void DeleteMeeting_SpecialMeeting(Meeting_SpecialMeeting instance); @@ -1265,6 +1316,12 @@ namespace Model partial void InsertSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void UpdateSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void DeleteSolution_SolutionTemplate(Solution_SolutionTemplate instance); + partial void InsertSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); + partial void UpdateSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); + partial void DeleteSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); + partial void InsertSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); + partial void UpdateSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); + partial void DeleteSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); partial void InsertSYHSEData_Data(SYHSEData_Data instance); partial void UpdateSYHSEData_Data(SYHSEData_Data instance); partial void DeleteSYHSEData_Data(SYHSEData_Data instance); @@ -1985,6 +2042,14 @@ namespace Model } } + public System.Data.Linq.Table Base_RiskLevel + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_RulesRegulationsType { get @@ -2321,6 +2386,14 @@ namespace Model } } + public System.Data.Linq.Table Check_ProjectLeaderCheck + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Check_PunishNotice { get @@ -2417,6 +2490,54 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DesignDetails + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Comprehensive_DesignDetailsApprove + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Comprehensive_InspectionMachine + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Comprehensive_InspectionMachineApprove + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Comprehensive_InspectionPerson + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Comprehensive_InspectionPersonApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table CostGoods_CostManage { get @@ -2561,6 +2682,14 @@ namespace Model } } + public System.Data.Linq.Table Emergency_DrillRecordList_Unit + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Emergency_EmergencyList { get @@ -2569,6 +2698,14 @@ namespace Model } } + public System.Data.Linq.Table Emergency_EmergencyList_Unit + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Emergency_EmergencyProcess { get @@ -2609,6 +2746,38 @@ namespace Model } } + public System.Data.Linq.Table Environmental_ArchitectureReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Environmental_ArchitectureReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Environmental_ChemicalReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Environmental_ChemicalReportItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Environmental_EIAReport { get @@ -3545,6 +3714,22 @@ namespace Model } } + public System.Data.Linq.Table Meeting_CompanySafetyMeeting + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Meeting_CompanySpecialMeeting + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Meeting_CQMSMeeting { get @@ -3569,6 +3754,14 @@ namespace Model } } + public System.Data.Linq.Table Meeting_SafetyLeaderGroupMeeting + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Meeting_SpecialMeeting { get @@ -4849,6 +5042,22 @@ namespace Model } } + public System.Data.Linq.Table Supervise_SuperviseCheckReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Supervise_SuperviseCheckReportItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table SYHSEData_Data { get @@ -7474,6 +7683,8 @@ namespace Model private System.Nullable _NotConfirmed; + private string _AccidentDegree; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -7544,6 +7755,8 @@ namespace Model partial void OnNotConfirmEconomicOtherLossChanged(); partial void OnNotConfirmedChanging(System.Nullable value); partial void OnNotConfirmedChanged(); + partial void OnAccidentDegreeChanging(string value); + partial void OnAccidentDegreeChanged(); #endregion public Accident_AccidentReport() @@ -8151,6 +8364,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentDegree", DbType="Char(1)")] + public string AccidentDegree + { + get + { + return this._AccidentDegree; + } + set + { + if ((this._AccidentDegree != value)) + { + this.OnAccidentDegreeChanging(value); + this.SendPropertyChanging(); + this._AccidentDegree = value; + this.SendPropertyChanged("AccidentDegree"); + this.OnAccidentDegreeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -11880,7 +12113,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(100)")] public string ToKeyId { get @@ -11960,7 +12193,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachPath", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachPath", DbType="NVarChar(100)")] public string AttachPath { get @@ -12387,6 +12620,8 @@ namespace Model private System.Nullable _SortIndex; + private EntitySet _Comprehensive_InspectionMachine; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -12403,6 +12638,7 @@ namespace Model public Base_CNProfessional() { + this._Comprehensive_InspectionMachine = new EntitySet(new Action(this.attach_Comprehensive_InspectionMachine), new Action(this.detach_Comprehensive_InspectionMachine)); OnCreated(); } @@ -12486,6 +12722,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Comprehensive_InspectionMachine", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_InspectionMachine + { + get + { + return this._Comprehensive_InspectionMachine; + } + set + { + this._Comprehensive_InspectionMachine.Assign(value); + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -12505,6 +12754,18 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } + + private void attach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = this; + } + + private void detach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = null; + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_CompanyModel")] @@ -19694,6 +19955,8 @@ namespace Model private EntitySet _Check_PauseNotice; + private EntitySet _Check_ProjectLeaderCheck; + private EntitySet _Check_PunishNotice; private EntitySet _Check_RectifyNotices; @@ -19704,6 +19967,12 @@ namespace Model private EntitySet _InformationProject_ConstructionStandardIdentify; + private EntitySet _Comprehensive_DesignDetails; + + private EntitySet _Comprehensive_InspectionMachine; + + private EntitySet _Comprehensive_InspectionPerson; + private EntitySet _CostGoods_CostManage; private EntitySet _CostGoods_CostSmallDetail; @@ -19902,6 +20171,8 @@ namespace Model private EntitySet _Solution_SolutionTemplate; + private EntitySet _Supervise_SuperviseCheckReport; + private EntitySet _Sys_CodeRecords; private EntitySet _Sys_FlowOperate; @@ -20034,11 +20305,15 @@ namespace Model this._Check_JointCheck = new EntitySet(new Action(this.attach_Check_JointCheck), new Action(this.detach_Check_JointCheck)); this._Check_MaterialAcceptance = new EntitySet(new Action(this.attach_Check_MaterialAcceptance), new Action(this.detach_Check_MaterialAcceptance)); this._Check_PauseNotice = new EntitySet(new Action(this.attach_Check_PauseNotice), new Action(this.detach_Check_PauseNotice)); + this._Check_ProjectLeaderCheck = new EntitySet(new Action(this.attach_Check_ProjectLeaderCheck), new Action(this.detach_Check_ProjectLeaderCheck)); this._Check_PunishNotice = new EntitySet(new Action(this.attach_Check_PunishNotice), new Action(this.detach_Check_PunishNotice)); this._Check_RectifyNotices = new EntitySet(new Action(this.attach_Check_RectifyNotices), new Action(this.detach_Check_RectifyNotices)); this._Check_SpotCheck = new EntitySet(new Action(this.attach_Check_SpotCheck), new Action(this.detach_Check_SpotCheck)); this._Check_TechnicalContactList = new EntitySet(new Action(this.attach_Check_TechnicalContactList), new Action(this.detach_Check_TechnicalContactList)); this._InformationProject_ConstructionStandardIdentify = new EntitySet(new Action(this.attach_InformationProject_ConstructionStandardIdentify), new Action(this.detach_InformationProject_ConstructionStandardIdentify)); + this._Comprehensive_DesignDetails = new EntitySet(new Action(this.attach_Comprehensive_DesignDetails), new Action(this.detach_Comprehensive_DesignDetails)); + this._Comprehensive_InspectionMachine = new EntitySet(new Action(this.attach_Comprehensive_InspectionMachine), new Action(this.detach_Comprehensive_InspectionMachine)); + this._Comprehensive_InspectionPerson = new EntitySet(new Action(this.attach_Comprehensive_InspectionPerson), new Action(this.detach_Comprehensive_InspectionPerson)); this._CostGoods_CostManage = new EntitySet(new Action(this.attach_CostGoods_CostManage), new Action(this.detach_CostGoods_CostManage)); this._CostGoods_CostSmallDetail = new EntitySet(new Action(this.attach_CostGoods_CostSmallDetail), new Action(this.detach_CostGoods_CostSmallDetail)); this._CostGoods_Expense = new EntitySet(new Action(this.attach_CostGoods_Expense), new Action(this.detach_CostGoods_Expense)); @@ -20138,6 +20413,7 @@ namespace Model this._Solution_LargerHazardList = new EntitySet(new Action(this.attach_Solution_LargerHazardList), new Action(this.detach_Solution_LargerHazardList)); this._Solution_LargerHazard = new EntitySet(new Action(this.attach_Solution_LargerHazard), new Action(this.detach_Solution_LargerHazard)); this._Solution_SolutionTemplate = new EntitySet(new Action(this.attach_Solution_SolutionTemplate), new Action(this.detach_Solution_SolutionTemplate)); + this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); this._Sys_Log = new EntitySet(new Action(this.attach_Sys_Log), new Action(this.detach_Sys_Log)); @@ -21135,6 +21411,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ProjectLeaderCheck_Base_Project", Storage="_Check_ProjectLeaderCheck", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Check_ProjectLeaderCheck + { + get + { + return this._Check_ProjectLeaderCheck; + } + set + { + this._Check_ProjectLeaderCheck.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_PunishNotice_Base_Project", Storage="_Check_PunishNotice", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Check_PunishNotice { @@ -21200,6 +21489,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDetails_Base_Project", Storage="_Comprehensive_DesignDetails", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_DesignDetails + { + get + { + return this._Comprehensive_DesignDetails; + } + set + { + this._Comprehensive_DesignDetails.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionMachine_Base_Project", Storage="_Comprehensive_InspectionMachine", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_InspectionMachine + { + get + { + return this._Comprehensive_InspectionMachine; + } + set + { + this._Comprehensive_InspectionMachine.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionPerson_Base_Project", Storage="_Comprehensive_InspectionPerson", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_InspectionPerson + { + get + { + return this._Comprehensive_InspectionPerson; + } + set + { + this._Comprehensive_InspectionPerson.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CostGoods_CostManage_Base_Project", Storage="_CostGoods_CostManage", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet CostGoods_CostManage { @@ -22487,6 +22815,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Project", Storage="_Supervise_SuperviseCheckReport", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckReport + { + get + { + return this._Supervise_SuperviseCheckReport; + } + set + { + this._Supervise_SuperviseCheckReport.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_CodeRecords_Base_Project", Storage="_Sys_CodeRecords", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Sys_CodeRecords { @@ -23079,6 +23420,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Check_ProjectLeaderCheck(Check_ProjectLeaderCheck entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Check_ProjectLeaderCheck(Check_ProjectLeaderCheck entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Check_PunishNotice(Check_PunishNotice entity) { this.SendPropertyChanging(); @@ -23139,6 +23492,42 @@ namespace Model entity.Base_Project = null; } + private void attach_Comprehensive_DesignDetails(Comprehensive_DesignDetails entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_DesignDetails(Comprehensive_DesignDetails entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_Comprehensive_InspectionPerson(Comprehensive_InspectionPerson entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_InspectionPerson(Comprehensive_InspectionPerson entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_CostGoods_CostManage(CostGoods_CostManage entity) { this.SendPropertyChanging(); @@ -24327,6 +24716,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Sys_CodeRecords(Sys_CodeRecords entity) { this.SendPropertyChanging(); @@ -25688,6 +26089,236 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_RiskLevel")] + public partial class Base_RiskLevel : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _RiskLevelId; + + private System.Nullable _RiskLevel; + + private string _RiskLevelName; + + private System.Nullable _MinValue; + + private System.Nullable _MaxValue; + + private string _ControlMeasures; + + private System.Nullable _Days; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnRiskLevelIdChanging(string value); + partial void OnRiskLevelIdChanged(); + partial void OnRiskLevelChanging(System.Nullable value); + partial void OnRiskLevelChanged(); + partial void OnRiskLevelNameChanging(string value); + partial void OnRiskLevelNameChanged(); + partial void OnMinValueChanging(System.Nullable value); + partial void OnMinValueChanged(); + partial void OnMaxValueChanging(System.Nullable value); + partial void OnMaxValueChanged(); + partial void OnControlMeasuresChanging(string value); + partial void OnControlMeasuresChanged(); + partial void OnDaysChanging(System.Nullable value); + partial void OnDaysChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_RiskLevel() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevelId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string RiskLevelId + { + get + { + return this._RiskLevelId; + } + set + { + if ((this._RiskLevelId != value)) + { + this.OnRiskLevelIdChanging(value); + this.SendPropertyChanging(); + this._RiskLevelId = value; + this.SendPropertyChanged("RiskLevelId"); + this.OnRiskLevelIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevel", DbType="Int")] + public System.Nullable RiskLevel + { + get + { + return this._RiskLevel; + } + set + { + if ((this._RiskLevel != value)) + { + this.OnRiskLevelChanging(value); + this.SendPropertyChanging(); + this._RiskLevel = value; + this.SendPropertyChanged("RiskLevel"); + this.OnRiskLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevelName", DbType="NVarChar(50)")] + public string RiskLevelName + { + get + { + return this._RiskLevelName; + } + set + { + if ((this._RiskLevelName != value)) + { + this.OnRiskLevelNameChanging(value); + this.SendPropertyChanging(); + this._RiskLevelName = value; + this.SendPropertyChanged("RiskLevelName"); + this.OnRiskLevelNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinValue", DbType="Int")] + public System.Nullable MinValue + { + get + { + return this._MinValue; + } + set + { + if ((this._MinValue != value)) + { + this.OnMinValueChanging(value); + this.SendPropertyChanging(); + this._MinValue = value; + this.SendPropertyChanged("MinValue"); + this.OnMinValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaxValue", DbType="Int")] + public System.Nullable MaxValue + { + get + { + return this._MaxValue; + } + set + { + if ((this._MaxValue != value)) + { + this.OnMaxValueChanging(value); + this.SendPropertyChanging(); + this._MaxValue = value; + this.SendPropertyChanged("MaxValue"); + this.OnMaxValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ControlMeasures", DbType="NVarChar(500)")] + public string ControlMeasures + { + get + { + return this._ControlMeasures; + } + set + { + if ((this._ControlMeasures != value)) + { + this.OnControlMeasuresChanging(value); + this.SendPropertyChanging(); + this._ControlMeasures = value; + this.SendPropertyChanged("ControlMeasures"); + this.OnControlMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Days", DbType="Int")] + public System.Nullable Days + { + get + { + return this._Days; + } + set + { + if ((this._Days != value)) + { + this.OnDaysChanging(value); + this.SendPropertyChanging(); + this._Days = value; + this.SendPropertyChanged("Days"); + this.OnDaysChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(100)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_RulesRegulationsType")] public partial class Base_RulesRegulationsType : INotifyPropertyChanging, INotifyPropertyChanged { @@ -27285,6 +27916,8 @@ namespace Model private System.Nullable _IsRepeat; + private string _TrainType; + private EntitySet _Base_TrainTypeItem; private EntitySet _EduTrain_TrainRecord; @@ -27309,6 +27942,8 @@ namespace Model partial void OnIsAboutSendCardChanged(); partial void OnIsRepeatChanging(System.Nullable value); partial void OnIsRepeatChanged(); + partial void OnTrainTypeChanging(string value); + partial void OnTrainTypeChanged(); #endregion public Base_TrainType() @@ -27440,6 +28075,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainType", DbType="Char(1)")] + public string TrainType + { + get + { + return this._TrainType; + } + set + { + if ((this._TrainType != value)) + { + this.OnTrainTypeChanging(value); + this.SendPropertyChanging(); + this._TrainType = value; + this.SendPropertyChanged("TrainType"); + this.OnTrainTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_TrainTypeItem_Base_TrainType", Storage="_Base_TrainTypeItem", ThisKey="TrainTypeId", OtherKey="TrainTypeId", DeleteRule="NO ACTION")] public EntitySet Base_TrainTypeItem { @@ -27921,6 +28576,10 @@ namespace Model private EntitySet _Check_TechnicalContactList; + private EntitySet _Comprehensive_InspectionMachine; + + private EntitySet _Comprehensive_InspectionPerson; + private EntitySet _CostGoods_CostManage; private EntitySet _CostGoods_CostSmallDetail; @@ -27933,6 +28592,10 @@ namespace Model private EntitySet _Emergency_EmergencyTeamAndTrain; + private EntitySet _Environmental_ArchitectureReport; + + private EntitySet _Environmental_ChemicalReport; + private EntitySet _HJGL_Hard_Trust; private EntitySet _HJGL_Batch_BatchTrust; @@ -28063,6 +28726,8 @@ namespace Model private EntitySet _Solution_LargerHazardListItem; + private EntitySet _Supervise_SuperviseCheckReport; + private EntitySet _Technical_TechnicalDisclose; private EntitySet _Technique_SpecialScheme; @@ -28154,12 +28819,16 @@ namespace Model this._Check_PunishNotice = new EntitySet(new Action(this.attach_Check_PunishNotice), new Action(this.detach_Check_PunishNotice)); this._Check_RectifyNotices = new EntitySet(new Action(this.attach_Check_RectifyNotices), new Action(this.detach_Check_RectifyNotices)); this._Check_TechnicalContactList = new EntitySet(new Action(this.attach_Check_TechnicalContactList), new Action(this.detach_Check_TechnicalContactList)); + this._Comprehensive_InspectionMachine = new EntitySet(new Action(this.attach_Comprehensive_InspectionMachine), new Action(this.detach_Comprehensive_InspectionMachine)); + this._Comprehensive_InspectionPerson = new EntitySet(new Action(this.attach_Comprehensive_InspectionPerson), new Action(this.detach_Comprehensive_InspectionPerson)); this._CostGoods_CostManage = new EntitySet(new Action(this.attach_CostGoods_CostManage), new Action(this.detach_CostGoods_CostManage)); this._CostGoods_CostSmallDetail = new EntitySet(new Action(this.attach_CostGoods_CostSmallDetail), new Action(this.detach_CostGoods_CostSmallDetail)); this._CostGoods_Expense = new EntitySet(new Action(this.attach_CostGoods_Expense), new Action(this.detach_CostGoods_Expense)); this._Emergency_EmergencyList = new EntitySet(new Action(this.attach_Emergency_EmergencyList), new Action(this.detach_Emergency_EmergencyList)); this._Emergency_EmergencySupply = new EntitySet(new Action(this.attach_Emergency_EmergencySupply), new Action(this.detach_Emergency_EmergencySupply)); this._Emergency_EmergencyTeamAndTrain = new EntitySet(new Action(this.attach_Emergency_EmergencyTeamAndTrain), new Action(this.detach_Emergency_EmergencyTeamAndTrain)); + this._Environmental_ArchitectureReport = new EntitySet(new Action(this.attach_Environmental_ArchitectureReport), new Action(this.detach_Environmental_ArchitectureReport)); + this._Environmental_ChemicalReport = new EntitySet(new Action(this.attach_Environmental_ChemicalReport), new Action(this.detach_Environmental_ChemicalReport)); this._HJGL_Hard_Trust = new EntitySet(new Action(this.attach_HJGL_Hard_Trust), new Action(this.detach_HJGL_Hard_Trust)); this._HJGL_Batch_BatchTrust = new EntitySet(new Action(this.attach_HJGL_Batch_BatchTrust), new Action(this.detach_HJGL_Batch_BatchTrust)); this._HJGL_Hard_Trust_Base_Unit = new EntitySet(new Action(this.attach_HJGL_Hard_Trust_Base_Unit), new Action(this.detach_HJGL_Hard_Trust_Base_Unit)); @@ -28225,6 +28894,7 @@ namespace Model this._Solution_ConstructSolution = new EntitySet(new Action(this.attach_Solution_ConstructSolution), new Action(this.detach_Solution_ConstructSolution)); this._Solution_CQMSConstructSolution = new EntitySet(new Action(this.attach_Solution_CQMSConstructSolution), new Action(this.detach_Solution_CQMSConstructSolution)); this._Solution_LargerHazardListItem = new EntitySet(new Action(this.attach_Solution_LargerHazardListItem), new Action(this.detach_Solution_LargerHazardListItem)); + this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); this._Technical_TechnicalDisclose = new EntitySet(new Action(this.attach_Technical_TechnicalDisclose), new Action(this.detach_Technical_TechnicalDisclose)); this._Technique_SpecialScheme = new EntitySet(new Action(this.attach_Technique_SpecialScheme), new Action(this.detach_Technique_SpecialScheme)); this._Test_TestRecord = new EntitySet(new Action(this.attach_Test_TestRecord), new Action(this.detach_Test_TestRecord)); @@ -28988,6 +29658,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionMachine_Base_Unit", Storage="_Comprehensive_InspectionMachine", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_InspectionMachine + { + get + { + return this._Comprehensive_InspectionMachine; + } + set + { + this._Comprehensive_InspectionMachine.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionPerson_Base_Unit", Storage="_Comprehensive_InspectionPerson", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_InspectionPerson + { + get + { + return this._Comprehensive_InspectionPerson; + } + set + { + this._Comprehensive_InspectionPerson.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CostGoods_CostManage_Base_Unit", Storage="_CostGoods_CostManage", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet CostGoods_CostManage { @@ -29066,6 +29762,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReport_Base_Unit", Storage="_Environmental_ArchitectureReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Environmental_ArchitectureReport + { + get + { + return this._Environmental_ArchitectureReport; + } + set + { + this._Environmental_ArchitectureReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ChemicalReport_Base_Unit", Storage="_Environmental_ChemicalReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Environmental_ChemicalReport + { + get + { + return this._Environmental_ChemicalReport; + } + set + { + this._Environmental_ChemicalReport.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Hard_Trust_Base_Unit", Storage="_HJGL_Hard_Trust", ThisKey="UnitId", OtherKey="CheckUnit", DeleteRule="NO ACTION")] public EntitySet HJGL_Hard_Trust { @@ -29911,6 +30633,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Unit", Storage="_Supervise_SuperviseCheckReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckReport + { + get + { + return this._Supervise_SuperviseCheckReport; + } + set + { + this._Supervise_SuperviseCheckReport.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technical_TechnicalDisclose_Base_Unit", Storage="_Technical_TechnicalDisclose", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Technical_TechnicalDisclose { @@ -30274,6 +31009,30 @@ namespace Model entity.Base_Unit = null; } + private void attach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Comprehensive_InspectionMachine(Comprehensive_InspectionMachine entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Comprehensive_InspectionPerson(Comprehensive_InspectionPerson entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Comprehensive_InspectionPerson(Comprehensive_InspectionPerson entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_CostGoods_CostManage(CostGoods_CostManage entity) { this.SendPropertyChanging(); @@ -30346,6 +31105,30 @@ namespace Model entity.Base_Unit = null; } + private void attach_Environmental_ArchitectureReport(Environmental_ArchitectureReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Environmental_ArchitectureReport(Environmental_ArchitectureReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Environmental_ChemicalReport(Environmental_ChemicalReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Environmental_ChemicalReport(Environmental_ChemicalReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_HJGL_Hard_Trust(HJGL_Hard_Trust entity) { this.SendPropertyChanging(); @@ -31126,6 +31909,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Technical_TechnicalDisclose(Technical_TechnicalDisclose entity) { this.SendPropertyChanging(); @@ -31957,6 +32752,8 @@ namespace Model private System.Nullable _IsTotal; + private System.Nullable _IsCQMS; + private EntitySet _HSSESystem_HSSEMainDuty; private EntitySet _Person_Persons; @@ -31999,6 +32796,8 @@ namespace Model partial void OnIsDutyChanged(); partial void OnIsTotalChanging(System.Nullable value); partial void OnIsTotalChanged(); + partial void OnIsCQMSChanging(System.Nullable value); + partial void OnIsCQMSChanged(); #endregion public Base_WorkPost() @@ -32215,6 +33014,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCQMS", DbType="Bit")] + public System.Nullable IsCQMS + { + get + { + return this._IsCQMS; + } + set + { + if ((this._IsCQMS != value)) + { + this.OnIsCQMSChanging(value); + this.SendPropertyChanging(); + this._IsCQMS = value; + this.SendPropertyChanged("IsCQMS"); + this.OnIsCQMSChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSESystem_HSSEMainDuty_Base_WorkPost", Storage="_HSSESystem_HSSEMainDuty", ThisKey="WorkPostId", OtherKey="WorkPostId", DeleteRule="NO ACTION")] public EntitySet HSSESystem_HSSEMainDuty { @@ -45318,6 +46137,373 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Check_ProjectLeaderCheck")] + public partial class Check_ProjectLeaderCheck : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ProjectLeaderCheckId; + + private string _ProjectId; + + private string _UnitIds; + + private string _CheckCode; + + private string _LeaderIds; + + private System.Nullable _CheckDate; + + private string _QuestionDef; + + private System.Nullable _IsHoldMeet; + + private string _Requirement; + + private string _LeaderNames; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnProjectLeaderCheckIdChanging(string value); + partial void OnProjectLeaderCheckIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdsChanging(string value); + partial void OnUnitIdsChanged(); + partial void OnCheckCodeChanging(string value); + partial void OnCheckCodeChanged(); + partial void OnLeaderIdsChanging(string value); + partial void OnLeaderIdsChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnQuestionDefChanging(string value); + partial void OnQuestionDefChanged(); + partial void OnIsHoldMeetChanging(System.Nullable value); + partial void OnIsHoldMeetChanged(); + partial void OnRequirementChanging(string value); + partial void OnRequirementChanged(); + partial void OnLeaderNamesChanging(string value); + partial void OnLeaderNamesChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Check_ProjectLeaderCheck() + { + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectLeaderCheckId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ProjectLeaderCheckId + { + get + { + return this._ProjectLeaderCheckId; + } + set + { + if ((this._ProjectLeaderCheckId != value)) + { + this.OnProjectLeaderCheckIdChanging(value); + this.SendPropertyChanging(); + this._ProjectLeaderCheckId = value; + this.SendPropertyChanged("ProjectLeaderCheckId"); + this.OnProjectLeaderCheckIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitIds", DbType="NVarChar(500)")] + public string UnitIds + { + get + { + return this._UnitIds; + } + set + { + if ((this._UnitIds != value)) + { + this.OnUnitIdsChanging(value); + this.SendPropertyChanging(); + this._UnitIds = value; + this.SendPropertyChanged("UnitIds"); + this.OnUnitIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckCode", DbType="NVarChar(50)")] + public string CheckCode + { + get + { + return this._CheckCode; + } + set + { + if ((this._CheckCode != value)) + { + this.OnCheckCodeChanging(value); + this.SendPropertyChanging(); + this._CheckCode = value; + this.SendPropertyChanged("CheckCode"); + this.OnCheckCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LeaderIds", DbType="NVarChar(500)")] + public string LeaderIds + { + get + { + return this._LeaderIds; + } + set + { + if ((this._LeaderIds != value)) + { + this.OnLeaderIdsChanging(value); + this.SendPropertyChanging(); + this._LeaderIds = value; + this.SendPropertyChanged("LeaderIds"); + this.OnLeaderIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionDef", DbType="NVarChar(2000)")] + public string QuestionDef + { + get + { + return this._QuestionDef; + } + set + { + if ((this._QuestionDef != value)) + { + this.OnQuestionDefChanging(value); + this.SendPropertyChanging(); + this._QuestionDef = value; + this.SendPropertyChanged("QuestionDef"); + this.OnQuestionDefChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsHoldMeet", DbType="Bit")] + public System.Nullable IsHoldMeet + { + get + { + return this._IsHoldMeet; + } + set + { + if ((this._IsHoldMeet != value)) + { + this.OnIsHoldMeetChanging(value); + this.SendPropertyChanging(); + this._IsHoldMeet = value; + this.SendPropertyChanged("IsHoldMeet"); + this.OnIsHoldMeetChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirement", DbType="NVarChar(2000)")] + public string Requirement + { + get + { + return this._Requirement; + } + set + { + if ((this._Requirement != value)) + { + this.OnRequirementChanging(value); + this.SendPropertyChanging(); + this._Requirement = value; + this.SendPropertyChanged("Requirement"); + this.OnRequirementChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LeaderNames", DbType="NVarChar(500)")] + public string LeaderNames + { + get + { + return this._LeaderNames; + } + set + { + if ((this._LeaderNames != value)) + { + this.OnLeaderNamesChanging(value); + this.SendPropertyChanging(); + this._LeaderNames = value; + this.SendPropertyChanged("LeaderNames"); + this.OnLeaderNamesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ProjectLeaderCheck_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Check_ProjectLeaderCheck.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Check_ProjectLeaderCheck.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Check_PunishNotice")] public partial class Check_PunishNotice : INotifyPropertyChanging, INotifyPropertyChanged { @@ -51622,6 +52808,2472 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DesignDetails")] + public partial class Comprehensive_DesignDetails : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DesignDetailsId; + + private string _ProjectId; + + private string _CNProfessionalId; + + private string _DesignDetailsCode; + + private string _DetailsMan; + + private System.Nullable _DetailsDate; + + private string _UnitWorkId; + + private string _UnitName; + + private string _AttachUrl; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AuditMan; + + private string _Status; + + private System.Nullable _JoinPersonNum; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDesignDetailsIdChanging(string value); + partial void OnDesignDetailsIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnDesignDetailsCodeChanging(string value); + partial void OnDesignDetailsCodeChanged(); + partial void OnDetailsManChanging(string value); + partial void OnDetailsManChanged(); + partial void OnDetailsDateChanging(System.Nullable value); + partial void OnDetailsDateChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnJoinPersonNumChanging(System.Nullable value); + partial void OnJoinPersonNumChanged(); + #endregion + + public Comprehensive_DesignDetails() + { + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DesignDetailsId + { + get + { + return this._DesignDetailsId; + } + set + { + if ((this._DesignDetailsId != value)) + { + this.OnDesignDetailsIdChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsId = value; + this.SendPropertyChanged("DesignDetailsId"); + this.OnDesignDetailsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DesignDetailsCode + { + get + { + return this._DesignDetailsCode; + } + set + { + if ((this._DesignDetailsCode != value)) + { + this.OnDesignDetailsCodeChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsCode = value; + this.SendPropertyChanged("DesignDetailsCode"); + this.OnDesignDetailsCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetailsMan", DbType="NVarChar(20)")] + public string DetailsMan + { + get + { + return this._DetailsMan; + } + set + { + if ((this._DetailsMan != value)) + { + this.OnDetailsManChanging(value); + this.SendPropertyChanging(); + this._DetailsMan = value; + this.SendPropertyChanged("DetailsMan"); + this.OnDetailsManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetailsDate", DbType="DateTime")] + public System.Nullable DetailsDate + { + get + { + return this._DetailsDate; + } + set + { + if ((this._DetailsDate != value)) + { + this.OnDetailsDateChanging(value); + this.SendPropertyChanging(); + this._DetailsDate = value; + this.SendPropertyChanged("DetailsDate"); + this.OnDetailsDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(500)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(500)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JoinPersonNum", DbType="Int")] + public System.Nullable JoinPersonNum + { + get + { + return this._JoinPersonNum; + } + set + { + if ((this._JoinPersonNum != value)) + { + this.OnJoinPersonNumChanging(value); + this.SendPropertyChanging(); + this._JoinPersonNum = value; + this.SendPropertyChanged("JoinPersonNum"); + this.OnJoinPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDetails_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Comprehensive_DesignDetails.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_DesignDetails.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DesignDetailsApprove")] + public partial class Comprehensive_DesignDetailsApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DesignDetailsApproveId; + + private string _DesignDetailsId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDesignDetailsApproveIdChanging(string value); + partial void OnDesignDetailsApproveIdChanged(); + partial void OnDesignDetailsIdChanging(string value); + partial void OnDesignDetailsIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DesignDetailsApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DesignDetailsApproveId + { + get + { + return this._DesignDetailsApproveId; + } + set + { + if ((this._DesignDetailsApproveId != value)) + { + this.OnDesignDetailsApproveIdChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsApproveId = value; + this.SendPropertyChanged("DesignDetailsApproveId"); + this.OnDesignDetailsApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsId", DbType="NVarChar(50)")] + public string DesignDetailsId + { + get + { + return this._DesignDetailsId; + } + set + { + if ((this._DesignDetailsId != value)) + { + this.OnDesignDetailsIdChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsId = value; + this.SendPropertyChanged("DesignDetailsId"); + this.OnDesignDetailsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionMachine")] + public partial class Comprehensive_InspectionMachine : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionMachineId; + + private string _ProjectId; + + private string _UnitId; + + private string _InspectionMachineCode; + + private string _InspectionMachineName; + + private string _SpecificationModel; + + private System.Nullable _NextTestDate; + + private string _TestCycle; + + private System.Nullable _IsVerification; + + private System.Nullable _InspectionDate; + + private string _AttachUrl; + + private string _CNProfessionalId; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private System.Nullable _IsOnSite; + + private string _InspectionType; + + private System.Nullable _LeaveDate; + + private System.Nullable _UnitsCount; + + private string _AuditMan; + + private string _Status; + + private System.Nullable _IsCheckOK; + + private EntityRef _Base_CNProfessional; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionMachineIdChanging(string value); + partial void OnInspectionMachineIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnInspectionMachineCodeChanging(string value); + partial void OnInspectionMachineCodeChanged(); + partial void OnInspectionMachineNameChanging(string value); + partial void OnInspectionMachineNameChanged(); + partial void OnSpecificationModelChanging(string value); + partial void OnSpecificationModelChanged(); + partial void OnNextTestDateChanging(System.Nullable value); + partial void OnNextTestDateChanged(); + partial void OnTestCycleChanging(string value); + partial void OnTestCycleChanged(); + partial void OnIsVerificationChanging(System.Nullable value); + partial void OnIsVerificationChanged(); + partial void OnInspectionDateChanging(System.Nullable value); + partial void OnInspectionDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnIsOnSiteChanging(System.Nullable value); + partial void OnIsOnSiteChanged(); + partial void OnInspectionTypeChanging(string value); + partial void OnInspectionTypeChanged(); + partial void OnLeaveDateChanging(System.Nullable value); + partial void OnLeaveDateChanged(); + partial void OnUnitsCountChanging(System.Nullable value); + partial void OnUnitsCountChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnIsCheckOKChanging(System.Nullable value); + partial void OnIsCheckOKChanged(); + #endregion + + public Comprehensive_InspectionMachine() + { + this._Base_CNProfessional = default(EntityRef); + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionMachineId + { + get + { + return this._InspectionMachineId; + } + set + { + if ((this._InspectionMachineId != value)) + { + this.OnInspectionMachineIdChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineId = value; + this.SendPropertyChanged("InspectionMachineId"); + this.OnInspectionMachineIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string InspectionMachineCode + { + get + { + return this._InspectionMachineCode; + } + set + { + if ((this._InspectionMachineCode != value)) + { + this.OnInspectionMachineCodeChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineCode = value; + this.SendPropertyChanged("InspectionMachineCode"); + this.OnInspectionMachineCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineName", DbType="NVarChar(50)")] + public string InspectionMachineName + { + get + { + return this._InspectionMachineName; + } + set + { + if ((this._InspectionMachineName != value)) + { + this.OnInspectionMachineNameChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineName = value; + this.SendPropertyChanged("InspectionMachineName"); + this.OnInspectionMachineNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationModel", DbType="NVarChar(50)")] + public string SpecificationModel + { + get + { + return this._SpecificationModel; + } + set + { + if ((this._SpecificationModel != value)) + { + this.OnSpecificationModelChanging(value); + this.SendPropertyChanging(); + this._SpecificationModel = value; + this.SendPropertyChanged("SpecificationModel"); + this.OnSpecificationModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextTestDate", DbType="DateTime")] + public System.Nullable NextTestDate + { + get + { + return this._NextTestDate; + } + set + { + if ((this._NextTestDate != value)) + { + this.OnNextTestDateChanging(value); + this.SendPropertyChanging(); + this._NextTestDate = value; + this.SendPropertyChanged("NextTestDate"); + this.OnNextTestDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestCycle", DbType="NVarChar(50)")] + public string TestCycle + { + get + { + return this._TestCycle; + } + set + { + if ((this._TestCycle != value)) + { + this.OnTestCycleChanging(value); + this.SendPropertyChanging(); + this._TestCycle = value; + this.SendPropertyChanged("TestCycle"); + this.OnTestCycleChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsVerification", DbType="Bit")] + public System.Nullable IsVerification + { + get + { + return this._IsVerification; + } + set + { + if ((this._IsVerification != value)) + { + this.OnIsVerificationChanging(value); + this.SendPropertyChanging(); + this._IsVerification = value; + this.SendPropertyChanged("IsVerification"); + this.OnIsVerificationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionDate", DbType="DateTime")] + public System.Nullable InspectionDate + { + get + { + return this._InspectionDate; + } + set + { + if ((this._InspectionDate != value)) + { + this.OnInspectionDateChanging(value); + this.SendPropertyChanging(); + this._InspectionDate = value; + this.SendPropertyChanged("InspectionDate"); + this.OnInspectionDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + if (this._Base_CNProfessional.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsOnSite", DbType="Bit")] + public System.Nullable IsOnSite + { + get + { + return this._IsOnSite; + } + set + { + if ((this._IsOnSite != value)) + { + this.OnIsOnSiteChanging(value); + this.SendPropertyChanging(); + this._IsOnSite = value; + this.SendPropertyChanged("IsOnSite"); + this.OnIsOnSiteChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionType", DbType="NVarChar(20)")] + public string InspectionType + { + get + { + return this._InspectionType; + } + set + { + if ((this._InspectionType != value)) + { + this.OnInspectionTypeChanging(value); + this.SendPropertyChanging(); + this._InspectionType = value; + this.SendPropertyChanged("InspectionType"); + this.OnInspectionTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LeaveDate", DbType="DateTime")] + public System.Nullable LeaveDate + { + get + { + return this._LeaveDate; + } + set + { + if ((this._LeaveDate != value)) + { + this.OnLeaveDateChanging(value); + this.SendPropertyChanging(); + this._LeaveDate = value; + this.SendPropertyChanged("LeaveDate"); + this.OnLeaveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitsCount", DbType="Int")] + public System.Nullable UnitsCount + { + get + { + return this._UnitsCount; + } + set + { + if ((this._UnitsCount != value)) + { + this.OnUnitsCountChanging(value); + this.SendPropertyChanging(); + this._UnitsCount = value; + this.SendPropertyChanged("UnitsCount"); + this.OnUnitsCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCheckOK", DbType="Bit")] + public System.Nullable IsCheckOK + { + get + { + return this._IsCheckOK; + } + set + { + if ((this._IsCheckOK != value)) + { + this.OnIsCheckOKChanging(value); + this.SendPropertyChanging(); + this._IsCheckOK = value; + this.SendPropertyChanged("IsCheckOK"); + this.OnIsCheckOKChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] + public Base_CNProfessional Base_CNProfessional + { + get + { + return this._Base_CNProfessional.Entity; + } + set + { + Base_CNProfessional previousValue = this._Base_CNProfessional.Entity; + if (((previousValue != value) + || (this._Base_CNProfessional.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_CNProfessional.Entity = null; + previousValue.Comprehensive_InspectionMachine.Remove(this); + } + this._Base_CNProfessional.Entity = value; + if ((value != null)) + { + value.Comprehensive_InspectionMachine.Add(this); + this._CNProfessionalId = value.CNProfessionalId; + } + else + { + this._CNProfessionalId = default(string); + } + this.SendPropertyChanged("Base_CNProfessional"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionMachine_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Comprehensive_InspectionMachine.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_InspectionMachine.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionMachine_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Comprehensive_InspectionMachine.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Comprehensive_InspectionMachine.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionMachineApprove")] + public partial class Comprehensive_InspectionMachineApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionMachineApproveId; + + private string _InspectionMachineId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionMachineApproveIdChanging(string value); + partial void OnInspectionMachineApproveIdChanged(); + partial void OnInspectionMachineIdChanging(string value); + partial void OnInspectionMachineIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_InspectionMachineApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionMachineApproveId + { + get + { + return this._InspectionMachineApproveId; + } + set + { + if ((this._InspectionMachineApproveId != value)) + { + this.OnInspectionMachineApproveIdChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineApproveId = value; + this.SendPropertyChanged("InspectionMachineApproveId"); + this.OnInspectionMachineApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineId", DbType="NVarChar(50)")] + public string InspectionMachineId + { + get + { + return this._InspectionMachineId; + } + set + { + if ((this._InspectionMachineId != value)) + { + this.OnInspectionMachineIdChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineId = value; + this.SendPropertyChanged("InspectionMachineId"); + this.OnInspectionMachineIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionPerson")] + public partial class Comprehensive_InspectionPerson : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionPersonId; + + private string _ProjectId; + + private string _UnitId; + + private string _InspectionPersonCode; + + private string _PersonName; + + private string _PostId; + + private string _CertificateNumber; + + private string _QualifiedProjectCode; + + private System.Nullable _ValidityDate; + + private System.Nullable _ApprovalTime; + + private System.Nullable _DepartureTime; + + private string _Remark; + + private string _AttachUrl; + + private string _CNProfessionalId; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private System.Nullable _IsOnSite; + + private string _UnitWorkId; + + private string _AuditMan; + + private string _Status; + + private System.Nullable _IsTrain; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionPersonIdChanging(string value); + partial void OnInspectionPersonIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnInspectionPersonCodeChanging(string value); + partial void OnInspectionPersonCodeChanged(); + partial void OnPersonNameChanging(string value); + partial void OnPersonNameChanged(); + partial void OnPostIdChanging(string value); + partial void OnPostIdChanged(); + partial void OnCertificateNumberChanging(string value); + partial void OnCertificateNumberChanged(); + partial void OnQualifiedProjectCodeChanging(string value); + partial void OnQualifiedProjectCodeChanged(); + partial void OnValidityDateChanging(System.Nullable value); + partial void OnValidityDateChanged(); + partial void OnApprovalTimeChanging(System.Nullable value); + partial void OnApprovalTimeChanged(); + partial void OnDepartureTimeChanging(System.Nullable value); + partial void OnDepartureTimeChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnIsOnSiteChanging(System.Nullable value); + partial void OnIsOnSiteChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnIsTrainChanging(System.Nullable value); + partial void OnIsTrainChanged(); + #endregion + + public Comprehensive_InspectionPerson() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionPersonId + { + get + { + return this._InspectionPersonId; + } + set + { + if ((this._InspectionPersonId != value)) + { + this.OnInspectionPersonIdChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonId = value; + this.SendPropertyChanged("InspectionPersonId"); + this.OnInspectionPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string InspectionPersonCode + { + get + { + return this._InspectionPersonCode; + } + set + { + if ((this._InspectionPersonCode != value)) + { + this.OnInspectionPersonCodeChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonCode = value; + this.SendPropertyChanged("InspectionPersonCode"); + this.OnInspectionPersonCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")] + public string PersonName + { + get + { + return this._PersonName; + } + set + { + if ((this._PersonName != value)) + { + this.OnPersonNameChanging(value); + this.SendPropertyChanging(); + this._PersonName = value; + this.SendPropertyChanged("PersonName"); + this.OnPersonNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostId", DbType="NVarChar(50)")] + public string PostId + { + get + { + return this._PostId; + } + set + { + if ((this._PostId != value)) + { + this.OnPostIdChanging(value); + this.SendPropertyChanging(); + this._PostId = value; + this.SendPropertyChanged("PostId"); + this.OnPostIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CertificateNumber", DbType="NVarChar(50)")] + public string CertificateNumber + { + get + { + return this._CertificateNumber; + } + set + { + if ((this._CertificateNumber != value)) + { + this.OnCertificateNumberChanging(value); + this.SendPropertyChanging(); + this._CertificateNumber = value; + this.SendPropertyChanged("CertificateNumber"); + this.OnCertificateNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(500)")] + public string QualifiedProjectCode + { + get + { + return this._QualifiedProjectCode; + } + set + { + if ((this._QualifiedProjectCode != value)) + { + this.OnQualifiedProjectCodeChanging(value); + this.SendPropertyChanging(); + this._QualifiedProjectCode = value; + this.SendPropertyChanged("QualifiedProjectCode"); + this.OnQualifiedProjectCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidityDate", DbType="DateTime")] + public System.Nullable ValidityDate + { + get + { + return this._ValidityDate; + } + set + { + if ((this._ValidityDate != value)) + { + this.OnValidityDateChanging(value); + this.SendPropertyChanging(); + this._ValidityDate = value; + this.SendPropertyChanged("ValidityDate"); + this.OnValidityDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApprovalTime", DbType="DateTime")] + public System.Nullable ApprovalTime + { + get + { + return this._ApprovalTime; + } + set + { + if ((this._ApprovalTime != value)) + { + this.OnApprovalTimeChanging(value); + this.SendPropertyChanging(); + this._ApprovalTime = value; + this.SendPropertyChanged("ApprovalTime"); + this.OnApprovalTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartureTime", DbType="DateTime")] + public System.Nullable DepartureTime + { + get + { + return this._DepartureTime; + } + set + { + if ((this._DepartureTime != value)) + { + this.OnDepartureTimeChanging(value); + this.SendPropertyChanging(); + this._DepartureTime = value; + this.SendPropertyChanged("DepartureTime"); + this.OnDepartureTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(150)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsOnSite", DbType="Bit")] + public System.Nullable IsOnSite + { + get + { + return this._IsOnSite; + } + set + { + if ((this._IsOnSite != value)) + { + this.OnIsOnSiteChanging(value); + this.SendPropertyChanging(); + this._IsOnSite = value; + this.SendPropertyChanged("IsOnSite"); + this.OnIsOnSiteChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(500)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsTrain", DbType="Bit")] + public System.Nullable IsTrain + { + get + { + return this._IsTrain; + } + set + { + if ((this._IsTrain != value)) + { + this.OnIsTrainChanging(value); + this.SendPropertyChanging(); + this._IsTrain = value; + this.SendPropertyChanged("IsTrain"); + this.OnIsTrainChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionPerson_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Comprehensive_InspectionPerson.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_InspectionPerson.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionPerson_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Comprehensive_InspectionPerson.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Comprehensive_InspectionPerson.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionPersonApprove")] + public partial class Comprehensive_InspectionPersonApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionPersonApproveId; + + private string _InspectionPersonId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionPersonApproveIdChanging(string value); + partial void OnInspectionPersonApproveIdChanged(); + partial void OnInspectionPersonIdChanging(string value); + partial void OnInspectionPersonIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_InspectionPersonApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionPersonApproveId + { + get + { + return this._InspectionPersonApproveId; + } + set + { + if ((this._InspectionPersonApproveId != value)) + { + this.OnInspectionPersonApproveIdChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonApproveId = value; + this.SendPropertyChanged("InspectionPersonApproveId"); + this.OnInspectionPersonApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonId", DbType="NVarChar(50)")] + public string InspectionPersonId + { + get + { + return this._InspectionPersonId; + } + set + { + if ((this._InspectionPersonId != value)) + { + this.OnInspectionPersonIdChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonId = value; + this.SendPropertyChanged("InspectionPersonId"); + this.OnInspectionPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CostGoods_CostManage")] public partial class CostGoods_CostManage : INotifyPropertyChanging, INotifyPropertyChanged { @@ -59593,6 +63245,452 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Emergency_DrillRecordList_Unit")] + public partial class Emergency_DrillRecordList_Unit : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DrillRecordListId; + + private string _ProjectId; + + private string _DrillRecordCode; + + private string _DrillRecordName; + + private string _UnitIds; + + private string _UnitNames; + + private string _UserIds; + + private string _UserNames; + + private System.Nullable _DrillRecordDate; + + private string _DrillRecordContents; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _States; + + private string _AttachUrl; + + private string _DrillRecordType; + + private System.Nullable _JointPersonNum; + + private System.Nullable _DrillCost; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDrillRecordListIdChanging(string value); + partial void OnDrillRecordListIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnDrillRecordCodeChanging(string value); + partial void OnDrillRecordCodeChanged(); + partial void OnDrillRecordNameChanging(string value); + partial void OnDrillRecordNameChanged(); + partial void OnUnitIdsChanging(string value); + partial void OnUnitIdsChanged(); + partial void OnUnitNamesChanging(string value); + partial void OnUnitNamesChanged(); + partial void OnUserIdsChanging(string value); + partial void OnUserIdsChanged(); + partial void OnUserNamesChanging(string value); + partial void OnUserNamesChanged(); + partial void OnDrillRecordDateChanging(System.Nullable value); + partial void OnDrillRecordDateChanged(); + partial void OnDrillRecordContentsChanging(string value); + partial void OnDrillRecordContentsChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnDrillRecordTypeChanging(string value); + partial void OnDrillRecordTypeChanged(); + partial void OnJointPersonNumChanging(System.Nullable value); + partial void OnJointPersonNumChanged(); + partial void OnDrillCostChanging(System.Nullable value); + partial void OnDrillCostChanged(); + #endregion + + public Emergency_DrillRecordList_Unit() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordListId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DrillRecordListId + { + get + { + return this._DrillRecordListId; + } + set + { + if ((this._DrillRecordListId != value)) + { + this.OnDrillRecordListIdChanging(value); + this.SendPropertyChanging(); + this._DrillRecordListId = value; + this.SendPropertyChanged("DrillRecordListId"); + this.OnDrillRecordListIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordCode", DbType="NVarChar(50)")] + public string DrillRecordCode + { + get + { + return this._DrillRecordCode; + } + set + { + if ((this._DrillRecordCode != value)) + { + this.OnDrillRecordCodeChanging(value); + this.SendPropertyChanging(); + this._DrillRecordCode = value; + this.SendPropertyChanged("DrillRecordCode"); + this.OnDrillRecordCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordName", DbType="NVarChar(500)")] + public string DrillRecordName + { + get + { + return this._DrillRecordName; + } + set + { + if ((this._DrillRecordName != value)) + { + this.OnDrillRecordNameChanging(value); + this.SendPropertyChanging(); + this._DrillRecordName = value; + this.SendPropertyChanged("DrillRecordName"); + this.OnDrillRecordNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitIds", DbType="NVarChar(4000)")] + public string UnitIds + { + get + { + return this._UnitIds; + } + set + { + if ((this._UnitIds != value)) + { + this.OnUnitIdsChanging(value); + this.SendPropertyChanging(); + this._UnitIds = value; + this.SendPropertyChanged("UnitIds"); + this.OnUnitIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitNames", DbType="NVarChar(4000)")] + public string UnitNames + { + get + { + return this._UnitNames; + } + set + { + if ((this._UnitNames != value)) + { + this.OnUnitNamesChanging(value); + this.SendPropertyChanging(); + this._UnitNames = value; + this.SendPropertyChanged("UnitNames"); + this.OnUnitNamesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserIds", DbType="NVarChar(4000)")] + public string UserIds + { + get + { + return this._UserIds; + } + set + { + if ((this._UserIds != value)) + { + this.OnUserIdsChanging(value); + this.SendPropertyChanging(); + this._UserIds = value; + this.SendPropertyChanged("UserIds"); + this.OnUserIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserNames", DbType="NVarChar(4000)")] + public string UserNames + { + get + { + return this._UserNames; + } + set + { + if ((this._UserNames != value)) + { + this.OnUserNamesChanging(value); + this.SendPropertyChanging(); + this._UserNames = value; + this.SendPropertyChanged("UserNames"); + this.OnUserNamesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordDate", DbType="DateTime")] + public System.Nullable DrillRecordDate + { + get + { + return this._DrillRecordDate; + } + set + { + if ((this._DrillRecordDate != value)) + { + this.OnDrillRecordDateChanging(value); + this.SendPropertyChanging(); + this._DrillRecordDate = value; + this.SendPropertyChanged("DrillRecordDate"); + this.OnDrillRecordDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordContents", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string DrillRecordContents + { + get + { + return this._DrillRecordContents; + } + set + { + if ((this._DrillRecordContents != value)) + { + this.OnDrillRecordContentsChanging(value); + this.SendPropertyChanging(); + this._DrillRecordContents = value; + this.SendPropertyChanged("DrillRecordContents"); + this.OnDrillRecordContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="Char(1)")] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillRecordType", DbType="Char(1)")] + public string DrillRecordType + { + get + { + return this._DrillRecordType; + } + set + { + if ((this._DrillRecordType != value)) + { + this.OnDrillRecordTypeChanging(value); + this.SendPropertyChanging(); + this._DrillRecordType = value; + this.SendPropertyChanged("DrillRecordType"); + this.OnDrillRecordTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JointPersonNum", DbType="Int")] + public System.Nullable JointPersonNum + { + get + { + return this._JointPersonNum; + } + set + { + if ((this._JointPersonNum != value)) + { + this.OnJointPersonNumChanging(value); + this.SendPropertyChanging(); + this._JointPersonNum = value; + this.SendPropertyChanged("JointPersonNum"); + this.OnJointPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillCost", DbType="Decimal(9,2)")] + public System.Nullable DrillCost + { + get + { + return this._DrillCost; + } + set + { + if ((this._DrillCost != value)) + { + this.OnDrillCostChanging(value); + this.SendPropertyChanging(); + this._DrillCost = value; + this.SendPropertyChanged("DrillCost"); + this.OnDrillCostChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Emergency_EmergencyList")] public partial class Emergency_EmergencyList : INotifyPropertyChanging, INotifyPropertyChanged { @@ -60213,6 +64311,380 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Emergency_EmergencyList_Unit")] + public partial class Emergency_EmergencyList_Unit : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _EmergencyListId; + + private string _ProjectId; + + private string _EmergencyCode; + + private string _EmergencyName; + + private string _UnitId; + + private string _EmergencyTypeId; + + private string _VersionCode; + + private string _EmergencyContents; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _States; + + private string _AttachUrl; + + private string _AuditMan; + + private string _ApproveMan; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnEmergencyListIdChanging(string value); + partial void OnEmergencyListIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnEmergencyCodeChanging(string value); + partial void OnEmergencyCodeChanged(); + partial void OnEmergencyNameChanging(string value); + partial void OnEmergencyNameChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnEmergencyTypeIdChanging(string value); + partial void OnEmergencyTypeIdChanged(); + partial void OnVersionCodeChanging(string value); + partial void OnVersionCodeChanged(); + partial void OnEmergencyContentsChanging(string value); + partial void OnEmergencyContentsChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + #endregion + + public Emergency_EmergencyList_Unit() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmergencyListId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string EmergencyListId + { + get + { + return this._EmergencyListId; + } + set + { + if ((this._EmergencyListId != value)) + { + this.OnEmergencyListIdChanging(value); + this.SendPropertyChanging(); + this._EmergencyListId = value; + this.SendPropertyChanged("EmergencyListId"); + this.OnEmergencyListIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmergencyCode", DbType="NVarChar(50)")] + public string EmergencyCode + { + get + { + return this._EmergencyCode; + } + set + { + if ((this._EmergencyCode != value)) + { + this.OnEmergencyCodeChanging(value); + this.SendPropertyChanging(); + this._EmergencyCode = value; + this.SendPropertyChanged("EmergencyCode"); + this.OnEmergencyCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmergencyName", DbType="NVarChar(500)")] + public string EmergencyName + { + get + { + return this._EmergencyName; + } + set + { + if ((this._EmergencyName != value)) + { + this.OnEmergencyNameChanging(value); + this.SendPropertyChanging(); + this._EmergencyName = value; + this.SendPropertyChanged("EmergencyName"); + this.OnEmergencyNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmergencyTypeId", DbType="NVarChar(50)")] + public string EmergencyTypeId + { + get + { + return this._EmergencyTypeId; + } + set + { + if ((this._EmergencyTypeId != value)) + { + this.OnEmergencyTypeIdChanging(value); + this.SendPropertyChanging(); + this._EmergencyTypeId = value; + this.SendPropertyChanged("EmergencyTypeId"); + this.OnEmergencyTypeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VersionCode", DbType="NVarChar(50)")] + public string VersionCode + { + get + { + return this._VersionCode; + } + set + { + if ((this._VersionCode != value)) + { + this.OnVersionCodeChanging(value); + this.SendPropertyChanging(); + this._VersionCode = value; + this.SendPropertyChanged("VersionCode"); + this.OnVersionCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmergencyContents", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string EmergencyContents + { + get + { + return this._EmergencyContents; + } + set + { + if ((this._EmergencyContents != value)) + { + this.OnEmergencyContentsChanging(value); + this.SendPropertyChanging(); + this._EmergencyContents = value; + this.SendPropertyChanged("EmergencyContents"); + this.OnEmergencyContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="Char(1)")] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Emergency_EmergencyProcess")] public partial class Emergency_EmergencyProcess : INotifyPropertyChanging, INotifyPropertyChanged { @@ -61733,6 +66205,1050 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Environmental_ArchitectureReport")] + public partial class Environmental_ArchitectureReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ArchitectureReportId; + + private string _UnitId; + + private System.Nullable _Year; + + private System.Nullable _Quarters; + + private string _FillingMan; + + private System.Nullable _FillingDate; + + private string _DutyPerson; + + private string _UpState; + + private EntityRef _Base_Unit; + + private EntitySet _Environmental_ArchitectureReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnArchitectureReportIdChanging(string value); + partial void OnArchitectureReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnQuartersChanging(System.Nullable value); + partial void OnQuartersChanged(); + partial void OnFillingManChanging(string value); + partial void OnFillingManChanged(); + partial void OnFillingDateChanging(System.Nullable value); + partial void OnFillingDateChanged(); + partial void OnDutyPersonChanging(string value); + partial void OnDutyPersonChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + #endregion + + public Environmental_ArchitectureReport() + { + this._Base_Unit = default(EntityRef); + this._Environmental_ArchitectureReportItem = new EntitySet(new Action(this.attach_Environmental_ArchitectureReportItem), new Action(this.detach_Environmental_ArchitectureReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchitectureReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ArchitectureReportId + { + get + { + return this._ArchitectureReportId; + } + set + { + if ((this._ArchitectureReportId != value)) + { + this.OnArchitectureReportIdChanging(value); + this.SendPropertyChanging(); + this._ArchitectureReportId = value; + this.SendPropertyChanged("ArchitectureReportId"); + this.OnArchitectureReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")] + public System.Nullable Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this.OnQuartersChanging(value); + this.SendPropertyChanging(); + this._Quarters = value; + this.SendPropertyChanged("Quarters"); + this.OnQuartersChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingMan", DbType="NVarChar(50)")] + public string FillingMan + { + get + { + return this._FillingMan; + } + set + { + if ((this._FillingMan != value)) + { + this.OnFillingManChanging(value); + this.SendPropertyChanging(); + this._FillingMan = value; + this.SendPropertyChanged("FillingMan"); + this.OnFillingManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this.OnFillingDateChanging(value); + this.SendPropertyChanging(); + this._FillingDate = value; + this.SendPropertyChanged("FillingDate"); + this.OnFillingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")] + public string DutyPerson + { + get + { + return this._DutyPerson; + } + set + { + if ((this._DutyPerson != value)) + { + this.OnDutyPersonChanging(value); + this.SendPropertyChanging(); + this._DutyPerson = value; + this.SendPropertyChanged("DutyPerson"); + this.OnDutyPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Environmental_ArchitectureReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Environmental_ArchitectureReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReportItem_Environmental_ArchitectureReport", Storage="_Environmental_ArchitectureReportItem", ThisKey="ArchitectureReportId", OtherKey="ArchitectureReportId", DeleteRule="NO ACTION")] + public EntitySet Environmental_ArchitectureReportItem + { + get + { + return this._Environmental_ArchitectureReportItem; + } + set + { + this._Environmental_ArchitectureReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Environmental_ArchitectureReportItem(Environmental_ArchitectureReportItem entity) + { + this.SendPropertyChanging(); + entity.Environmental_ArchitectureReport = this; + } + + private void detach_Environmental_ArchitectureReportItem(Environmental_ArchitectureReportItem entity) + { + this.SendPropertyChanging(); + entity.Environmental_ArchitectureReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Environmental_ArchitectureReportItem")] + public partial class Environmental_ArchitectureReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ArchitectureReportItemId; + + private string _ArchitectureReportId; + + private string _SortIndex; + + private string _LastYearValue; + + private string _ThisYearValue; + + private string _Rate; + + private EntityRef _Environmental_ArchitectureReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnArchitectureReportItemIdChanging(string value); + partial void OnArchitectureReportItemIdChanged(); + partial void OnArchitectureReportIdChanging(string value); + partial void OnArchitectureReportIdChanged(); + partial void OnSortIndexChanging(string value); + partial void OnSortIndexChanged(); + partial void OnLastYearValueChanging(string value); + partial void OnLastYearValueChanged(); + partial void OnThisYearValueChanging(string value); + partial void OnThisYearValueChanged(); + partial void OnRateChanging(string value); + partial void OnRateChanged(); + #endregion + + public Environmental_ArchitectureReportItem() + { + this._Environmental_ArchitectureReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchitectureReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ArchitectureReportItemId + { + get + { + return this._ArchitectureReportItemId; + } + set + { + if ((this._ArchitectureReportItemId != value)) + { + this.OnArchitectureReportItemIdChanging(value); + this.SendPropertyChanging(); + this._ArchitectureReportItemId = value; + this.SendPropertyChanged("ArchitectureReportItemId"); + this.OnArchitectureReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchitectureReportId", DbType="NVarChar(50)")] + public string ArchitectureReportId + { + get + { + return this._ArchitectureReportId; + } + set + { + if ((this._ArchitectureReportId != value)) + { + if (this._Environmental_ArchitectureReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnArchitectureReportIdChanging(value); + this.SendPropertyChanging(); + this._ArchitectureReportId = value; + this.SendPropertyChanged("ArchitectureReportId"); + this.OnArchitectureReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="NVarChar(50)")] + public string SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastYearValue", DbType="NVarChar(50)")] + public string LastYearValue + { + get + { + return this._LastYearValue; + } + set + { + if ((this._LastYearValue != value)) + { + this.OnLastYearValueChanging(value); + this.SendPropertyChanging(); + this._LastYearValue = value; + this.SendPropertyChanged("LastYearValue"); + this.OnLastYearValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisYearValue", DbType="NVarChar(50)")] + public string ThisYearValue + { + get + { + return this._ThisYearValue; + } + set + { + if ((this._ThisYearValue != value)) + { + this.OnThisYearValueChanging(value); + this.SendPropertyChanging(); + this._ThisYearValue = value; + this.SendPropertyChanged("ThisYearValue"); + this.OnThisYearValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(50)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this.OnRateChanging(value); + this.SendPropertyChanging(); + this._Rate = value; + this.SendPropertyChanged("Rate"); + this.OnRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReportItem_Environmental_ArchitectureReport", Storage="_Environmental_ArchitectureReport", ThisKey="ArchitectureReportId", OtherKey="ArchitectureReportId", IsForeignKey=true)] + public Environmental_ArchitectureReport Environmental_ArchitectureReport + { + get + { + return this._Environmental_ArchitectureReport.Entity; + } + set + { + Environmental_ArchitectureReport previousValue = this._Environmental_ArchitectureReport.Entity; + if (((previousValue != value) + || (this._Environmental_ArchitectureReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Environmental_ArchitectureReport.Entity = null; + previousValue.Environmental_ArchitectureReportItem.Remove(this); + } + this._Environmental_ArchitectureReport.Entity = value; + if ((value != null)) + { + value.Environmental_ArchitectureReportItem.Add(this); + this._ArchitectureReportId = value.ArchitectureReportId; + } + else + { + this._ArchitectureReportId = default(string); + } + this.SendPropertyChanged("Environmental_ArchitectureReport"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Environmental_ChemicalReport")] + public partial class Environmental_ChemicalReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ChemicalReportId; + + private string _UnitId; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _FillingMan; + + private System.Nullable _FillingDate; + + private string _DutyPerson; + + private string _UpState; + + private EntityRef _Base_Unit; + + private EntitySet _Environmental_ChemicalReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnChemicalReportIdChanging(string value); + partial void OnChemicalReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnMonthChanging(System.Nullable value); + partial void OnMonthChanged(); + partial void OnFillingManChanging(string value); + partial void OnFillingManChanged(); + partial void OnFillingDateChanging(System.Nullable value); + partial void OnFillingDateChanged(); + partial void OnDutyPersonChanging(string value); + partial void OnDutyPersonChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + #endregion + + public Environmental_ChemicalReport() + { + this._Base_Unit = default(EntityRef); + this._Environmental_ChemicalReportItem = new EntitySet(new Action(this.attach_Environmental_ChemicalReportItem), new Action(this.detach_Environmental_ChemicalReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ChemicalReportId + { + get + { + return this._ChemicalReportId; + } + set + { + if ((this._ChemicalReportId != value)) + { + this.OnChemicalReportIdChanging(value); + this.SendPropertyChanging(); + this._ChemicalReportId = value; + this.SendPropertyChanged("ChemicalReportId"); + this.OnChemicalReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this.OnMonthChanging(value); + this.SendPropertyChanging(); + this._Month = value; + this.SendPropertyChanged("Month"); + this.OnMonthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingMan", DbType="NVarChar(50)")] + public string FillingMan + { + get + { + return this._FillingMan; + } + set + { + if ((this._FillingMan != value)) + { + this.OnFillingManChanging(value); + this.SendPropertyChanging(); + this._FillingMan = value; + this.SendPropertyChanged("FillingMan"); + this.OnFillingManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this.OnFillingDateChanging(value); + this.SendPropertyChanging(); + this._FillingDate = value; + this.SendPropertyChanged("FillingDate"); + this.OnFillingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")] + public string DutyPerson + { + get + { + return this._DutyPerson; + } + set + { + if ((this._DutyPerson != value)) + { + this.OnDutyPersonChanging(value); + this.SendPropertyChanging(); + this._DutyPerson = value; + this.SendPropertyChanged("DutyPerson"); + this.OnDutyPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ChemicalReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Environmental_ChemicalReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Environmental_ChemicalReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ChemicalReportItem_Environmental_ChemicalReport", Storage="_Environmental_ChemicalReportItem", ThisKey="ChemicalReportId", OtherKey="ChemicalReportId", DeleteRule="NO ACTION")] + public EntitySet Environmental_ChemicalReportItem + { + get + { + return this._Environmental_ChemicalReportItem; + } + set + { + this._Environmental_ChemicalReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Environmental_ChemicalReportItem(Environmental_ChemicalReportItem entity) + { + this.SendPropertyChanging(); + entity.Environmental_ChemicalReport = this; + } + + private void detach_Environmental_ChemicalReportItem(Environmental_ChemicalReportItem entity) + { + this.SendPropertyChanging(); + entity.Environmental_ChemicalReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Environmental_ChemicalReportItem")] + public partial class Environmental_ChemicalReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ChemicalReportItemId; + + private string _ChemicalReportId; + + private string _SortIndex; + + private string _LastYearValue; + + private string _ThisYearValue; + + private string _Rate; + + private EntityRef _Environmental_ChemicalReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnChemicalReportItemIdChanging(string value); + partial void OnChemicalReportItemIdChanged(); + partial void OnChemicalReportIdChanging(string value); + partial void OnChemicalReportIdChanged(); + partial void OnSortIndexChanging(string value); + partial void OnSortIndexChanged(); + partial void OnLastYearValueChanging(string value); + partial void OnLastYearValueChanged(); + partial void OnThisYearValueChanging(string value); + partial void OnThisYearValueChanged(); + partial void OnRateChanging(string value); + partial void OnRateChanged(); + #endregion + + public Environmental_ChemicalReportItem() + { + this._Environmental_ChemicalReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ChemicalReportItemId + { + get + { + return this._ChemicalReportItemId; + } + set + { + if ((this._ChemicalReportItemId != value)) + { + this.OnChemicalReportItemIdChanging(value); + this.SendPropertyChanging(); + this._ChemicalReportItemId = value; + this.SendPropertyChanged("ChemicalReportItemId"); + this.OnChemicalReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalReportId", DbType="NVarChar(50)")] + public string ChemicalReportId + { + get + { + return this._ChemicalReportId; + } + set + { + if ((this._ChemicalReportId != value)) + { + if (this._Environmental_ChemicalReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnChemicalReportIdChanging(value); + this.SendPropertyChanging(); + this._ChemicalReportId = value; + this.SendPropertyChanged("ChemicalReportId"); + this.OnChemicalReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="NVarChar(50)")] + public string SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastYearValue", DbType="NVarChar(50)")] + public string LastYearValue + { + get + { + return this._LastYearValue; + } + set + { + if ((this._LastYearValue != value)) + { + this.OnLastYearValueChanging(value); + this.SendPropertyChanging(); + this._LastYearValue = value; + this.SendPropertyChanged("LastYearValue"); + this.OnLastYearValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisYearValue", DbType="NVarChar(50)")] + public string ThisYearValue + { + get + { + return this._ThisYearValue; + } + set + { + if ((this._ThisYearValue != value)) + { + this.OnThisYearValueChanging(value); + this.SendPropertyChanging(); + this._ThisYearValue = value; + this.SendPropertyChanged("ThisYearValue"); + this.OnThisYearValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(50)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this.OnRateChanging(value); + this.SendPropertyChanging(); + this._Rate = value; + this.SendPropertyChanged("Rate"); + this.OnRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ChemicalReportItem_Environmental_ChemicalReport", Storage="_Environmental_ChemicalReport", ThisKey="ChemicalReportId", OtherKey="ChemicalReportId", IsForeignKey=true)] + public Environmental_ChemicalReport Environmental_ChemicalReport + { + get + { + return this._Environmental_ChemicalReport.Entity; + } + set + { + Environmental_ChemicalReport previousValue = this._Environmental_ChemicalReport.Entity; + if (((previousValue != value) + || (this._Environmental_ChemicalReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Environmental_ChemicalReport.Entity = null; + previousValue.Environmental_ChemicalReportItem.Remove(this); + } + this._Environmental_ChemicalReport.Entity = value; + if ((value != null)) + { + value.Environmental_ChemicalReportItem.Add(this); + this._ChemicalReportId = value.ChemicalReportId; + } + else + { + this._ChemicalReportId = default(string); + } + this.SendPropertyChanged("Environmental_ChemicalReport"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Environmental_EIAReport")] public partial class Environmental_EIAReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -64457,6 +69973,10 @@ namespace Model private string _WorkStage; + private System.Nullable _IsStart; + + private string _ProjectId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -64497,6 +70017,10 @@ namespace Model partial void OnRemarkChanged(); partial void OnWorkStageChanging(string value); partial void OnWorkStageChanged(); + partial void OnIsStartChanging(System.Nullable value); + partial void OnIsStartChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); #endregion public Hazard_HazardSelectedItem() @@ -64864,6 +70388,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsStart", DbType="Bit")] + public System.Nullable IsStart + { + get + { + return this._IsStart; + } + set + { + if ((this._IsStart != value)) + { + this.OnIsStartChanging(value); + this.SendPropertyChanging(); + this._IsStart = value; + this.SendPropertyChanged("IsStart"); + this.OnIsStartChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -74357,7 +79921,7 @@ namespace Model OnCreated(); } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] public string MaterialCode { get @@ -74461,7 +80025,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string MaterialDef { get @@ -79051,7 +84615,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")] public string MaterialCode { get @@ -122768,7 +128332,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(100)")] public string MaterialName { get @@ -122788,7 +128352,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(200)")] public string SpecificationAndModel { get @@ -122808,7 +128372,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(100)")] public string MaterialCode { get @@ -122828,7 +128392,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(100)")] public string Material { get @@ -125266,6 +130830,802 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Meeting_CompanySafetyMeeting")] + public partial class Meeting_CompanySafetyMeeting : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CompanySafetyMeetingId; + + private string _CompanySafetyMeetingCode; + + private string _CompanySafetyMeetingName; + + private System.Nullable _CompanySafetyMeetingDate; + + private string _CompileMan; + + private string _CompanySafetyMeetingContents; + + private System.Nullable _CompileDate; + + private System.Nullable _AttentPersonNum; + + private System.Nullable _MeetingHours; + + private string _MeetingHostMan; + + private string _AttentPerson; + + private string _MeetingPlace; + + private string _MeetingHostManId; + + private string _AttentPersonIds; + + private string _MeetingHostManOther; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCompanySafetyMeetingIdChanging(string value); + partial void OnCompanySafetyMeetingIdChanged(); + partial void OnCompanySafetyMeetingCodeChanging(string value); + partial void OnCompanySafetyMeetingCodeChanged(); + partial void OnCompanySafetyMeetingNameChanging(string value); + partial void OnCompanySafetyMeetingNameChanged(); + partial void OnCompanySafetyMeetingDateChanging(System.Nullable value); + partial void OnCompanySafetyMeetingDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompanySafetyMeetingContentsChanging(string value); + partial void OnCompanySafetyMeetingContentsChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttentPersonNumChanging(System.Nullable value); + partial void OnAttentPersonNumChanged(); + partial void OnMeetingHoursChanging(System.Nullable value); + partial void OnMeetingHoursChanged(); + partial void OnMeetingHostManChanging(string value); + partial void OnMeetingHostManChanged(); + partial void OnAttentPersonChanging(string value); + partial void OnAttentPersonChanged(); + partial void OnMeetingPlaceChanging(string value); + partial void OnMeetingPlaceChanged(); + partial void OnMeetingHostManIdChanging(string value); + partial void OnMeetingHostManIdChanged(); + partial void OnAttentPersonIdsChanging(string value); + partial void OnAttentPersonIdsChanged(); + partial void OnMeetingHostManOtherChanging(string value); + partial void OnMeetingHostManOtherChanged(); + #endregion + + public Meeting_CompanySafetyMeeting() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySafetyMeetingId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CompanySafetyMeetingId + { + get + { + return this._CompanySafetyMeetingId; + } + set + { + if ((this._CompanySafetyMeetingId != value)) + { + this.OnCompanySafetyMeetingIdChanging(value); + this.SendPropertyChanging(); + this._CompanySafetyMeetingId = value; + this.SendPropertyChanged("CompanySafetyMeetingId"); + this.OnCompanySafetyMeetingIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySafetyMeetingCode", DbType="NVarChar(50)")] + public string CompanySafetyMeetingCode + { + get + { + return this._CompanySafetyMeetingCode; + } + set + { + if ((this._CompanySafetyMeetingCode != value)) + { + this.OnCompanySafetyMeetingCodeChanging(value); + this.SendPropertyChanging(); + this._CompanySafetyMeetingCode = value; + this.SendPropertyChanged("CompanySafetyMeetingCode"); + this.OnCompanySafetyMeetingCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySafetyMeetingName", DbType="NVarChar(50)")] + public string CompanySafetyMeetingName + { + get + { + return this._CompanySafetyMeetingName; + } + set + { + if ((this._CompanySafetyMeetingName != value)) + { + this.OnCompanySafetyMeetingNameChanging(value); + this.SendPropertyChanging(); + this._CompanySafetyMeetingName = value; + this.SendPropertyChanged("CompanySafetyMeetingName"); + this.OnCompanySafetyMeetingNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySafetyMeetingDate", DbType="DateTime")] + public System.Nullable CompanySafetyMeetingDate + { + get + { + return this._CompanySafetyMeetingDate; + } + set + { + if ((this._CompanySafetyMeetingDate != value)) + { + this.OnCompanySafetyMeetingDateChanging(value); + this.SendPropertyChanging(); + this._CompanySafetyMeetingDate = value; + this.SendPropertyChanged("CompanySafetyMeetingDate"); + this.OnCompanySafetyMeetingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySafetyMeetingContents", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string CompanySafetyMeetingContents + { + get + { + return this._CompanySafetyMeetingContents; + } + set + { + if ((this._CompanySafetyMeetingContents != value)) + { + this.OnCompanySafetyMeetingContentsChanging(value); + this.SendPropertyChanging(); + this._CompanySafetyMeetingContents = value; + this.SendPropertyChanged("CompanySafetyMeetingContents"); + this.OnCompanySafetyMeetingContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonNum", DbType="Int")] + public System.Nullable AttentPersonNum + { + get + { + return this._AttentPersonNum; + } + set + { + if ((this._AttentPersonNum != value)) + { + this.OnAttentPersonNumChanging(value); + this.SendPropertyChanging(); + this._AttentPersonNum = value; + this.SendPropertyChanged("AttentPersonNum"); + this.OnAttentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHours", DbType="Decimal(9,1)")] + public System.Nullable MeetingHours + { + get + { + return this._MeetingHours; + } + set + { + if ((this._MeetingHours != value)) + { + this.OnMeetingHoursChanging(value); + this.SendPropertyChanging(); + this._MeetingHours = value; + this.SendPropertyChanged("MeetingHours"); + this.OnMeetingHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostMan", DbType="NVarChar(50)")] + public string MeetingHostMan + { + get + { + return this._MeetingHostMan; + } + set + { + if ((this._MeetingHostMan != value)) + { + this.OnMeetingHostManChanging(value); + this.SendPropertyChanging(); + this._MeetingHostMan = value; + this.SendPropertyChanged("MeetingHostMan"); + this.OnMeetingHostManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(300)")] + public string AttentPerson + { + get + { + return this._AttentPerson; + } + set + { + if ((this._AttentPerson != value)) + { + this.OnAttentPersonChanging(value); + this.SendPropertyChanging(); + this._AttentPerson = value; + this.SendPropertyChanged("AttentPerson"); + this.OnAttentPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingPlace", DbType="NVarChar(200)")] + public string MeetingPlace + { + get + { + return this._MeetingPlace; + } + set + { + if ((this._MeetingPlace != value)) + { + this.OnMeetingPlaceChanging(value); + this.SendPropertyChanging(); + this._MeetingPlace = value; + this.SendPropertyChanged("MeetingPlace"); + this.OnMeetingPlaceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManId", DbType="NVarChar(50)")] + public string MeetingHostManId + { + get + { + return this._MeetingHostManId; + } + set + { + if ((this._MeetingHostManId != value)) + { + this.OnMeetingHostManIdChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManId = value; + this.SendPropertyChanged("MeetingHostManId"); + this.OnMeetingHostManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonIds", DbType="NVarChar(4000)")] + public string AttentPersonIds + { + get + { + return this._AttentPersonIds; + } + set + { + if ((this._AttentPersonIds != value)) + { + this.OnAttentPersonIdsChanging(value); + this.SendPropertyChanging(); + this._AttentPersonIds = value; + this.SendPropertyChanged("AttentPersonIds"); + this.OnAttentPersonIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManOther", DbType="NVarChar(500)")] + public string MeetingHostManOther + { + get + { + return this._MeetingHostManOther; + } + set + { + if ((this._MeetingHostManOther != value)) + { + this.OnMeetingHostManOtherChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManOther = value; + this.SendPropertyChanged("MeetingHostManOther"); + this.OnMeetingHostManOtherChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Meeting_CompanySpecialMeeting")] + public partial class Meeting_CompanySpecialMeeting : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CompanySpecialMeetingId; + + private string _CompanySpecialMeetingCode; + + private string _CompanySpecialMeetingName; + + private System.Nullable _CompanySpecialMeetingDate; + + private string _CompileMan; + + private string _CompanySpecialMeetingContents; + + private System.Nullable _CompileDate; + + private System.Nullable _AttentPersonNum; + + private System.Nullable _MeetingHours; + + private string _MeetingHostMan; + + private string _AttentPerson; + + private string _MeetingPlace; + + private string _MeetingHostManId; + + private string _AttentPersonIds; + + private string _MeetingHostManOther; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCompanySpecialMeetingIdChanging(string value); + partial void OnCompanySpecialMeetingIdChanged(); + partial void OnCompanySpecialMeetingCodeChanging(string value); + partial void OnCompanySpecialMeetingCodeChanged(); + partial void OnCompanySpecialMeetingNameChanging(string value); + partial void OnCompanySpecialMeetingNameChanged(); + partial void OnCompanySpecialMeetingDateChanging(System.Nullable value); + partial void OnCompanySpecialMeetingDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompanySpecialMeetingContentsChanging(string value); + partial void OnCompanySpecialMeetingContentsChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttentPersonNumChanging(System.Nullable value); + partial void OnAttentPersonNumChanged(); + partial void OnMeetingHoursChanging(System.Nullable value); + partial void OnMeetingHoursChanged(); + partial void OnMeetingHostManChanging(string value); + partial void OnMeetingHostManChanged(); + partial void OnAttentPersonChanging(string value); + partial void OnAttentPersonChanged(); + partial void OnMeetingPlaceChanging(string value); + partial void OnMeetingPlaceChanged(); + partial void OnMeetingHostManIdChanging(string value); + partial void OnMeetingHostManIdChanged(); + partial void OnAttentPersonIdsChanging(string value); + partial void OnAttentPersonIdsChanged(); + partial void OnMeetingHostManOtherChanging(string value); + partial void OnMeetingHostManOtherChanged(); + #endregion + + public Meeting_CompanySpecialMeeting() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySpecialMeetingId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CompanySpecialMeetingId + { + get + { + return this._CompanySpecialMeetingId; + } + set + { + if ((this._CompanySpecialMeetingId != value)) + { + this.OnCompanySpecialMeetingIdChanging(value); + this.SendPropertyChanging(); + this._CompanySpecialMeetingId = value; + this.SendPropertyChanged("CompanySpecialMeetingId"); + this.OnCompanySpecialMeetingIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySpecialMeetingCode", DbType="NVarChar(50)")] + public string CompanySpecialMeetingCode + { + get + { + return this._CompanySpecialMeetingCode; + } + set + { + if ((this._CompanySpecialMeetingCode != value)) + { + this.OnCompanySpecialMeetingCodeChanging(value); + this.SendPropertyChanging(); + this._CompanySpecialMeetingCode = value; + this.SendPropertyChanged("CompanySpecialMeetingCode"); + this.OnCompanySpecialMeetingCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySpecialMeetingName", DbType="NVarChar(50)")] + public string CompanySpecialMeetingName + { + get + { + return this._CompanySpecialMeetingName; + } + set + { + if ((this._CompanySpecialMeetingName != value)) + { + this.OnCompanySpecialMeetingNameChanging(value); + this.SendPropertyChanging(); + this._CompanySpecialMeetingName = value; + this.SendPropertyChanged("CompanySpecialMeetingName"); + this.OnCompanySpecialMeetingNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySpecialMeetingDate", DbType="DateTime")] + public System.Nullable CompanySpecialMeetingDate + { + get + { + return this._CompanySpecialMeetingDate; + } + set + { + if ((this._CompanySpecialMeetingDate != value)) + { + this.OnCompanySpecialMeetingDateChanging(value); + this.SendPropertyChanging(); + this._CompanySpecialMeetingDate = value; + this.SendPropertyChanged("CompanySpecialMeetingDate"); + this.OnCompanySpecialMeetingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanySpecialMeetingContents", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string CompanySpecialMeetingContents + { + get + { + return this._CompanySpecialMeetingContents; + } + set + { + if ((this._CompanySpecialMeetingContents != value)) + { + this.OnCompanySpecialMeetingContentsChanging(value); + this.SendPropertyChanging(); + this._CompanySpecialMeetingContents = value; + this.SendPropertyChanged("CompanySpecialMeetingContents"); + this.OnCompanySpecialMeetingContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonNum", DbType="Int")] + public System.Nullable AttentPersonNum + { + get + { + return this._AttentPersonNum; + } + set + { + if ((this._AttentPersonNum != value)) + { + this.OnAttentPersonNumChanging(value); + this.SendPropertyChanging(); + this._AttentPersonNum = value; + this.SendPropertyChanged("AttentPersonNum"); + this.OnAttentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHours", DbType="Decimal(9,1)")] + public System.Nullable MeetingHours + { + get + { + return this._MeetingHours; + } + set + { + if ((this._MeetingHours != value)) + { + this.OnMeetingHoursChanging(value); + this.SendPropertyChanging(); + this._MeetingHours = value; + this.SendPropertyChanged("MeetingHours"); + this.OnMeetingHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostMan", DbType="NVarChar(50)")] + public string MeetingHostMan + { + get + { + return this._MeetingHostMan; + } + set + { + if ((this._MeetingHostMan != value)) + { + this.OnMeetingHostManChanging(value); + this.SendPropertyChanging(); + this._MeetingHostMan = value; + this.SendPropertyChanged("MeetingHostMan"); + this.OnMeetingHostManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(300)")] + public string AttentPerson + { + get + { + return this._AttentPerson; + } + set + { + if ((this._AttentPerson != value)) + { + this.OnAttentPersonChanging(value); + this.SendPropertyChanging(); + this._AttentPerson = value; + this.SendPropertyChanged("AttentPerson"); + this.OnAttentPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingPlace", DbType="NVarChar(200)")] + public string MeetingPlace + { + get + { + return this._MeetingPlace; + } + set + { + if ((this._MeetingPlace != value)) + { + this.OnMeetingPlaceChanging(value); + this.SendPropertyChanging(); + this._MeetingPlace = value; + this.SendPropertyChanged("MeetingPlace"); + this.OnMeetingPlaceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManId", DbType="NVarChar(50)")] + public string MeetingHostManId + { + get + { + return this._MeetingHostManId; + } + set + { + if ((this._MeetingHostManId != value)) + { + this.OnMeetingHostManIdChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManId = value; + this.SendPropertyChanged("MeetingHostManId"); + this.OnMeetingHostManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonIds", DbType="NVarChar(4000)")] + public string AttentPersonIds + { + get + { + return this._AttentPersonIds; + } + set + { + if ((this._AttentPersonIds != value)) + { + this.OnAttentPersonIdsChanging(value); + this.SendPropertyChanging(); + this._AttentPersonIds = value; + this.SendPropertyChanged("AttentPersonIds"); + this.OnAttentPersonIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManOther", DbType="NVarChar(500)")] + public string MeetingHostManOther + { + get + { + return this._MeetingHostManOther; + } + set + { + if ((this._MeetingHostManOther != value)) + { + this.OnMeetingHostManOtherChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManOther = value; + this.SendPropertyChanged("MeetingHostManOther"); + this.OnMeetingHostManOtherChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Meeting_CQMSMeeting")] public partial class Meeting_CQMSMeeting : INotifyPropertyChanging, INotifyPropertyChanged { @@ -126614,6 +132974,476 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Meeting_SafetyLeaderGroupMeeting")] + public partial class Meeting_SafetyLeaderGroupMeeting : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyLeaderGroupMeetingId; + + private string _ProjectId; + + private string _SafetyLeaderGroupMeetingCode; + + private string _SafetyLeaderGroupMeetingName; + + private System.Nullable _SafetyLeaderGroupMeetingDate; + + private string _CompileMan; + + private string _SafetyLeaderGroupMeetingContents; + + private System.Nullable _CompileDate; + + private string _States; + + private System.Nullable _AttentPersonNum; + + private System.Nullable _MeetingHours; + + private string _MeetingHostMan; + + private string _AttentPerson; + + private string _MeetingPlace; + + private string _UnitId; + + private string _MeetingHostManId; + + private string _AttentPersonIds; + + private string _MeetingHostManOther; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyLeaderGroupMeetingIdChanging(string value); + partial void OnSafetyLeaderGroupMeetingIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnSafetyLeaderGroupMeetingCodeChanging(string value); + partial void OnSafetyLeaderGroupMeetingCodeChanged(); + partial void OnSafetyLeaderGroupMeetingNameChanging(string value); + partial void OnSafetyLeaderGroupMeetingNameChanged(); + partial void OnSafetyLeaderGroupMeetingDateChanging(System.Nullable value); + partial void OnSafetyLeaderGroupMeetingDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnSafetyLeaderGroupMeetingContentsChanging(string value); + partial void OnSafetyLeaderGroupMeetingContentsChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + partial void OnAttentPersonNumChanging(System.Nullable value); + partial void OnAttentPersonNumChanged(); + partial void OnMeetingHoursChanging(System.Nullable value); + partial void OnMeetingHoursChanged(); + partial void OnMeetingHostManChanging(string value); + partial void OnMeetingHostManChanged(); + partial void OnAttentPersonChanging(string value); + partial void OnAttentPersonChanged(); + partial void OnMeetingPlaceChanging(string value); + partial void OnMeetingPlaceChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnMeetingHostManIdChanging(string value); + partial void OnMeetingHostManIdChanged(); + partial void OnAttentPersonIdsChanging(string value); + partial void OnAttentPersonIdsChanged(); + partial void OnMeetingHostManOtherChanging(string value); + partial void OnMeetingHostManOtherChanged(); + #endregion + + public Meeting_SafetyLeaderGroupMeeting() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyLeaderGroupMeetingId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyLeaderGroupMeetingId + { + get + { + return this._SafetyLeaderGroupMeetingId; + } + set + { + if ((this._SafetyLeaderGroupMeetingId != value)) + { + this.OnSafetyLeaderGroupMeetingIdChanging(value); + this.SendPropertyChanging(); + this._SafetyLeaderGroupMeetingId = value; + this.SendPropertyChanged("SafetyLeaderGroupMeetingId"); + this.OnSafetyLeaderGroupMeetingIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyLeaderGroupMeetingCode", DbType="NVarChar(50)")] + public string SafetyLeaderGroupMeetingCode + { + get + { + return this._SafetyLeaderGroupMeetingCode; + } + set + { + if ((this._SafetyLeaderGroupMeetingCode != value)) + { + this.OnSafetyLeaderGroupMeetingCodeChanging(value); + this.SendPropertyChanging(); + this._SafetyLeaderGroupMeetingCode = value; + this.SendPropertyChanged("SafetyLeaderGroupMeetingCode"); + this.OnSafetyLeaderGroupMeetingCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyLeaderGroupMeetingName", DbType="NVarChar(50)")] + public string SafetyLeaderGroupMeetingName + { + get + { + return this._SafetyLeaderGroupMeetingName; + } + set + { + if ((this._SafetyLeaderGroupMeetingName != value)) + { + this.OnSafetyLeaderGroupMeetingNameChanging(value); + this.SendPropertyChanging(); + this._SafetyLeaderGroupMeetingName = value; + this.SendPropertyChanged("SafetyLeaderGroupMeetingName"); + this.OnSafetyLeaderGroupMeetingNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyLeaderGroupMeetingDate", DbType="DateTime")] + public System.Nullable SafetyLeaderGroupMeetingDate + { + get + { + return this._SafetyLeaderGroupMeetingDate; + } + set + { + if ((this._SafetyLeaderGroupMeetingDate != value)) + { + this.OnSafetyLeaderGroupMeetingDateChanging(value); + this.SendPropertyChanging(); + this._SafetyLeaderGroupMeetingDate = value; + this.SendPropertyChanged("SafetyLeaderGroupMeetingDate"); + this.OnSafetyLeaderGroupMeetingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyLeaderGroupMeetingContents", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string SafetyLeaderGroupMeetingContents + { + get + { + return this._SafetyLeaderGroupMeetingContents; + } + set + { + if ((this._SafetyLeaderGroupMeetingContents != value)) + { + this.OnSafetyLeaderGroupMeetingContentsChanging(value); + this.SendPropertyChanging(); + this._SafetyLeaderGroupMeetingContents = value; + this.SendPropertyChanged("SafetyLeaderGroupMeetingContents"); + this.OnSafetyLeaderGroupMeetingContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="Char(1)")] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonNum", DbType="Int")] + public System.Nullable AttentPersonNum + { + get + { + return this._AttentPersonNum; + } + set + { + if ((this._AttentPersonNum != value)) + { + this.OnAttentPersonNumChanging(value); + this.SendPropertyChanging(); + this._AttentPersonNum = value; + this.SendPropertyChanged("AttentPersonNum"); + this.OnAttentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHours", DbType="Decimal(9,1)")] + public System.Nullable MeetingHours + { + get + { + return this._MeetingHours; + } + set + { + if ((this._MeetingHours != value)) + { + this.OnMeetingHoursChanging(value); + this.SendPropertyChanging(); + this._MeetingHours = value; + this.SendPropertyChanged("MeetingHours"); + this.OnMeetingHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostMan", DbType="NVarChar(50)")] + public string MeetingHostMan + { + get + { + return this._MeetingHostMan; + } + set + { + if ((this._MeetingHostMan != value)) + { + this.OnMeetingHostManChanging(value); + this.SendPropertyChanging(); + this._MeetingHostMan = value; + this.SendPropertyChanged("MeetingHostMan"); + this.OnMeetingHostManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(300)")] + public string AttentPerson + { + get + { + return this._AttentPerson; + } + set + { + if ((this._AttentPerson != value)) + { + this.OnAttentPersonChanging(value); + this.SendPropertyChanging(); + this._AttentPerson = value; + this.SendPropertyChanged("AttentPerson"); + this.OnAttentPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingPlace", DbType="NVarChar(200)")] + public string MeetingPlace + { + get + { + return this._MeetingPlace; + } + set + { + if ((this._MeetingPlace != value)) + { + this.OnMeetingPlaceChanging(value); + this.SendPropertyChanging(); + this._MeetingPlace = value; + this.SendPropertyChanged("MeetingPlace"); + this.OnMeetingPlaceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManId", DbType="NVarChar(50)")] + public string MeetingHostManId + { + get + { + return this._MeetingHostManId; + } + set + { + if ((this._MeetingHostManId != value)) + { + this.OnMeetingHostManIdChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManId = value; + this.SendPropertyChanged("MeetingHostManId"); + this.OnMeetingHostManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPersonIds", DbType="NVarChar(4000)")] + public string AttentPersonIds + { + get + { + return this._AttentPersonIds; + } + set + { + if ((this._AttentPersonIds != value)) + { + this.OnAttentPersonIdsChanging(value); + this.SendPropertyChanging(); + this._AttentPersonIds = value; + this.SendPropertyChanged("AttentPersonIds"); + this.OnAttentPersonIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeetingHostManOther", DbType="NVarChar(500)")] + public string MeetingHostManOther + { + get + { + return this._MeetingHostManOther; + } + set + { + if ((this._MeetingHostManOther != value)) + { + this.OnMeetingHostManOtherChanging(value); + this.SendPropertyChanging(); + this._MeetingHostManOther = value; + this.SendPropertyChanged("MeetingHostManOther"); + this.OnMeetingHostManOtherChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Meeting_SpecialMeeting")] public partial class Meeting_SpecialMeeting : INotifyPropertyChanging, INotifyPropertyChanged { @@ -198296,6 +205126,10 @@ namespace Model private string _Descriptions; + private System.Nullable _IsSuperLargerHazard; + + private System.Nullable _TrainPersonNum; + private EntityRef _Person_Persons; private EntityRef _Base_Project; @@ -198328,6 +205162,10 @@ namespace Model partial void OnStatesChanged(); partial void OnDescriptionsChanging(string value); partial void OnDescriptionsChanged(); + partial void OnIsSuperLargerHazardChanging(System.Nullable value); + partial void OnIsSuperLargerHazardChanged(); + partial void OnTrainPersonNumChanging(System.Nullable value); + partial void OnTrainPersonNumChanged(); #endregion public Solution_LargerHazard() @@ -198585,6 +205423,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSuperLargerHazard", DbType="Bit")] + public System.Nullable IsSuperLargerHazard + { + get + { + return this._IsSuperLargerHazard; + } + set + { + if ((this._IsSuperLargerHazard != value)) + { + this.OnIsSuperLargerHazardChanging(value); + this.SendPropertyChanging(); + this._IsSuperLargerHazard = value; + this.SendPropertyChanged("IsSuperLargerHazard"); + this.OnIsSuperLargerHazardChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainPersonNum", DbType="Int")] + public System.Nullable TrainPersonNum + { + get + { + return this._TrainPersonNum; + } + set + { + if ((this._TrainPersonNum != value)) + { + this.OnTrainPersonNumChanging(value); + this.SendPropertyChanging(); + this._TrainPersonNum = value; + this.SendPropertyChanged("TrainPersonNum"); + this.OnTrainPersonNumChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_LargerHazard_Person_Persons_RecardMan", Storage="_Person_Persons", ThisKey="RecardMan", OtherKey="PersonId", IsForeignKey=true)] public Person_Persons Person_Persons { @@ -199751,6 +206629,593 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SuperviseCheckReport")] + public partial class Supervise_SuperviseCheckReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SuperviseCheckReportId; + + private string _SuperviseCheckReportCode; + + private System.Nullable _CheckDate; + + private string _ProjectId; + + private string _UnitId; + + private string _CheckTeam; + + private string _EvaluationResult; + + private string _AttachUrl; + + private string _IsIssued; + + private string _CheckType; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntitySet _Supervise_SuperviseCheckReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSuperviseCheckReportIdChanging(string value); + partial void OnSuperviseCheckReportIdChanged(); + partial void OnSuperviseCheckReportCodeChanging(string value); + partial void OnSuperviseCheckReportCodeChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnCheckTeamChanging(string value); + partial void OnCheckTeamChanged(); + partial void OnEvaluationResultChanging(string value); + partial void OnEvaluationResultChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnIsIssuedChanging(string value); + partial void OnIsIssuedChanged(); + partial void OnCheckTypeChanging(string value); + partial void OnCheckTypeChanged(); + #endregion + + public Supervise_SuperviseCheckReport() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Supervise_SuperviseCheckReportItem = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReportItem), new Action(this.detach_Supervise_SuperviseCheckReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SuperviseCheckReportId + { + get + { + return this._SuperviseCheckReportId; + } + set + { + if ((this._SuperviseCheckReportId != value)) + { + this.OnSuperviseCheckReportIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportId = value; + this.SendPropertyChanged("SuperviseCheckReportId"); + this.OnSuperviseCheckReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckReportCode + { + get + { + return this._SuperviseCheckReportCode; + } + set + { + if ((this._SuperviseCheckReportCode != value)) + { + this.OnSuperviseCheckReportCodeChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportCode = value; + this.SendPropertyChanged("SuperviseCheckReportCode"); + this.OnSuperviseCheckReportCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeam", DbType="NVarChar(150)")] + public string CheckTeam + { + get + { + return this._CheckTeam; + } + set + { + if ((this._CheckTeam != value)) + { + this.OnCheckTeamChanging(value); + this.SendPropertyChanging(); + this._CheckTeam = value; + this.SendPropertyChanged("CheckTeam"); + this.OnCheckTeamChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationResult", DbType="NVarChar(2000)")] + public string EvaluationResult + { + get + { + return this._EvaluationResult; + } + set + { + if ((this._EvaluationResult != value)) + { + this.OnEvaluationResultChanging(value); + this.SendPropertyChanging(); + this._EvaluationResult = value; + this.SendPropertyChanged("EvaluationResult"); + this.OnEvaluationResultChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsIssued", DbType="Char(1)")] + public string IsIssued + { + get + { + return this._IsIssued; + } + set + { + if ((this._IsIssued != value)) + { + this.OnIsIssuedChanging(value); + this.SendPropertyChanging(); + this._IsIssued = value; + this.SendPropertyChanged("IsIssued"); + this.OnIsIssuedChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckType", DbType="Char(1)")] + public string CheckType + { + get + { + return this._CheckType; + } + set + { + if ((this._CheckType != value)) + { + this.OnCheckTypeChanging(value); + this.SendPropertyChanging(); + this._CheckType = value; + this.SendPropertyChanged("CheckType"); + this.OnCheckTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Supervise_SuperviseCheckReport.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckReport.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Supervise_SuperviseCheckReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReportItem_Supervise_SuperviseCheckReport", Storage="_Supervise_SuperviseCheckReportItem", ThisKey="SuperviseCheckReportId", OtherKey="SuperviseCheckReportId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckReportItem + { + get + { + return this._Supervise_SuperviseCheckReportItem; + } + set + { + this._Supervise_SuperviseCheckReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Supervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckReport = this; + } + + private void detach_Supervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SuperviseCheckReportItem")] + public partial class Supervise_SuperviseCheckReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SuperviseCheckReportItemId; + + private string _SuperviseCheckReportId; + + private string _RectifyItemId; + + private System.Nullable _IsSelected; + + private string _AttachUrl; + + private EntityRef _Supervise_SuperviseCheckReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSuperviseCheckReportItemIdChanging(string value); + partial void OnSuperviseCheckReportItemIdChanged(); + partial void OnSuperviseCheckReportIdChanging(string value); + partial void OnSuperviseCheckReportIdChanged(); + partial void OnRectifyItemIdChanging(string value); + partial void OnRectifyItemIdChanged(); + partial void OnIsSelectedChanging(System.Nullable value); + partial void OnIsSelectedChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + #endregion + + public Supervise_SuperviseCheckReportItem() + { + this._Supervise_SuperviseCheckReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SuperviseCheckReportItemId + { + get + { + return this._SuperviseCheckReportItemId; + } + set + { + if ((this._SuperviseCheckReportItemId != value)) + { + this.OnSuperviseCheckReportItemIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportItemId = value; + this.SendPropertyChanged("SuperviseCheckReportItemId"); + this.OnSuperviseCheckReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckReportId + { + get + { + return this._SuperviseCheckReportId; + } + set + { + if ((this._SuperviseCheckReportId != value)) + { + if (this._Supervise_SuperviseCheckReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSuperviseCheckReportIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportId = value; + this.SendPropertyChanged("SuperviseCheckReportId"); + this.OnSuperviseCheckReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyItemId", DbType="NVarChar(50)")] + public string RectifyItemId + { + get + { + return this._RectifyItemId; + } + set + { + if ((this._RectifyItemId != value)) + { + this.OnRectifyItemIdChanging(value); + this.SendPropertyChanging(); + this._RectifyItemId = value; + this.SendPropertyChanged("RectifyItemId"); + this.OnRectifyItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSelected", DbType="Bit")] + public System.Nullable IsSelected + { + get + { + return this._IsSelected; + } + set + { + if ((this._IsSelected != value)) + { + this.OnIsSelectedChanging(value); + this.SendPropertyChanging(); + this._IsSelected = value; + this.SendPropertyChanged("IsSelected"); + this.OnIsSelectedChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReportItem_Supervise_SuperviseCheckReport", Storage="_Supervise_SuperviseCheckReport", ThisKey="SuperviseCheckReportId", OtherKey="SuperviseCheckReportId", IsForeignKey=true)] + public Supervise_SuperviseCheckReport Supervise_SuperviseCheckReport + { + get + { + return this._Supervise_SuperviseCheckReport.Entity; + } + set + { + Supervise_SuperviseCheckReport previousValue = this._Supervise_SuperviseCheckReport.Entity; + if (((previousValue != value) + || (this._Supervise_SuperviseCheckReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Supervise_SuperviseCheckReport.Entity = null; + previousValue.Supervise_SuperviseCheckReportItem.Remove(this); + } + this._Supervise_SuperviseCheckReport.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckReportItem.Add(this); + this._SuperviseCheckReportId = value.SuperviseCheckReportId; + } + else + { + this._SuperviseCheckReportId = default(string); + } + this.SendPropertyChanged("Supervise_SuperviseCheckReport"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SYHSEData_Data")] public partial class SYHSEData_Data : INotifyPropertyChanging, INotifyPropertyChanged { @@ -220731,7 +228196,7 @@ namespace Model { } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(100)")] public string ToKeyId { get @@ -236807,6 +244272,8 @@ namespace Model private string _TwoJointType; + private System.Nullable _WeldingDateD; + private string _WeldingDate; private string _BackingWelderCode; @@ -237971,6 +245438,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDateD", DbType="DateTime")] + public System.Nullable WeldingDateD + { + get + { + return this._WeldingDateD; + } + set + { + if ((this._WeldingDateD != value)) + { + this._WeldingDateD = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="VarChar(100)")] public string WeldingDate { @@ -245576,7 +253059,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(100)")] public string ToKeyId { get diff --git a/SGGL/SGGL.sln b/SGGL/SGGL.sln index 721038cf..c04800eb 100644 --- a/SGGL/SGGL.sln +++ b/SGGL/SGGL.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.2017 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FineUIPro.Web", "FineUIPro.Web\FineUIPro.Web.csproj", "{C88D3156-2D56-4DB0-922E-1995FB61C9BD}" EndProject