From 3f158f1a709a50e6ce04934512926be29f9092cc Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Tue, 7 Mar 2023 23:01:04 +0800 Subject: [PATCH] =?UTF-8?q?2023-03-07=20=20=E5=A2=9E=E5=8A=A0=E5=AE=9E?= =?UTF-8?q?=E4=B8=9A=E6=95=B0=E6=8D=AE=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/实业/v17/.wsuo | Bin 0 -> 107008 bytes ...DB_CD_2023-03-07_子公司实业脚本.sql | 209 +++ .../0-4项目清单(Menu_Project).sql | 13 + .../0-8综合管理(Menu_ZHGL).sql | 12 + SGGL/BLL/BLL.csproj | 5 + SGGL/BLL/BaseInfo/BaseFactoryService.cs | 167 +++ SGGL/BLL/Common/Const.cs | 8 + SGGL/BLL/SysManage/SysConstSetService.cs | 2 + SGGL/BLL/SysManage/UnitService.cs | 14 + .../DataSync/Hazard_RealTimeDeviceService.cs | 278 ++++ .../ZHGL/DataSync/SYHSEData_DataService.cs | 245 ++++ .../SYHSEData_HiddenDangerCheckService.cs | 153 +++ .../DataSync/SYHSEData_RiskControlService.cs | 147 +++ SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx | 121 ++ .../BaseInfo/BaseFactory.aspx.cs | 249 ++++ .../BaseInfo/BaseFactory.aspx.designer.cs | 161 +++ .../BaseInfo/BaseFactoryEdit.aspx | 58 + .../BaseInfo/BaseFactoryEdit.aspx.cs | 113 ++ .../BaseInfo/BaseFactoryEdit.aspx.designer.cs | 107 ++ SGGL/FineUIPro.Web/ErrLog.txt | 182 +++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 32 + SGGL/FineUIPro.Web/Web.config | 10 +- .../ZHGL/DataSync/SYHSEData_Data.aspx | 131 ++ .../ZHGL/DataSync/SYHSEData_Data.aspx.cs | 249 ++++ .../DataSync/SYHSEData_Data.aspx.designer.cs | 161 +++ .../ZHGL/DataSync/SYHSEData_DataEdit.aspx | 282 +++++ .../ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs | 334 +++++ .../SYHSEData_DataEdit.aspx.designer.cs | 476 +++++++ SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_Project.xml | 1 + SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 1 + SGGL/Model/APIItem/SHHSE/NewSYHSEData.cs | 20 + .../NewSYHSEDataHiddenDangerCheckItem.cs | 47 + SGGL/Model/APIItem/SHHSE/NewSYHSEDataItem.cs | 167 +++ .../SHHSE/NewSYHSEDataRealTimeDeviceItem.cs | 83 ++ .../SHHSE/NewSYHSEDataRiskControlItem.cs | 29 + SGGL/Model/Model.cs | 1120 +++++++++++++++++ SGGL/Model/Model.csproj | 5 + 38 files changed, 5390 insertions(+), 4 deletions(-) create mode 100644 .vs/实业/v17/.wsuo create mode 100644 DataBase/版本日志/SGGLDB_CD_2023-03-07_子公司实业脚本.sql create mode 100644 SGGL/BLL/BaseInfo/BaseFactoryService.cs create mode 100644 SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs create mode 100644 SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs create mode 100644 SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs create mode 100644 SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.designer.cs create mode 100644 SGGL/Model/APIItem/SHHSE/NewSYHSEData.cs create mode 100644 SGGL/Model/APIItem/SHHSE/NewSYHSEDataHiddenDangerCheckItem.cs create mode 100644 SGGL/Model/APIItem/SHHSE/NewSYHSEDataItem.cs create mode 100644 SGGL/Model/APIItem/SHHSE/NewSYHSEDataRealTimeDeviceItem.cs create mode 100644 SGGL/Model/APIItem/SHHSE/NewSYHSEDataRiskControlItem.cs diff --git a/.vs/实业/v17/.wsuo b/.vs/实业/v17/.wsuo new file mode 100644 index 0000000000000000000000000000000000000000..ce6855b290771d7d902611ca9e738494dae2539d GIT binary patch literal 107008 zcmeI5d7NffS?6yzgk6+HLChY9olXRVUaC6j^h#Ah(#T+g zJ3Gj#5J3SkB7*Fq7y`JWFbp${&Wy_pI^#IvEPu@B;|wsr?|tg@z2}~D-uFKDRsbE| zZ@HSOwpOR~bFn(hQucm5q`KhzdS5W*s&AWJ z{QW=M^CxTW%lGbSU*02(r>mQ*?ZSRkziq8qxUgEgroGgq@3r6m7X9(kl{a=*&k>dr)iKSVabpYf z7QM6BzA*DU`0uXw(apZ|{|ph20VYb#v?QysqxP=W;DKAW1YtLXk4iAy&8|wxJcvC z8sDe!7>&njJWk_cjrAIj*SJLEQjHB7muYO&c!I{|8c)=?LgPw}t2Dk}<4GDnpz&ml zf37jBF{iOfW3$Ekj7z+BO3D>$lFnk8#QjyIHqy4#&L}k8YeYQ zX`I$Lqw#DFWMoNWS>rhx&(*j^15HAkp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ngK+g3i9gnzT-4~Zkw zZcc#-`+Q~tpRDy~J+-UU8~+-8H>`hO{FeJzlzS$&ziaL(c;Dr~udklR@6kVdDlnda zUAkq!RLtMI{`f1_j8_`}g&Gv`*7VoR0Q~SCAIPhVAL~Lycw9c1Cv?Z&&aP?y`)J`O z2YH}IU-`SQzPoM(NEd%O%U-#l^F#K>9sk{5F#h^9Qkc#^!~@pbm+KdbS7k{2Nvsyu zza~Qe{P|y3@U&tgQZFQE@`wF292QY45!^{&xJ^oxkmd zlYyL#azU<`&U48@#pPd+e`%CQgjiUef0?VBgj}Ndv-?Se{ I!SL7r1MFY4oB#j- literal 0 HcmV?d00001 diff --git a/DataBase/版本日志/SGGLDB_CD_2023-03-07_子公司实业脚本.sql b/DataBase/版本日志/SGGLDB_CD_2023-03-07_子公司实业脚本.sql new file mode 100644 index 00000000..ef6e3a29 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_2023-03-07_子公司实业脚本.sql @@ -0,0 +1,209 @@ + +CREATE TABLE [dbo].[Base_Factory]( + [FactoryId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [FactoryCode] [nvarchar](100) NULL, + [FactoryName] [nvarchar](100) NULL, + [Address] [nvarchar](500) NULL, + CONSTRAINT [PK_Base_Factory] PRIMARY KEY CLUSTERED +( + [FactoryId] 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].[Base_Factory] WITH CHECK ADD CONSTRAINT [FK_Base_Factory_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Base_Factory] CHECK CONSTRAINT [FK_Base_Factory_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Factory', @level2type=N'COLUMN',@level2name=N'FactoryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Factory', @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'Base_Factory', @level2type=N'COLUMN',@level2name=N'FactoryCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Factory', @level2type=N'COLUMN',@level2name=N'FactoryName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ַ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Factory', @level2type=N'COLUMN',@level2name=N'Address' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Factory' +GO + + + +CREATE TABLE [dbo].[SYHSEData_Data]( + [Id] [nvarchar](50) NOT NULL, + [FactoryId] [nvarchar](50) NULL, + [SafetyMnaHours] [int] NULL, + [GeneralRiskNum] [int] NULL, + [LowRiskNum] [int] NULL, + [MoreRiskNum] [int] NULL, + [GreatRiskNum] [int] NULL, + [ReportDate] [datetime] NULL, + CONSTRAINT [PK_SYHSEData_Data] PRIMARY KEY CLUSTERED +( + [Id] 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].[SYHSEData_Data] WITH CHECK ADD CONSTRAINT [FK_SYHSEData_Data_Base_Factory] FOREIGN KEY([FactoryId]) +REFERENCES [dbo].[Base_Factory] ([FactoryId]) +GO + +ALTER TABLE [dbo].[SYHSEData_Data] CHECK CONSTRAINT [FK_SYHSEData_Data_Base_Factory] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'Id' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'FactoryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫ˹ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'SafetyMnaHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'һ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'GeneralRiskNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͷ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'LowRiskNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'MoreRiskNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ش' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'GreatRiskNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data', @level2type=N'COLUMN',@level2name=N'ReportDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵҵݱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_Data' +GO + + + +CREATE TABLE [dbo].[SYHSEData_RiskControl]( + [Id] [nvarchar](50) NOT NULL, + [FactoryId] [nvarchar](50) NULL, + [RiskControlName] [nvarchar](500) NULL, + [ReportDate] [datetime] NULL, + CONSTRAINT [PK_SYHSEData_RiskControl] PRIMARY KEY CLUSTERED +( + [Id] 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].[SYHSEData_RiskControl] WITH CHECK ADD CONSTRAINT [FK_SYHSEData_RiskControl_Base_Factory] FOREIGN KEY([FactoryId]) +REFERENCES [dbo].[Base_Factory] ([FactoryId]) +GO + +ALTER TABLE [dbo].[SYHSEData_RiskControl] CHECK CONSTRAINT [FK_SYHSEData_RiskControl_Base_Factory] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_RiskControl', @level2type=N'COLUMN',@level2name=N'Id' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_RiskControl', @level2type=N'COLUMN',@level2name=N'FactoryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'չܿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_RiskControl', @level2type=N'COLUMN',@level2name=N'RiskControlName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_RiskControl', @level2type=N'COLUMN',@level2name=N'ReportDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'չܿر' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_RiskControl' +GO + + + +alter table Hazard_RealTimeDevice add Value nvarchar(50) null +alter table Hazard_RealTimeDevice add FactoryId nvarchar(50) null +alter table Hazard_RealTimeDevice add ReportDate datetime null +alter table Hazard_RealTimeDevice add ReceiveDate nvarchar(50) null +GO + + + + +CREATE TABLE [dbo].[SYHSEData_HiddenDangerCheck]( + [Id] [nvarchar](50) NOT NULL, + [FactoryId] [nvarchar](50) NULL, + [HiddenDangerName] [nvarchar](50) NULL, + [TotalNum] [int] NULL, + [OKNum] [int] NULL, + [ReportDate] [datetime] NULL, + CONSTRAINT [PK_SYHSEData_HiddenDangerCheck] PRIMARY KEY CLUSTERED +( + [Id] 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].[SYHSEData_HiddenDangerCheck] WITH CHECK ADD CONSTRAINT [FK_SYHSEData_HiddenDangerCheck_Base_Factory] FOREIGN KEY([FactoryId]) +REFERENCES [dbo].[Base_Factory] ([FactoryId]) +GO + +ALTER TABLE [dbo].[SYHSEData_HiddenDangerCheck] CHECK CONSTRAINT [FK_SYHSEData_HiddenDangerCheck_Base_Factory] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'Id' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'FactoryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'HiddenDangerName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'TotalNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'OKNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck', @level2type=N'COLUMN',@level2name=N'ReportDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ų' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYHSEData_HiddenDangerCheck' +GO + + + + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('CD167198-1667-4552-9876-E768C2542C30','ʵҵϢ','BaseInfo/BaseFactory.aspx',20,'0','Menu_Project',1,1,1) +GO + + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('0CD166ED-11FC-443D-AC15-4AB80E5B1A41','CD167198-1667-4552-9876-E768C2542C30','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3F74BCAB-AF0C-4B9F-83F6-460E95C7EDFA','CD167198-1667-4552-9876-E768C2542C30','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B05D993D-2905-474B-9087-84EABADAD005','CD167198-1667-4552-9876-E768C2542C30','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7AD48DC9-F962-4C71-9518-3193F0E8634A','CD167198-1667-4552-9876-E768C2542C30','',4) + GO +INSERT Sys_Menu (MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES ( N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'ʵҵ','ZHGL/DataSync/SYHSEData_Data.aspx',40,N'1E216BE3-DB22-4649-BD9A-0777B0DC03E6',N'Menu_ZHGL',1,1,1) +GO + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'7F8BA66D-DB63-4DBB-9EB6-73F0280CFA30',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'',1) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'EB3B7C26-E1A0-4498-8089-35637CC6DF26',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'޸',2) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'968693EE-8FE8-482A-AF0C-B08D919EF933',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'ɾ',3) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'8C6B85C3-81C9-4F7E-95C4-576DB34F3B18',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'',4) + +GO diff --git a/DataBase/菜单初始化脚本/0-4项目清单(Menu_Project).sql b/DataBase/菜单初始化脚本/0-4项目清单(Menu_Project).sql index bf645a64..5a414068 100644 --- a/DataBase/菜单初始化脚本/0-4项目清单(Menu_Project).sql +++ b/DataBase/菜单初始化脚本/0-4项目清单(Menu_Project).sql @@ -7,6 +7,19 @@ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffi VALUES('B95DF6F0-EB0C-4120-BD56-A4453AB42059','Ŀб','ProjectData/ProjectList.aspx',10,'0','Menu_Project',1,1,1) GO +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('CD167198-1667-4552-9876-E768C2542C30','ʵҵϢ','BaseInfo/BaseFactory.aspx',20,'0','Menu_Project',1,1,1) +GO + + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('0CD166ED-11FC-443D-AC15-4AB80E5B1A41','CD167198-1667-4552-9876-E768C2542C30','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3F74BCAB-AF0C-4B9F-83F6-460E95C7EDFA','CD167198-1667-4552-9876-E768C2542C30','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B05D993D-2905-474B-9087-84EABADAD005','CD167198-1667-4552-9876-E768C2542C30','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7AD48DC9-F962-4C71-9518-3193F0E8634A','CD167198-1667-4552-9876-E768C2542C30','',4) + GO --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('B95DF6F0-EB0C-4120-BD56-A4453AB42059','ĿʩۺϢ','ProjectData/ProjectInformation.aspx',20,'0','Menu_Project',1,1,1) --GO diff --git a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql index 26335c38..449b7ab5 100644 --- a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql +++ b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql @@ -396,6 +396,18 @@ GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('214A1AE1-816E-4DDA-8E6E-04EB35F02A12','现场人员','ZHGL/RealName/OnPost.aspx',40,'D78C6E54-4240-4E82-B9B5-8ED76CF62981','Menu_ZHGL',1,1,1) GO + + + +INSERT Sys_Menu (MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES ( N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'实业数据','ZHGL/DataSync/SYHSEData_Data.aspx',40,N'1E216BE3-DB22-4649-BD9A-0777B0DC03E6',N'Menu_ZHGL',1,1,1) +GO + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'7F8BA66D-DB63-4DBB-9EB6-73F0280CFA30',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'增加',1) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'EB3B7C26-E1A0-4498-8089-35637CC6DF26',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'修改',2) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'968693EE-8FE8-482A-AF0C-B08D919EF933',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'删除',3) + INSERT Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES ( N'8C6B85C3-81C9-4F7E-95C4-576DB34F3B18',N'S89E5EC2-F725-4656-9110-5AF83C18FB6C',N'保存',4) + +GO ----本部综合管理 --INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('A57CBE1D-B9F4-4FB6-A428-10197734AAB6','数据统计','',30,'0','Menu_ZHGL',1,0,1) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 31434b9c..9e18c528 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -182,6 +182,7 @@ + @@ -770,6 +771,7 @@ + @@ -781,6 +783,8 @@ + + @@ -818,6 +822,7 @@ + diff --git a/SGGL/BLL/BaseInfo/BaseFactoryService.cs b/SGGL/BLL/BaseInfo/BaseFactoryService.cs new file mode 100644 index 00000000..e490be6d --- /dev/null +++ b/SGGL/BLL/BaseInfo/BaseFactoryService.cs @@ -0,0 +1,167 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class Base_FactoryService + { + public static Model.SGGLDB db = Funs.DB; + + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + public static List GetBase_FactoryByModle(Model.Base_Factory table) + { + var q = from x in db.Base_Factory + where + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && + (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && + (string.IsNullOrEmpty(table.FactoryCode) || x.FactoryCode.Contains(table.FactoryCode)) && + (string.IsNullOrEmpty(table.FactoryName) || x.FactoryName.Contains(table.FactoryName)) && + (string.IsNullOrEmpty(table.Address) || x.Address.Contains(table.Address)) + select x + ; + + return q.ToList(); + } + public static List GetBase_FactoryList() + { + var q = (from x in db.Base_Factory orderby x.FactoryCode select x).ToList(); + + + return q; + } + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(Model.Base_Factory table, Grid Grid1) + { + var q = GetBase_FactoryByModle(table); + count = q.Count(); + if (count == 0) + { + return null; + } + // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.FactoryId, + x.UnitId, + x.FactoryCode, + x.FactoryName, + x.Address, + + }; + } + #endregion + + public static Model.Base_Factory GetBase_FactoryById(string FactoryId) + { + return db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId); + } + public static string GetBase_FactoryNameById(object FactoryId) + { + string name = string.Empty; + if (FactoryId!=null) + { + var model = db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId.ToString()); + if (model != null) + { + name = model.FactoryName; + } + + } + return name; + } + public static Model.Base_Factory GetBase_FactoryByCode(string FactoryCode) + { + return db.Base_Factory.FirstOrDefault(x => x.FactoryCode == FactoryCode); + } + public static void AddBase_Factory(Model.Base_Factory newtable) + { + + Model.Base_Factory table = new Model.Base_Factory + { + FactoryId = newtable.FactoryId, + UnitId = newtable.UnitId, + FactoryCode = newtable.FactoryCode, + FactoryName = newtable.FactoryName, + Address = newtable.Address, + }; + db.Base_Factory.InsertOnSubmit(table); + db.SubmitChanges(); + } + + public static void AddBulkBase_Factory(List newtables) + { + + db.Base_Factory.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } + + + public static void UpdateBase_Factory(Model.Base_Factory newtable) + { + + Model.Base_Factory table = db.Base_Factory.FirstOrDefault(x => x.FactoryId == newtable.FactoryId); + if (table != null) + { + table.FactoryId = newtable.FactoryId; + table.UnitId = newtable.UnitId; + table.FactoryCode = newtable.FactoryCode; + table.FactoryName = newtable.FactoryName; + table.Address = newtable.Address; + db.SubmitChanges(); + } + + } + public static void DeleteBase_FactoryById(string FactoryId) + { + + Model.Base_Factory table = db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId); + if (table != null) + { + db.Base_Factory.DeleteOnSubmit(table); + db.SubmitChanges(); + } + + } + + public static void DeleteALLBase_Factory() + { + if (db.Base_Factory != null) + { + db.Base_Factory.DeleteAllOnSubmit(db.Base_Factory); + db.SubmitChanges(); + } + } + public static void InitBase_FactoryDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "FactoryId"; + dropName.DataTextField = "FactoryName"; + dropName.DataSource = GetBase_FactoryList(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 4a1d0a83..1e1423c6 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -344,6 +344,8 @@ namespace BLL /// 温度设置 /// public const string HJGL_TemperatureSetMenuId = "A083BF37-745F-409F-9C3A-BC2FBC755757"; + + public const string Base_FactoryMenuId = "CD167198-1667-4552-9876-E768C2542C30"; #endregion #region 人员管理 @@ -5789,6 +5791,12 @@ namespace BLL /// 实业数据 /// public const string SYHSEData_SYHSEMenuId = "64EE5EC2-F725-4656-9110-5AF83C18FB6C"; + /// + /// 实业 + /// + public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C"; + + #endregion #region 数据同步状态 diff --git a/SGGL/BLL/SysManage/SysConstSetService.cs b/SGGL/BLL/SysManage/SysConstSetService.cs index 743ec221..57e847fe 100644 --- a/SGGL/BLL/SysManage/SysConstSetService.cs +++ b/SGGL/BLL/SysManage/SysConstSetService.cs @@ -83,6 +83,7 @@ newSysSet5.SetValue = token; } newSysSet5.SetName = "token"; + newSysSet5.SetId = 99; Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5); Funs.DB.SubmitChanges(); } @@ -106,6 +107,7 @@ newSysSet5.SetValue = ExpirationTime; } newSysSet5.SetName = "token失效时间"; + newSysSet5.SetId = 98; Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5); Funs.DB.SubmitChanges(); } diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 60d738d0..1a1920b9 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -332,6 +332,20 @@ namespace BLL } return name; } + public static string GetUnitNameByUnitId(object unitId) + { + string name = string.Empty; + if (unitId != null) + { + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == unitId.ToString()); + if (unit != null) + { + name = unit.UnitName; + } + } + + return name; + } public static string GetInstallationNameByUnitId(string installationId) { string name = string.Empty; diff --git a/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs new file mode 100644 index 00000000..ba6f0cad --- /dev/null +++ b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs @@ -0,0 +1,278 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class HazardRealtimedeviceService + { + public static Model.SGGLDB db = Funs.DB; + + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + public static List GetHazard_RealTimeDeviceByModle(Model.Hazard_RealTimeDevice table) + { + var q = from x in db.Hazard_RealTimeDevice + where + (string.IsNullOrEmpty(table.ID) || x.ID.Contains(table.ID)) && + (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && + (string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) && + (string.IsNullOrEmpty(table.HazardName) || x.HazardName.Contains(table.HazardName)) && + (string.IsNullOrEmpty(table.HazardLevel) || x.HazardLevel.Contains(table.HazardLevel)) && + (string.IsNullOrEmpty(table.DeviceCode) || x.DeviceCode.Contains(table.DeviceCode)) && + (string.IsNullOrEmpty(table.DeviceName) || x.DeviceName.Contains(table.DeviceName)) && + (string.IsNullOrEmpty(table.DeviceType) || x.DeviceType.Contains(table.DeviceType)) && + (string.IsNullOrEmpty(table.SphereType) || x.SphereType.Contains(table.SphereType)) && + (string.IsNullOrEmpty(table.TemperatureType) || x.TemperatureType.Contains(table.TemperatureType)) && + (string.IsNullOrEmpty(table.DesignTemperantureMax) || x.DesignTemperantureMax.Contains(table.DesignTemperantureMax)) && + (string.IsNullOrEmpty(table.DesignTemperantureMin) || x.DesignTemperantureMin.Contains(table.DesignTemperantureMin)) && + (string.IsNullOrEmpty(table.PressureType) || x.PressureType.Contains(table.PressureType)) && + (string.IsNullOrEmpty(table.DesignPressure) || x.DesignPressure.Contains(table.DesignPressure)) && + (string.IsNullOrEmpty(table.DesignPressureMax) || x.DesignPressureMax.Contains(table.DesignPressureMax)) && + (string.IsNullOrEmpty(table.Medium) || x.Medium.Contains(table.Medium)) && + (string.IsNullOrEmpty(table.MediumForm) || x.MediumForm.Contains(table.MediumForm)) && + (string.IsNullOrEmpty(table.MediumLevelMax) || x.MediumLevelMax.Contains(table.MediumLevelMax)) && + (string.IsNullOrEmpty(table.Reserves) || x.Reserves.Contains(table.Reserves)) && + (string.IsNullOrEmpty(table.StandardCode) || x.StandardCode.Contains(table.StandardCode)) && + (string.IsNullOrEmpty(table.StandardName) || x.StandardName.Contains(table.StandardName)) && + (string.IsNullOrEmpty(table.StandardType) || x.StandardType.Contains(table.StandardType)) && + (string.IsNullOrEmpty(table.StandardDes) || x.StandardDes.Contains(table.StandardDes)) && + (string.IsNullOrEmpty(table.MeasurementUnit) || x.MeasurementUnit.Contains(table.MeasurementUnit)) && + (string.IsNullOrEmpty(table.MeterMax) || x.MeterMax.Contains(table.MeterMax)) && + (string.IsNullOrEmpty(table.MeterMin) || x.MeterMin.Contains(table.MeterMin)) && + (string.IsNullOrEmpty(table.ThresholdLow1) || x.ThresholdLow1.Contains(table.ThresholdLow1)) && + (string.IsNullOrEmpty(table.ThresholdLow2) || x.ThresholdLow2.Contains(table.ThresholdLow2)) && + (string.IsNullOrEmpty(table.ThresholdMax1) || x.ThresholdMax1.Contains(table.ThresholdMax1)) && + (string.IsNullOrEmpty(table.ThresholdMax2) || x.ThresholdMax2.Contains(table.ThresholdMax2)) && + (string.IsNullOrEmpty(table.BitNum) || x.BitNum.Contains(table.BitNum)) && + (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && + (string.IsNullOrEmpty(table.Value) || x.Value.Contains(table.Value)) && + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && + (string.IsNullOrEmpty(table.ReceiveDate) || x.ReceiveDate.Contains(table.ReceiveDate)) + select x + ; + + return q.ToList(); + } + + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(Model.Hazard_RealTimeDevice table, Grid Grid1) + { + var q = GetHazard_RealTimeDeviceByModle(table); + count = q.Count(); + if (count == 0) + { + return null; + } + // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.ID, + x.UnitId, + x.UnitName, + x.HazardName, + x.HazardLevel, + x.DeviceCode, + x.DeviceName, + x.DeviceType, + x.SphereType, + x.TemperatureType, + x.DesignTemperantureMax, + x.DesignTemperantureMin, + x.PressureType, + x.DesignPressure, + x.DesignPressureMax, + x.Medium, + x.MediumForm, + x.MediumLevelMax, + x.Reserves, + x.StandardCode, + x.StandardName, + x.StandardType, + x.StandardDes, + x.MeasurementUnit, + x.MeterMax, + x.MeterMin, + x.ThresholdLow1, + x.ThresholdLow2, + x.ThresholdMax1, + x.ThresholdMax2, + x.BitNum, + x.DateTime, + x.ProjectId, + x.Value, + x.FactoryId, + x.ReportDate, + x.ReceiveDate, + + }; + } + #endregion + + public static Model.Hazard_RealTimeDevice GetHazard_RealTimeDeviceById(string ID) + { + return db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID); + } + + + public static void AddHazard_RealTimeDevice(Model.Hazard_RealTimeDevice newtable) + { + + Model.Hazard_RealTimeDevice table = new Model.Hazard_RealTimeDevice + { + ID = newtable.ID, + UnitId = newtable.UnitId, + UnitName = newtable.UnitName, + HazardName = newtable.HazardName, + HazardLevel = newtable.HazardLevel, + DeviceCode = newtable.DeviceCode, + DeviceName = newtable.DeviceName, + DeviceType = newtable.DeviceType, + SphereType = newtable.SphereType, + TemperatureType = newtable.TemperatureType, + DesignTemperantureMax = newtable.DesignTemperantureMax, + DesignTemperantureMin = newtable.DesignTemperantureMin, + PressureType = newtable.PressureType, + DesignPressure = newtable.DesignPressure, + DesignPressureMax = newtable.DesignPressureMax, + Medium = newtable.Medium, + MediumForm = newtable.MediumForm, + MediumLevelMax = newtable.MediumLevelMax, + Reserves = newtable.Reserves, + StandardCode = newtable.StandardCode, + StandardName = newtable.StandardName, + StandardType = newtable.StandardType, + StandardDes = newtable.StandardDes, + MeasurementUnit = newtable.MeasurementUnit, + MeterMax = newtable.MeterMax, + MeterMin = newtable.MeterMin, + ThresholdLow1 = newtable.ThresholdLow1, + ThresholdLow2 = newtable.ThresholdLow2, + ThresholdMax1 = newtable.ThresholdMax1, + ThresholdMax2 = newtable.ThresholdMax2, + BitNum = newtable.BitNum, + DateTime = newtable.DateTime, + ProjectId = newtable.ProjectId, + Value = newtable.Value, + FactoryId = newtable.FactoryId, + ReportDate = newtable.ReportDate, + ReceiveDate = newtable.ReceiveDate, + }; + db.Hazard_RealTimeDevice.InsertOnSubmit(table); + db.SubmitChanges(); + } + + public static void AddBulkHazard_RealTimeDevice(List newtables) + { + + db.Hazard_RealTimeDevice.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } + + + public static void UpdateHazard_RealTimeDevice(Model.Hazard_RealTimeDevice newtable) + { + + Model.Hazard_RealTimeDevice table = db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == newtable.ID); + if (table != null) + { + table.ID = newtable.ID; + table.UnitId = newtable.UnitId; + table.UnitName = newtable.UnitName; + table.HazardName = newtable.HazardName; + table.HazardLevel = newtable.HazardLevel; + table.DeviceCode = newtable.DeviceCode; + table.DeviceName = newtable.DeviceName; + table.DeviceType = newtable.DeviceType; + table.SphereType = newtable.SphereType; + table.TemperatureType = newtable.TemperatureType; + table.DesignTemperantureMax = newtable.DesignTemperantureMax; + table.DesignTemperantureMin = newtable.DesignTemperantureMin; + table.PressureType = newtable.PressureType; + table.DesignPressure = newtable.DesignPressure; + table.DesignPressureMax = newtable.DesignPressureMax; + table.Medium = newtable.Medium; + table.MediumForm = newtable.MediumForm; + table.MediumLevelMax = newtable.MediumLevelMax; + table.Reserves = newtable.Reserves; + table.StandardCode = newtable.StandardCode; + table.StandardName = newtable.StandardName; + table.StandardType = newtable.StandardType; + table.StandardDes = newtable.StandardDes; + table.MeasurementUnit = newtable.MeasurementUnit; + table.MeterMax = newtable.MeterMax; + table.MeterMin = newtable.MeterMin; + table.ThresholdLow1 = newtable.ThresholdLow1; + table.ThresholdLow2 = newtable.ThresholdLow2; + table.ThresholdMax1 = newtable.ThresholdMax1; + table.ThresholdMax2 = newtable.ThresholdMax2; + table.BitNum = newtable.BitNum; + table.DateTime = newtable.DateTime; + table.ProjectId = newtable.ProjectId; + table.Value = newtable.Value; + table.FactoryId = newtable.FactoryId; + table.ReportDate = newtable.ReportDate; + table.ReceiveDate = newtable.ReceiveDate; + db.SubmitChanges(); + } + + } + public static void DeleteHazard_RealTimeDeviceById(string ID) + { + + Model.Hazard_RealTimeDevice table = db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID); + if (table != null) + { + db.Hazard_RealTimeDevice.DeleteOnSubmit(table); + db.SubmitChanges(); + } + + } + + public static void DeleteALLHazard_RealTimeDevice() + { + if (db.Hazard_RealTimeDevice != null) + { + db.Hazard_RealTimeDevice.DeleteAllOnSubmit(db.Hazard_RealTimeDevice); + db.SubmitChanges(); + } + } + public static List GetHazard_RealTimeDeviceByDate(DateTime? reportDate) + { + var q = from x in db.Hazard_RealTimeDevice + where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 + select x; + return q.ToList(); + } + public static void DeleteHazard_RealTimeDeviceByDate(DateTime? reportDate) + { + + var table = db.Hazard_RealTimeDevice.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.Hazard_RealTimeDevice.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs new file mode 100644 index 00000000..d26fa414 --- /dev/null +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs @@ -0,0 +1,245 @@ +using FineUIPro; +using Model; +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class SYHSEData_DataService + { + public static Model.SGGLDB db = Funs.DB; + + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + public static List GetSYHSEData_DataByModle(Model.SYHSEData_Data table) + { + var q = from x in db.SYHSEData_Data + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) + select x + ; + + return q.ToList(); + } + + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(Model.SYHSEData_Data table, Grid Grid1) + { + var q = GetSYHSEData_DataByModle(table); + count = q.Count(); + if (count == 0) + { + return null; + } + // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.FactoryId, + x.SafetyMnaHours, + x.GeneralRiskNum, + x.LowRiskNum, + x.MoreRiskNum, + x.GreatRiskNum, + x.ReportDate, + + }; + } + #endregion + public static bool IsReportByDate(DateTime dateTime) + { + var result = false; + var q = (from x in Funs.DB.SYHSEData_Data + where x.ReportDate >= dateTime.Date && x.ReportDate < (dateTime.Date.AddDays(1).Date) + select x).ToList(); + if (q != null && q.Count > 0) + { + result = true; + } + return result; + } + public static Model.ReturnData PushCNCEC(string Id) + { + string baseurl = "/api/SYHSEData/SaveNewSYHSEData"; + var item = GetItemById(Id); + string str = JsonConvert.SerializeObject(item); + var responeData = BLL.ServerService.PushCNCEC(str, baseurl); + return responeData; + } + public static Model.NewSYHSEData GetItemById(string Id) + { + var data=GetSYHSEData_DataById(Id); + var data_realtime = HazardRealtimedeviceService.GetHazard_RealTimeDeviceByDate(data.ReportDate); + var data_hidden= SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(data.ReportDate); + var data_risk= SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(data.ReportDate); + + + NewSYHSEData APIData = new NewSYHSEData(); + var APIDataList_Item= new List(); + var APIDataList_Relatime= new List(); + var APIDataList_Hidden= new List(); + var APIDataList_Risk= new List(); + + foreach (var tb in data_realtime) + { + var q = new NewSYHSEDataRealTimeDeviceItem() + { + Id=tb.ID, + HazardName=tb.HazardName, + HazardLevel=tb.HazardLevel, + DeviceName=tb.DeviceName, + Medium=tb.Medium, + MeasurementUnit=tb.MeasurementUnit, + DateTime=tb.DateTime.ToString(), + Value=tb.Value, + + }; + + APIDataList_Relatime.Add(q); + } + + foreach (var tb in data_hidden) + { + var q = new NewSYHSEDataHiddenDangerCheckItem() + { + Id=tb.Id, + HiddenDangerName=tb.HiddenDangerName, + TotalNum=tb.TotalNum.HasValue ? tb.TotalNum.Value:0, + OKNum=tb.OKNum.HasValue ? tb.OKNum.Value : 0, + + }; + APIDataList_Hidden.Add(q); + } + + foreach (var tb in data_risk) + { + + var q = new NewSYHSEDataRiskControlItem() + { + Id=tb.Id, + RiskControlName=tb.RiskControlName, + + }; + APIDataList_Risk.Add(q); + } + + NewSYHSEDataItem Item = new NewSYHSEDataItem(); + Item.Id = data.Id; + Item.ReportDate=data.ReportDate.ToString(); + Item.UnitId = Const.UnitId_CD; + Item.CollCropCode = UnitService.GetUnitByUnitId(Const.UnitId_CD).CollCropCode; + Item.UnitName= UnitService.GetUnitByUnitId(Const.UnitId_CD).UnitName; + Item.FactoryId = data.FactoryId; + Item.FactoryCode = BLL.Base_FactoryService.GetBase_FactoryById(data.FactoryId).FactoryCode; + Item.FactoryName = BLL.Base_FactoryService.GetBase_FactoryById(data.FactoryId).FactoryName; + Item.Address = BLL.Base_FactoryService.GetBase_FactoryById(data.FactoryId).Address; + Item.SafetyMnaHours = data.SafetyMnaHours.HasValue ? data.SafetyMnaHours.Value : 0; + Item.GeneralRiskNum = data.GeneralRiskNum.HasValue ? data.GeneralRiskNum.Value : 0; + Item.LowRiskNum = data.LowRiskNum.HasValue ? data.LowRiskNum.Value : 0; + Item.MoreRiskNum = data.MoreRiskNum.HasValue ? data.MoreRiskNum.Value : 0; + Item.GreatRiskNum = data.GreatRiskNum.HasValue ? data.GreatRiskNum.Value : 0; + Item.NewSYHSEDataRiskControlItems = APIDataList_Risk; + Item.NewSYHSEDataRealTimeDeviceItems = APIDataList_Relatime; + Item.NewSYHSEDataHiddenDangerCheckItems = APIDataList_Hidden; + + APIDataList_Item.Add(Item); + + APIData.NewSYHSEDataItems = APIDataList_Item; + + return APIData; + } + + public static Model.SYHSEData_Data GetSYHSEData_DataById(string Id) + { + return db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id); + } + + + public static void AddSYHSEData_Data(Model.SYHSEData_Data newtable) + { + + Model.SYHSEData_Data table = new Model.SYHSEData_Data + { + Id = newtable.Id, + FactoryId = newtable.FactoryId, + SafetyMnaHours = newtable.SafetyMnaHours, + GeneralRiskNum = newtable.GeneralRiskNum, + LowRiskNum = newtable.LowRiskNum, + MoreRiskNum = newtable.MoreRiskNum, + GreatRiskNum = newtable.GreatRiskNum, + ReportDate = newtable.ReportDate, + }; + db.SYHSEData_Data.InsertOnSubmit(table); + db.SubmitChanges(); + } + + public static void AddBulkSYHSEData_Data(List newtables) + { + + db.SYHSEData_Data.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } + + + public static void UpdateSYHSEData_Data(Model.SYHSEData_Data newtable) + { + + Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == newtable.Id); + if (table != null) + { + table.Id = newtable.Id; + table.FactoryId = newtable.FactoryId; + table.SafetyMnaHours = newtable.SafetyMnaHours; + table.GeneralRiskNum = newtable.GeneralRiskNum; + table.LowRiskNum = newtable.LowRiskNum; + table.MoreRiskNum = newtable.MoreRiskNum; + table.GreatRiskNum = newtable.GreatRiskNum; + table.ReportDate = newtable.ReportDate; + db.SubmitChanges(); + } + + } + public static void DeleteSYHSEData_DataById(string Id) + { + + Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + db.SYHSEData_Data.DeleteOnSubmit(table); + db.SubmitChanges(); + } + + } + + public static void DeleteALLSYHSEData_Data() + { + if (db.SYHSEData_Data != null) + { + db.SYHSEData_Data.DeleteAllOnSubmit(db.SYHSEData_Data); + db.SubmitChanges(); + } + } + + } +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs new file mode 100644 index 00000000..1c17e777 --- /dev/null +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs @@ -0,0 +1,153 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class SyhsedataHiddendangercheckService + { + public static Model.SGGLDB db = Funs.DB; + + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + public static List GetSYHSEData_HiddenDangerCheckByModle(Model.SYHSEData_HiddenDangerCheck table) + { + var q = from x in db.SYHSEData_HiddenDangerCheck + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && + (string.IsNullOrEmpty(table.HiddenDangerName) || x.HiddenDangerName.Contains(table.HiddenDangerName)) + select x + ; + + return q.ToList(); + } + + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(Model.SYHSEData_HiddenDangerCheck table, Grid Grid1) + { + var q = GetSYHSEData_HiddenDangerCheckByModle(table); + count = q.Count(); + if (count == 0) + { + return null; + } + // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.FactoryId, + x.HiddenDangerName, + x.TotalNum, + x.OKNum, + x.ReportDate, + + }; + } + #endregion + + public static Model.SYHSEData_HiddenDangerCheck GetSYHSEData_HiddenDangerCheckById(string Id) + { + return db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id); + } + + + public static void AddSYHSEData_HiddenDangerCheck(Model.SYHSEData_HiddenDangerCheck newtable) + { + + Model.SYHSEData_HiddenDangerCheck table = new Model.SYHSEData_HiddenDangerCheck + { + Id = newtable.Id, + FactoryId = newtable.FactoryId, + HiddenDangerName = newtable.HiddenDangerName, + TotalNum = newtable.TotalNum, + OKNum = newtable.OKNum, + ReportDate = newtable.ReportDate, + }; + db.SYHSEData_HiddenDangerCheck.InsertOnSubmit(table); + db.SubmitChanges(); + } + + public static void AddBulkSYHSEData_HiddenDangerCheck(List newtables) + { + + db.SYHSEData_HiddenDangerCheck.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } + + + public static void UpdateSYHSEData_HiddenDangerCheck(Model.SYHSEData_HiddenDangerCheck newtable) + { + + Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == newtable.Id); + if (table != null) + { + table.Id = newtable.Id; + table.FactoryId = newtable.FactoryId; + table.HiddenDangerName = newtable.HiddenDangerName; + table.TotalNum = newtable.TotalNum; + table.OKNum = newtable.OKNum; + table.ReportDate = newtable.ReportDate; + db.SubmitChanges(); + } + + } + public static void DeleteSYHSEData_HiddenDangerCheckById(string Id) + { + + Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + db.SYHSEData_HiddenDangerCheck.DeleteOnSubmit(table); + db.SubmitChanges(); + } + + } + + public static void DeleteALLSYHSEData_HiddenDangerCheck() + { + if (db.SYHSEData_HiddenDangerCheck != null) + { + db.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(db.SYHSEData_HiddenDangerCheck); + db.SubmitChanges(); + } + } + public static List GetSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate) + { + var q = from x in db.SYHSEData_HiddenDangerCheck + where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 + select x; + return q.ToList(); + } + public static void DeleteSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate) + { + + var table = db.SYHSEData_HiddenDangerCheck.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs new file mode 100644 index 00000000..cf013d66 --- /dev/null +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs @@ -0,0 +1,147 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class SyhsedataRiskcontrolService + { + public static Model.SGGLDB db = Funs.DB; + + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + public static List GetSYHSEData_RiskControlByModle(Model.SYHSEData_RiskControl table) + { + var q = from x in db.SYHSEData_RiskControl + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && + (string.IsNullOrEmpty(table.RiskControlName) || x.RiskControlName.Contains(table.RiskControlName)) + select x + ; + + return q.ToList(); + } + + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(Model.SYHSEData_RiskControl table, Grid Grid1) + { + var q = GetSYHSEData_RiskControlByModle(table); + count = q.Count(); + if (count == 0) + { + return null; + } + // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.FactoryId, + x.RiskControlName, + x.ReportDate, + + }; + } + #endregion + + public static Model.SYHSEData_RiskControl GetSYHSEData_RiskControlById(string Id) + { + return db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id); + } + + + public static void AddSYHSEData_RiskControl(Model.SYHSEData_RiskControl newtable) + { + + Model.SYHSEData_RiskControl table = new Model.SYHSEData_RiskControl + { + Id = newtable.Id, + FactoryId = newtable.FactoryId, + RiskControlName = newtable.RiskControlName, + ReportDate = newtable.ReportDate, + }; + db.SYHSEData_RiskControl.InsertOnSubmit(table); + db.SubmitChanges(); + } + + public static void AddBulkSYHSEData_RiskControl(List newtables) + { + + db.SYHSEData_RiskControl.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } + + + public static void UpdateSYHSEData_RiskControl(Model.SYHSEData_RiskControl newtable) + { + + Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == newtable.Id); + if (table != null) + { + table.Id = newtable.Id; + table.FactoryId = newtable.FactoryId; + table.RiskControlName = newtable.RiskControlName; + table.ReportDate = newtable.ReportDate; + db.SubmitChanges(); + } + + } + public static void DeleteSYHSEData_RiskControlById(string Id) + { + + Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + db.SYHSEData_RiskControl.DeleteOnSubmit(table); + db.SubmitChanges(); + } + + } + + public static void DeleteALLSYHSEData_RiskControl() + { + if (db.SYHSEData_RiskControl != null) + { + db.SYHSEData_RiskControl.DeleteAllOnSubmit(db.SYHSEData_RiskControl); + db.SubmitChanges(); + } + } + public static List GetSYHSEData_RiskControlByDate(DateTime? reportDate) + { + var q = from x in db.SYHSEData_RiskControl + where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 + select x; + return q.ToList(); + } + public static void DeleteSYHSEData_RiskControlByDate(DateTime? reportDate) + { + + var table = db.SYHSEData_RiskControl.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.SYHSEData_RiskControl.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx new file mode 100644 index 00000000..f6b20c39 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx @@ -0,0 +1,121 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BaseFactory.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.BaseFactory" %> + + + + + + + + 实业工厂表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs new file mode 100644 index 00000000..2e48f266 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs @@ -0,0 +1,249 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.BaseInfo +{ + public partial class BaseFactory : PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.Base_Factory table = new Model.Base_Factory(); + var tb = BLL.Base_FactoryService.getListData(table, Grid1); + Grid1.RecordCount = Base_FactoryService.count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + Grid1.DataSource = tb; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + #region 数据编辑事件 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseFactoryEdit.aspx?FactoryId={0}", string.Empty, "增加 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.Base_FactoryService.GetBase_FactoryById(ID); + if (model != null) ///已上报时不能删除 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseFactoryEdit.aspx?FactoryId={0}", ID, "编辑 - "))); + } + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnEdit_Click(null, null); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var model = BLL.Base_FactoryService.GetBase_FactoryById(rowID); + if (model != null) + { + BLL.Base_FactoryService.DeleteBase_FactoryById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.Base_FactoryMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("实业工厂表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.designer.cs new file mode 100644 index 00000000..5fecdb83 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.BaseInfo +{ + + + public partial class BaseFactory + { + + /// + /// 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; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// 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; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx new file mode 100644 index 00000000..4e4b03e2 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx @@ -0,0 +1,58 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BaseFactoryEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.BaseFactoryEdit" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs new file mode 100644 index 00000000..d64f9d66 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs @@ -0,0 +1,113 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.BaseInfo +{ + public partial class BaseFactoryEdit: PageBase + { + #region + /// + /// 主键 + /// + public string FactoryId + { + get + { + return (string)ViewState["FactoryId"]; + } + set + { + ViewState["FactoryId"] = value; + } + } + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.FactoryId = Request.Params["FactoryId"]; + if (!string.IsNullOrEmpty(this.FactoryId)) + { + Model.Base_Factory model = BLL.Base_FactoryService.GetBase_FactoryById(this.FactoryId); + if (model != null) + { + this.txtFactoryCode.Text = model.FactoryCode; + this.txtFactoryName.Text = model.FactoryName; + this.txtAddress.Text = model.Address; + + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (!IsSaveCode()) + { + ShowNotify("编号重复,请注意!", MessageBoxIcon.Warning); + return; + } + Model.Base_Factory table = new Model.Base_Factory(); + table.UnitId = BLL.Const.UnitId_CD; + table.FactoryCode = this.txtFactoryCode.Text; + table.FactoryName = this.txtFactoryName.Text; + table.Address = this.txtAddress.Text; + if (string.IsNullOrEmpty(this.FactoryId)) + { + table.FactoryId = SQLHelper.GetNewID(typeof(Model.Base_Factory)); + BLL.Base_FactoryService.AddBase_Factory(table); + + } + else + { + table.FactoryId = this.FactoryId; + BLL.Base_FactoryService.UpdateBase_Factory(table); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + protected bool IsSaveCode() + { + bool result = true; + var model = BLL.Base_FactoryService.GetBase_FactoryByCode(this.txtFactoryCode.Text); + if(model != null && model.FactoryId !=this.FactoryId) + { + result=false; + } + return result; + } + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.Base_FactoryMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.designer.cs new file mode 100644 index 00000000..8671a426 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.designer.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.BaseInfo +{ + + + public partial class BaseFactoryEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtFactoryCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFactoryCode; + + /// + /// txtFactoryName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFactoryName; + + /// + /// txtAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAddress; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 76bba262..31ff2189 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1715,3 +1715,185 @@ IP地址:::1 出错时间:02/23/2023 10:40:22 + +错误信息开始=====> +错误类型:HttpException +错误信息:文件“/BaseInfo/Base_FactoryEdit.aspx”不存在。 +错误堆栈: + 在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) + 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) + 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) + 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) + 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:03/07/2023 19:28:11 +出错文件:http://localhost:8119/BaseInfo/Base_FactoryEdit.aspx?FactoryId= +IP地址:::1 + +出错时间:03/07/2023 19:28:11 + + +错误信息开始=====> +错误类型:HttpException +错误信息:文件“/BaseInfo/Base_FactoryEdit.aspx”不存在。 +错误堆栈: + 在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) + 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) + 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) + 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) + 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:03/07/2023 19:28:59 +出错文件:http://localhost:8119/BaseInfo/Base_FactoryEdit.aspx?FactoryId= +IP地址:::1 + +出错时间:03/07/2023 19:28:59 + + +错误信息开始=====> +错误类型:MissingMethodException +错误信息:找不到方法:“Model.Base_Factory BLL.Base_FactoryService.GetBase_FactoryByCode(System.String)”。 +错误堆栈: + 在 FineUIPro.Web.BaseInfo.BaseFactoryEdit.IsSaveCode() + 在 FineUIPro.Web.BaseInfo.BaseFactoryEdit.btnSave_Click(Object sender, EventArgs e) + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 19:39:59 +出错文件:http://localhost:8119/BaseInfo/BaseFactoryEdit.aspx?FactoryId= +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 19:39:59 + + +错误信息开始=====> +错误类型:MissingMethodException +错误信息:找不到方法:“Model.Base_Factory BLL.Base_FactoryService.GetBase_FactoryByCode(System.String)”。 +错误堆栈: + 在 FineUIPro.Web.BaseInfo.BaseFactoryEdit.IsSaveCode() + 在 FineUIPro.Web.BaseInfo.BaseFactoryEdit.btnSave_Click(Object sender, EventArgs e) + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 19:40:25 +出错文件:http://localhost:8119/BaseInfo/BaseFactoryEdit.aspx?FactoryId= +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 19:40:25 + + +错误信息开始=====> +错误类型:DuplicateKeyException +错误信息:不能添加其键已在使用中的实体。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects(MetaType type, Object item, Dictionary`2 visited) + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects() + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 BLL.SysConstSetService.SetToken(String token) 位置 D:\诺必达\成达\SGGL_CD\SGGL\BLL\SysManage\SysConstSetService.cs:行号 87 + 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 D:\诺必达\成达\SGGL_CD\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 1175 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 22:38:31 +出错文件:http://localhost:8119/SysManage/SysConstSet.aspx +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 22:38:31 + + +错误信息开始=====> +错误类型:DuplicateKeyException +错误信息:不能添加其键已在使用中的实体。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects(MetaType type, Object item, Dictionary`2 visited) + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects() + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 BLL.SysConstSetService.SetToken(String token) 位置 D:\诺必达\成达\SGGL_CD\SGGL\BLL\SysManage\SysConstSetService.cs:行号 87 + 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 D:\诺必达\成达\SGGL_CD\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 1175 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 22:40:55 +出错文件:http://localhost:8119/SysManage/SysConstSet.aspx +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 22:40:55 + + +错误信息开始=====> +错误类型:DuplicateKeyException +错误信息:不能添加其键已在使用中的实体。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects(MetaType type, Object item, Dictionary`2 visited) + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects() + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 BLL.SysConstSetService.SetToken(String token) 位置 D:\诺必达\成达\SGGL_CD\SGGL\BLL\SysManage\SysConstSetService.cs:行号 87 + 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 D:\诺必达\成达\SGGL_CD\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 1175 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 22:41:36 +出错文件:http://localhost:8119/SysManage/SysConstSet.aspx +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 22:41:36 + + +错误信息开始=====> +错误类型:DuplicateKeyException +错误信息:不能添加其键已在使用中的实体。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects(MetaType type, Object item, Dictionary`2 visited) + 在 System.Data.Linq.ChangeProcessor.TrackUntrackedObjects() + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 BLL.SysConstSetService.SetTokenExpirationTime(String ExpirationTime) + 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 D:\诺必达\成达\SGGL_CD\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 1176 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:03/07/2023 22:43:33 +出错文件:http://localhost:8119/SysManage/SysConstSet.aspx +IP地址:::1 +操作人员:JT + +出错时间:03/07/2023 22:43:33 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 32768de5..ffe7ea47 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -220,6 +220,8 @@ + + @@ -1829,6 +1831,8 @@ + + @@ -6047,6 +6051,20 @@ AccidentType.aspx + + BaseFactory.aspx + ASPXCodeBehind + + + BaseFactory.aspx + + + BaseFactoryEdit.aspx + ASPXCodeBehind + + + BaseFactoryEdit.aspx + Certificate.aspx ASPXCodeBehind @@ -15542,6 +15560,20 @@ Project_SYHSEData_SYHSEEdit.aspx + + SYHSEData_Data.aspx + ASPXCodeBehind + + + SYHSEData_Data.aspx + + + SYHSEData_DataEdit.aspx + ASPXCodeBehind + + + SYHSEData_DataEdit.aspx + SYHSEData_SYHSE.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 583b67aa..0e031171 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -27,8 +27,8 @@ - - + + @@ -159,7 +159,11 @@ - + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx new file mode 100644 index 00000000..ada86ceb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx @@ -0,0 +1,131 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SYHSEData_Data.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataSync.SYHSEData_Data" %> + + + + + + + + 实业数据表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs new file mode 100644 index 00000000..2b90eef0 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs @@ -0,0 +1,249 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.DataSync +{ + public partial class SYHSEData_Data :PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.SYHSEData_Data table = new Model.SYHSEData_Data(); + var tb = BLL.SYHSEData_DataService.getListData(table, Grid1); + Grid1.RecordCount = SYHSEData_DataService.count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + Grid1.DataSource = tb; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + #region 数据编辑事件 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SYHSEData_DataEdit.aspx?Id={0}", string.Empty, "增加 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(ID); + if (model != null) ///已上报时不能删除 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SYHSEData_DataEdit.aspx?Id={0}", ID, "编辑 - "))); + } + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnEdit_Click(null, null); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(rowID); + if (model != null) + { + BLL.SYHSEData_DataService.DeleteSYHSEData_DataById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SYHSEData_DataMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("实业数据表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.designer.cs new file mode 100644 index 00000000..100bf637 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataSync +{ + + + public partial class SYHSEData_Data + { + + /// + /// 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; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// 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; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx new file mode 100644 index 00000000..0a57ab67 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx @@ -0,0 +1,282 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SYHSEData_DataEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataSync.SYHSEData_DataEdit" %> + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs new file mode 100644 index 00000000..30dff4e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs @@ -0,0 +1,334 @@ +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using RestSharp.Extensions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.DataSync +{ + public partial class SYHSEData_DataEdit : PageBase + { + #region + /// + /// 主键 + /// + public string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.Id = Request.Params["Id"]; + BLL.Base_FactoryService.InitBase_FactoryDownList(DropFactory, true); + if (!string.IsNullOrEmpty(this.Id)) + { + // Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); + + Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); + if (model != null) + { + //this.txtUnitId.Text = model.UnitId; + if (!string.IsNullOrEmpty(model.FactoryId)) + { + DropFactory.SelectedValue=model.FactoryId; + + } + if (model.ReportDate != null) + { + this.txtReportDate.SelectedDate = model.ReportDate; + } + if (model.SafetyMnaHours.HasValue) + { + this.txtSafetyMnaHours.Text = model.SafetyMnaHours.Value.ToString(); + } + if (model.GeneralRiskNum.HasValue) + { + this.txtGeneralRiskNum.Text = model.GeneralRiskNum.Value.ToString(); + } + if (model.LowRiskNum.HasValue) + { + this.txtLowRiskNum.Text = model.LowRiskNum.Value.ToString(); + } + if (model.MoreRiskNum.HasValue) + { + this.txtMoreRiskNum.Text = model.MoreRiskNum.Value.ToString(); + } + if (model.GreatRiskNum.HasValue) + { + this.txtGreatRiskNum.Text = model.GreatRiskNum.Value.ToString(); + } + + } + } + else + { + txtReportDate.SelectedDate = DateTime.Now; + + } + BindGrid(); + #region Grid1 + // 删除选中单元格的客户端脚本 + string deleteScript_Realtimedevice = GetDeleteScript_Realtimedevice(); + string deleteScript_Hidden = GetDeleteScript_Hidden(); + string deleteScript_Risk = GetDeleteScript_Risk(); + + JObject defaultObj_Realtimedevice = new JObject + { + { "HazardName", "" }, + { "HazardLevel", "" }, + { "DeviceName", "" }, + { "Medium", "" }, + { "MeasurementUnit", "" }, + { "DateTime", "" }, + { "Value", "" } + }; + // 在第一行新增一条数据 + btnNew_Realtimedevice.OnClientClick = Grid_Realtimedevice.GetAddNewRecordReference(defaultObj_Realtimedevice, true); + // 删除选中行按钮 + btnDelete_Realtimedevice.OnClientClick = Grid_Realtimedevice.GetNoSelectionAlertReference("请选择一条记录!") + deleteScript_Realtimedevice; + + JObject defaultObj_Hidden = new JObject + { + { "HiddenDangerName", "" }, + { "TotalNum", "" }, + { "OKNum", "" } + }; + // 在第一行新增一条数据 + btnNew_Hidden.OnClientClick = Grid_Hidden.GetAddNewRecordReference(defaultObj_Hidden, true); + // 删除选中行按钮 + btnDelete_Hidden.OnClientClick = Grid_Hidden.GetNoSelectionAlertReference("请选择一条记录!") + deleteScript_Hidden; + + JObject defaultObj_Risk = new JObject + { + { "RiskControlName", "" } + }; + // 在第一行新增一条数据 + btnNew_Risk.OnClientClick = Grid_Risk.GetAddNewRecordReference(defaultObj_Risk, true); + // 删除选中行按钮 + btnDelete_Risk.OnClientClick = Grid_Risk.GetNoSelectionAlertReference("请选择一条记录!") + deleteScript_Risk; + + + #endregion + + } + } + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (txtReportDate.SelectedDate == null) + { + + ShowNotify("请选择上报日期!"); + return; + + } + if (DropFactory.SelectedValue==Const._Null) + { + + ShowNotify("请选择实业!"); + return; + + } + Model.SYHSEData_Data table = new Model.SYHSEData_Data(); + table.FactoryId = this.DropFactory.SelectedValue; + table.ReportDate = this.txtReportDate.SelectedDate; + table.SafetyMnaHours = Funs.GetNewInt(this.txtSafetyMnaHours.Text); + table.GeneralRiskNum = Funs.GetNewInt(this.txtGeneralRiskNum.Text); + table.LowRiskNum = Funs.GetNewInt(this.txtLowRiskNum.Text); + table.MoreRiskNum = Funs.GetNewInt(this.txtMoreRiskNum.Text); + table.GreatRiskNum = Funs.GetNewInt(this.txtGreatRiskNum.Text); + if (string.IsNullOrEmpty(this.Id)) + { + table.Id = SQLHelper.GetNewID(typeof(Model.SYHSEData_Data)); + BLL.SYHSEData_DataService.AddSYHSEData_Data(table); + + } + else + { + table.Id = this.Id; + BLL.SYHSEData_DataService.UpdateSYHSEData_Data(table); + } + + BLL.HazardRealtimedeviceService.DeleteHazard_RealTimeDeviceByDate(table.ReportDate); + JArray EditorArr_Realtimedevice = Grid_Realtimedevice.GetMergedData(); + if (EditorArr_Realtimedevice.Count > 0) + { + Model.Hazard_RealTimeDevice defect = new Model.Hazard_RealTimeDevice(); + + for (int i = 0; i < EditorArr_Realtimedevice.Count; i++) + { + JObject objects = (JObject)EditorArr_Realtimedevice[i]; + defect.ID = SQLHelper.GetNewID(typeof(Model.Hazard_RealTimeDevice)); + defect.ReportDate = table.ReportDate; + defect.FactoryId = DropFactory.SelectedValue; + defect.HazardName = objects["values"]["HazardName"].ToString(); + defect.HazardLevel = objects["values"]["HazardLevel"].ToString(); + defect.DeviceName = objects["values"]["DeviceName"].ToString(); + defect.Medium = objects["values"]["Medium"].ToString(); + defect.MeasurementUnit = objects["values"]["MeasurementUnit"].ToString(); + defect.Value = objects["values"]["Value"].ToString(); + defect.DateTime =DateTime.Parse(objects["values"]["DateTime"].ToString()) ; + //defect.HazardLevel = Funs.GetNewInt(objects["values"]["HazardLevel"].ToString()); + + BLL.HazardRealtimedeviceService.AddHazard_RealTimeDevice(defect); + } + } + + + + BLL.SyhsedataHiddendangercheckService.DeleteSYHSEData_HiddenDangerCheckByDate(table.ReportDate); + JArray EditorArr_Hidden = Grid_Hidden.GetMergedData(); + if (EditorArr_Hidden.Count > 0) + { + Model.SYHSEData_HiddenDangerCheck defect = new Model.SYHSEData_HiddenDangerCheck(); + + for (int i = 0; i < EditorArr_Hidden.Count; i++) + { + JObject objects = (JObject)EditorArr_Hidden[i]; + defect.Id = SQLHelper.GetNewID(typeof(Model.SYHSEData_HiddenDangerCheck)); + defect.ReportDate = table.ReportDate; + defect.FactoryId = DropFactory.SelectedValue; + defect.HiddenDangerName = objects["values"]["HiddenDangerName"].ToString(); + defect.TotalNum = Funs.GetNewInt(objects["values"]["TotalNum"].ToString()); + defect.OKNum = Funs.GetNewInt(objects["values"]["OKNum"].ToString()); + + BLL.SyhsedataHiddendangercheckService.AddSYHSEData_HiddenDangerCheck(defect); + } + } + + + + BLL.SyhsedataRiskcontrolService.DeleteSYHSEData_RiskControlByDate(table.ReportDate); + JArray EditorArr_Risk = Grid_Risk.GetMergedData(); + if (EditorArr_Risk.Count > 0) + { + Model.SYHSEData_RiskControl defect = new Model.SYHSEData_RiskControl(); + + for (int i = 0; i < EditorArr_Risk.Count; i++) + { + JObject objects = (JObject)EditorArr_Risk[i]; + defect.Id = SQLHelper.GetNewID(typeof(Model.SYHSEData_RiskControl)); + defect.ReportDate = table.ReportDate; + defect.FactoryId = DropFactory.SelectedValue; + defect.RiskControlName = objects["values"]["RiskControlName"].ToString(); + BLL.SyhsedataRiskcontrolService.AddSYHSEData_RiskControl(defect); + } + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + + private void BindGrid() + { + if (!string.IsNullOrEmpty(this.Id)) + { + Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); + if (model != null) + { + var dt_Realtimedevice = BLL.HazardRealtimedeviceService.GetHazard_RealTimeDeviceByDate(model.ReportDate); + Grid_Realtimedevice.RecordCount = dt_Realtimedevice.Count; + Grid_Realtimedevice.DataSource = dt_Realtimedevice; + Grid_Realtimedevice.DataBind(); + + var dt_Hidden= SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(model.ReportDate); + Grid_Hidden.RecordCount = dt_Hidden.Count; + Grid_Hidden.DataSource = dt_Hidden; + Grid_Hidden.DataBind(); + + var dt_Risk = SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(model.ReportDate); + Grid_Risk.RecordCount = dt_Risk.Count; + Grid_Risk.DataSource = dt_Risk; + Grid_Risk.DataBind(); + } + + } + + } + protected void txtReportDate_DateSelect(object sender, EventArgs e) + { + if (txtReportDate.SelectedDate != null) + { + DateTime dt = (DateTime)txtReportDate.SelectedDate; + if (BLL.SYHSEData_DataService.IsReportByDate(dt)) + { + txtReportDate.SelectedDate = null; + ShowNotify("该日期已上报!"); + + } + } + } + protected void btnSyn_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.Id)) + { + var responedata = SYHSEData_DataService.PushCNCEC(Id); + if (responedata.code == 1) + { + ShowNotify("上报成功!"); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + + } + else + { + ShowNotify(responedata.message); + // PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + } + + + } + private string GetDeleteScript_Realtimedevice() + { + return Confirm.GetShowReference("确定删除当前数据吗?", String.Empty, MessageBoxIcon.Question, Grid_Realtimedevice.GetDeleteSelectedRowsReference(), String.Empty); + } + private string GetDeleteScript_Hidden() + { + return Confirm.GetShowReference("确定删除当前数据吗?", String.Empty, MessageBoxIcon.Question, Grid_Hidden.GetDeleteSelectedRowsReference(), String.Empty); + } + private string GetDeleteScript_Risk() + { + return Confirm.GetShowReference("确定删除当前数据吗?", String.Empty, MessageBoxIcon.Question, Grid_Risk.GetDeleteSelectedRowsReference(), String.Empty); + } + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SYHSEData_DataMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.designer.cs new file mode 100644 index 00000000..6080da25 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.designer.cs @@ -0,0 +1,476 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataSync +{ + + + public partial class SYHSEData_DataEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Form6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form6; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// GroupPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// DropFactory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropFactory; + + /// + /// txtReportDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtReportDate; + + /// + /// GroupPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtSafetyMnaHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSafetyMnaHours; + + /// + /// GroupPanel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel3; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// txtGeneralRiskNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtGeneralRiskNum; + + /// + /// txtLowRiskNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLowRiskNum; + + /// + /// txtMoreRiskNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMoreRiskNum; + + /// + /// txtGreatRiskNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtGreatRiskNum; + + /// + /// GroupPanel6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel6; + + /// + /// Form7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form7; + + /// + /// Grid_Realtimedevice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid_Realtimedevice; + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// btnNew_Realtimedevice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew_Realtimedevice; + + /// + /// btnDelete_Realtimedevice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete_Realtimedevice; + + /// + /// txtHazardName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHazardName; + + /// + /// txtHazardLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHazardLevel; + + /// + /// txtDeviceName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeviceName; + + /// + /// txtMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMedium; + + /// + /// txtMeasurementUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeasurementUnit; + + /// + /// txtDateTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtDateTime; + + /// + /// txtValue 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue; + + /// + /// GroupPanel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel5; + + /// + /// Form5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form5; + + /// + /// Grid_Hidden 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid_Hidden; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnNew_Hidden 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew_Hidden; + + /// + /// btnDelete_Hidden 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete_Hidden; + + /// + /// txtHiddenDangerName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHiddenDangerName; + + /// + /// txtTotalNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalNum; + + /// + /// txtOKNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtOKNum; + + /// + /// GroupPanel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel GroupPanel4; + + /// + /// Form4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form4; + + /// + /// Grid_Risk 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid_Risk; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// btnNew_Risk 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew_Risk; + + /// + /// btnDelete_Risk 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete_Risk; + + /// + /// txtRiskControlName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRiskControlName; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSyn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSyn; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 3971c608..0567390d 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -31,8 +31,8 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_Project.xml b/SGGL/FineUIPro.Web/common/Menu_Project.xml index 1999ded1..0dc9c199 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Project.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Project.xml @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 50c6ae1f..e11ced99 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -61,5 +61,6 @@ + \ No newline at end of file diff --git a/SGGL/Model/APIItem/SHHSE/NewSYHSEData.cs b/SGGL/Model/APIItem/SHHSE/NewSYHSEData.cs new file mode 100644 index 00000000..7bd6fb0b --- /dev/null +++ b/SGGL/Model/APIItem/SHHSE/NewSYHSEData.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class NewSYHSEData + { + /// + /// 实业数据项集合 + /// + public List NewSYHSEDataItems + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SHHSE/NewSYHSEDataHiddenDangerCheckItem.cs b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataHiddenDangerCheckItem.cs new file mode 100644 index 00000000..208e807a --- /dev/null +++ b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataHiddenDangerCheckItem.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class NewSYHSEDataHiddenDangerCheckItem + { + /// + /// ID + /// + public string Id + { + get; + set; + } + + /// + /// 隐患名称 + /// + public string HiddenDangerName + { + get; + set; + } + + /// + /// 当日总数 + /// + public int TotalNum + { + get; + set; + } + + /// + /// 当日整改数 + /// + public int OKNum + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SHHSE/NewSYHSEDataItem.cs b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataItem.cs new file mode 100644 index 00000000..e106f37f --- /dev/null +++ b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataItem.cs @@ -0,0 +1,167 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + /// + /// 实业数据项 + /// + public class NewSYHSEDataItem + { + /// + /// ID + /// + public string Id + { + get; + set; + } + + /// + /// 上报日期 + /// + public string ReportDate + { + get; + set; + } + + /// + /// 单位Id + /// + public string UnitId + { + get; + set; + } + + /// + /// 社会统一信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 单位名称 + /// + public string UnitName + { + get; + set; + } + + /// + /// 实业ID + /// + public string FactoryId + { + get; + set; + } + + /// + /// 实业编号 + /// + public string FactoryCode + { + get; + set; + } + + /// + /// 实业名称 + /// + public string FactoryName + { + get; + set; + } + + /// + /// 地址 + /// + public string Address + { + get; + set; + } + + /// + /// 安全人工时 + /// + public int SafetyMnaHours + { + get; + set; + } + + /// + /// 一般风险数 + /// + public int GeneralRiskNum + { + get; + set; + } + + /// + /// 低风险数 + /// + public int LowRiskNum + { + get; + set; + } + + /// + /// 较大风险数 + /// + public int MoreRiskNum + { + get; + set; + } + + /// + /// 重大风险数 + /// + public int GreatRiskNum + { + get; + set; + } + + /// + /// 风险管控 + /// + public List NewSYHSEDataRiskControlItems + { + get; + set; + } + + /// + /// 重大危险源 + /// + public List NewSYHSEDataRealTimeDeviceItems + { + get; + set; + } + + /// + /// 隐患排查 + /// + public List NewSYHSEDataHiddenDangerCheckItems + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRealTimeDeviceItem.cs b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRealTimeDeviceItem.cs new file mode 100644 index 00000000..aaef15d3 --- /dev/null +++ b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRealTimeDeviceItem.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class NewSYHSEDataRealTimeDeviceItem + { + /// + /// ID + /// + public string Id + { + get; + set; + } + + /// + /// 风险名称 + /// + public string HazardName + { + get; + set; + } + + /// + /// 风险等级 + /// + public string HazardLevel + { + get; + set; + } + + /// + /// 设备名称 + /// + public string DeviceName + { + get; + set; + } + + /// + /// 介质 + /// + public string Medium + { + get; + set; + } + + /// + /// 测量单位 + /// + public string MeasurementUnit + { + get; + set; + } + + /// + /// 时间 + /// + public string DateTime + { + get; + set; + } + + /// + /// 评价值 + /// + public string Value + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRiskControlItem.cs b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRiskControlItem.cs new file mode 100644 index 00000000..bcfe6d95 --- /dev/null +++ b/SGGL/Model/APIItem/SHHSE/NewSYHSEDataRiskControlItem.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class NewSYHSEDataRiskControlItem + { + /// + /// ID + /// + public string Id + { + get; + set; + } + + /// + /// 风险名称 + /// + public string RiskControlName + { + get; + set; + } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 25c45812..e61443a2 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -116,6 +116,9 @@ namespace Model partial void InsertBase_ExpertType(Base_ExpertType instance); partial void UpdateBase_ExpertType(Base_ExpertType instance); partial void DeleteBase_ExpertType(Base_ExpertType instance); + partial void InsertBase_Factory(Base_Factory instance); + partial void UpdateBase_Factory(Base_Factory instance); + partial void DeleteBase_Factory(Base_Factory instance); partial void InsertBase_Format(Base_Format instance); partial void UpdateBase_Format(Base_Format instance); partial void DeleteBase_Format(Base_Format instance); @@ -1925,6 +1928,15 @@ namespace Model partial void InsertSupervise_UpCheckReportItem2(Supervise_UpCheckReportItem2 instance); partial void UpdateSupervise_UpCheckReportItem2(Supervise_UpCheckReportItem2 instance); partial void DeleteSupervise_UpCheckReportItem2(Supervise_UpCheckReportItem2 instance); + partial void InsertSYHSEData_Data(SYHSEData_Data instance); + partial void UpdateSYHSEData_Data(SYHSEData_Data instance); + partial void DeleteSYHSEData_Data(SYHSEData_Data instance); + partial void InsertSYHSEData_HiddenDangerCheck(SYHSEData_HiddenDangerCheck instance); + partial void UpdateSYHSEData_HiddenDangerCheck(SYHSEData_HiddenDangerCheck instance); + partial void DeleteSYHSEData_HiddenDangerCheck(SYHSEData_HiddenDangerCheck instance); + partial void InsertSYHSEData_RiskControl(SYHSEData_RiskControl instance); + partial void UpdateSYHSEData_RiskControl(SYHSEData_RiskControl instance); + partial void DeleteSYHSEData_RiskControl(SYHSEData_RiskControl instance); partial void InsertSYHSEData_SYHSE(SYHSEData_SYHSE instance); partial void UpdateSYHSEData_SYHSE(SYHSEData_SYHSE instance); partial void DeleteSYHSEData_SYHSE(SYHSEData_SYHSE instance); @@ -2537,6 +2549,14 @@ namespace Model } } + public System.Data.Linq.Table Base_Factory + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_Format { get @@ -7393,6 +7413,30 @@ namespace Model } } + public System.Data.Linq.Table SYHSEData_Data + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table SYHSEData_HiddenDangerCheck + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table SYHSEData_RiskControl + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table SYHSEData_SYHSE { get @@ -20010,6 +20054,289 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_Factory")] + public partial class Base_Factory : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _FactoryId; + + private string _UnitId; + + private string _FactoryCode; + + private string _FactoryName; + + private string _Address; + + private EntityRef _Base_Unit; + + private EntitySet _SYHSEData_Data; + + private EntitySet _SYHSEData_HiddenDangerCheck; + + private EntitySet _SYHSEData_RiskControl; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnFactoryIdChanging(string value); + partial void OnFactoryIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnFactoryCodeChanging(string value); + partial void OnFactoryCodeChanged(); + partial void OnFactoryNameChanging(string value); + partial void OnFactoryNameChanged(); + partial void OnAddressChanging(string value); + partial void OnAddressChanged(); + #endregion + + public Base_Factory() + { + this._Base_Unit = default(EntityRef); + this._SYHSEData_Data = new EntitySet(new Action(this.attach_SYHSEData_Data), new Action(this.detach_SYHSEData_Data)); + this._SYHSEData_HiddenDangerCheck = new EntitySet(new Action(this.attach_SYHSEData_HiddenDangerCheck), new Action(this.detach_SYHSEData_HiddenDangerCheck)); + this._SYHSEData_RiskControl = new EntitySet(new Action(this.attach_SYHSEData_RiskControl), new Action(this.detach_SYHSEData_RiskControl)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string FactoryId + { + get + { + return this._FactoryId; + } + set + { + if ((this._FactoryId != value)) + { + this.OnFactoryIdChanging(value); + this.SendPropertyChanging(); + this._FactoryId = value; + this.SendPropertyChanged("FactoryId"); + this.OnFactoryIdChanged(); + } + } + } + + [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="_FactoryCode", DbType="NVarChar(100)")] + public string FactoryCode + { + get + { + return this._FactoryCode; + } + set + { + if ((this._FactoryCode != value)) + { + this.OnFactoryCodeChanging(value); + this.SendPropertyChanging(); + this._FactoryCode = value; + this.SendPropertyChanged("FactoryCode"); + this.OnFactoryCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryName", DbType="NVarChar(100)")] + public string FactoryName + { + get + { + return this._FactoryName; + } + set + { + if ((this._FactoryName != value)) + { + this.OnFactoryNameChanging(value); + this.SendPropertyChanging(); + this._FactoryName = value; + this.SendPropertyChanged("FactoryName"); + this.OnFactoryNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(500)")] + public string Address + { + get + { + return this._Address; + } + set + { + if ((this._Address != value)) + { + this.OnAddressChanging(value); + this.SendPropertyChanging(); + this._Address = value; + this.SendPropertyChanged("Address"); + this.OnAddressChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Factory_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.Base_Factory.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Base_Factory.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_Data_Base_Factory", Storage="_SYHSEData_Data", ThisKey="FactoryId", OtherKey="FactoryId", DeleteRule="NO ACTION")] + public EntitySet SYHSEData_Data + { + get + { + return this._SYHSEData_Data; + } + set + { + this._SYHSEData_Data.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_HiddenDangerCheck_Base_Factory", Storage="_SYHSEData_HiddenDangerCheck", ThisKey="FactoryId", OtherKey="FactoryId", DeleteRule="NO ACTION")] + public EntitySet SYHSEData_HiddenDangerCheck + { + get + { + return this._SYHSEData_HiddenDangerCheck; + } + set + { + this._SYHSEData_HiddenDangerCheck.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_RiskControl_Base_Factory", Storage="_SYHSEData_RiskControl", ThisKey="FactoryId", OtherKey="FactoryId", DeleteRule="NO ACTION")] + public EntitySet SYHSEData_RiskControl + { + get + { + return this._SYHSEData_RiskControl; + } + set + { + this._SYHSEData_RiskControl.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_SYHSEData_Data(SYHSEData_Data entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = this; + } + + private void detach_SYHSEData_Data(SYHSEData_Data entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = null; + } + + private void attach_SYHSEData_HiddenDangerCheck(SYHSEData_HiddenDangerCheck entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = this; + } + + private void detach_SYHSEData_HiddenDangerCheck(SYHSEData_HiddenDangerCheck entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = null; + } + + private void attach_SYHSEData_RiskControl(SYHSEData_RiskControl entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = this; + } + + private void detach_SYHSEData_RiskControl(SYHSEData_RiskControl entity) + { + this.SendPropertyChanging(); + entity.Base_Factory = null; + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_Format")] public partial class Base_Format : INotifyPropertyChanging, INotifyPropertyChanged { @@ -36008,6 +36335,8 @@ namespace Model private EntitySet _ActionPlan_ActionPlanSummary; + private EntitySet _Base_Factory; + private EntitySet _Base_Project; private EntitySet _HJGL_Batch_NDE; @@ -36393,6 +36722,7 @@ namespace Model this._Accident_NoFourLetoff = new EntitySet(new Action(this.attach_Accident_NoFourLetoff), new Action(this.detach_Accident_NoFourLetoff)); this._Unit = new EntitySet(new Action(this.attach_Unit), new Action(this.detach_Unit)); this._ActionPlan_ActionPlanSummary = new EntitySet(new Action(this.attach_ActionPlan_ActionPlanSummary), new Action(this.detach_ActionPlan_ActionPlanSummary)); + this._Base_Factory = new EntitySet(new Action(this.attach_Base_Factory), new Action(this.detach_Base_Factory)); this._Base_Project = new EntitySet(new Action(this.attach_Base_Project), new Action(this.detach_Base_Project)); this._HJGL_Batch_NDE = new EntitySet(new Action(this.attach_HJGL_Batch_NDE), new Action(this.detach_HJGL_Batch_NDE)); this._Batch_NDECheck_CheckUnit_Base_Unit = new EntitySet(new Action(this.attach_Batch_NDECheck_CheckUnit_Base_Unit), new Action(this.detach_Batch_NDECheck_CheckUnit_Base_Unit)); @@ -37147,6 +37477,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Factory_Base_Unit", Storage="_Base_Factory", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Base_Factory + { + get + { + return this._Base_Factory; + } + set + { + this._Base_Factory.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Project_Base_Unit", Storage="_Base_Project", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Base_Project { @@ -39331,6 +39674,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Base_Factory(Base_Factory entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Base_Factory(Base_Factory entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Base_Project(Base_Project entity) { this.SendPropertyChanging(); @@ -140763,6 +141118,14 @@ namespace Model private string _ProjectId; + private string _Value; + + private string _FactoryId; + + private System.Nullable _ReportDate; + + private string _ReceiveDate; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -140833,6 +141196,14 @@ namespace Model partial void OnDateTimeChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); + partial void OnValueChanging(string value); + partial void OnValueChanged(); + partial void OnFactoryIdChanging(string value); + partial void OnFactoryIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnReceiveDateChanging(string value); + partial void OnReceiveDateChanged(); #endregion public Hazard_RealTimeDevice() @@ -141500,6 +141871,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value", DbType="NVarChar(50)")] + public string Value + { + get + { + return this._Value; + } + set + { + if ((this._Value != value)) + { + this.OnValueChanging(value); + this.SendPropertyChanging(); + this._Value = value; + this.SendPropertyChanged("Value"); + this.OnValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryId", DbType="NVarChar(50)")] + public string FactoryId + { + get + { + return this._FactoryId; + } + set + { + if ((this._FactoryId != value)) + { + this.OnFactoryIdChanging(value); + this.SendPropertyChanging(); + this._FactoryId = value; + this.SendPropertyChanged("FactoryId"); + this.OnFactoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveDate", DbType="NVarChar(50)")] + public string ReceiveDate + { + get + { + return this._ReceiveDate; + } + set + { + if ((this._ReceiveDate != value)) + { + this.OnReceiveDateChanging(value); + this.SendPropertyChanging(); + this._ReceiveDate = value; + this.SendPropertyChanged("ReceiveDate"); + this.OnReceiveDateChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -305673,6 +306124,675 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SYHSEData_Data")] + public partial class SYHSEData_Data : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _FactoryId; + + private System.Nullable _SafetyMnaHours; + + private System.Nullable _GeneralRiskNum; + + private System.Nullable _LowRiskNum; + + private System.Nullable _MoreRiskNum; + + private System.Nullable _GreatRiskNum; + + private System.Nullable _ReportDate; + + private EntityRef _Base_Factory; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnFactoryIdChanging(string value); + partial void OnFactoryIdChanged(); + partial void OnSafetyMnaHoursChanging(System.Nullable value); + partial void OnSafetyMnaHoursChanged(); + partial void OnGeneralRiskNumChanging(System.Nullable value); + partial void OnGeneralRiskNumChanged(); + partial void OnLowRiskNumChanging(System.Nullable value); + partial void OnLowRiskNumChanged(); + partial void OnMoreRiskNumChanging(System.Nullable value); + partial void OnMoreRiskNumChanged(); + partial void OnGreatRiskNumChanging(System.Nullable value); + partial void OnGreatRiskNumChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + #endregion + + public SYHSEData_Data() + { + this._Base_Factory = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryId", DbType="NVarChar(50)")] + public string FactoryId + { + get + { + return this._FactoryId; + } + set + { + if ((this._FactoryId != value)) + { + if (this._Base_Factory.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnFactoryIdChanging(value); + this.SendPropertyChanging(); + this._FactoryId = value; + this.SendPropertyChanged("FactoryId"); + this.OnFactoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyMnaHours", DbType="Int")] + public System.Nullable SafetyMnaHours + { + get + { + return this._SafetyMnaHours; + } + set + { + if ((this._SafetyMnaHours != value)) + { + this.OnSafetyMnaHoursChanging(value); + this.SendPropertyChanging(); + this._SafetyMnaHours = value; + this.SendPropertyChanged("SafetyMnaHours"); + this.OnSafetyMnaHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GeneralRiskNum", DbType="Int")] + public System.Nullable GeneralRiskNum + { + get + { + return this._GeneralRiskNum; + } + set + { + if ((this._GeneralRiskNum != value)) + { + this.OnGeneralRiskNumChanging(value); + this.SendPropertyChanging(); + this._GeneralRiskNum = value; + this.SendPropertyChanged("GeneralRiskNum"); + this.OnGeneralRiskNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LowRiskNum", DbType="Int")] + public System.Nullable LowRiskNum + { + get + { + return this._LowRiskNum; + } + set + { + if ((this._LowRiskNum != value)) + { + this.OnLowRiskNumChanging(value); + this.SendPropertyChanging(); + this._LowRiskNum = value; + this.SendPropertyChanged("LowRiskNum"); + this.OnLowRiskNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MoreRiskNum", DbType="Int")] + public System.Nullable MoreRiskNum + { + get + { + return this._MoreRiskNum; + } + set + { + if ((this._MoreRiskNum != value)) + { + this.OnMoreRiskNumChanging(value); + this.SendPropertyChanging(); + this._MoreRiskNum = value; + this.SendPropertyChanged("MoreRiskNum"); + this.OnMoreRiskNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GreatRiskNum", DbType="Int")] + public System.Nullable GreatRiskNum + { + get + { + return this._GreatRiskNum; + } + set + { + if ((this._GreatRiskNum != value)) + { + this.OnGreatRiskNumChanging(value); + this.SendPropertyChanging(); + this._GreatRiskNum = value; + this.SendPropertyChanged("GreatRiskNum"); + this.OnGreatRiskNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_Data_Base_Factory", Storage="_Base_Factory", ThisKey="FactoryId", OtherKey="FactoryId", IsForeignKey=true)] + public Base_Factory Base_Factory + { + get + { + return this._Base_Factory.Entity; + } + set + { + Base_Factory previousValue = this._Base_Factory.Entity; + if (((previousValue != value) + || (this._Base_Factory.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Factory.Entity = null; + previousValue.SYHSEData_Data.Remove(this); + } + this._Base_Factory.Entity = value; + if ((value != null)) + { + value.SYHSEData_Data.Add(this); + this._FactoryId = value.FactoryId; + } + else + { + this._FactoryId = default(string); + } + this.SendPropertyChanged("Base_Factory"); + } + } + } + + 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_HiddenDangerCheck")] + public partial class SYHSEData_HiddenDangerCheck : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _FactoryId; + + private string _HiddenDangerName; + + private System.Nullable _TotalNum; + + private System.Nullable _OKNum; + + private System.Nullable _ReportDate; + + private EntityRef _Base_Factory; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnFactoryIdChanging(string value); + partial void OnFactoryIdChanged(); + partial void OnHiddenDangerNameChanging(string value); + partial void OnHiddenDangerNameChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnOKNumChanging(System.Nullable value); + partial void OnOKNumChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + #endregion + + public SYHSEData_HiddenDangerCheck() + { + this._Base_Factory = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryId", DbType="NVarChar(50)")] + public string FactoryId + { + get + { + return this._FactoryId; + } + set + { + if ((this._FactoryId != value)) + { + if (this._Base_Factory.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnFactoryIdChanging(value); + this.SendPropertyChanging(); + this._FactoryId = value; + this.SendPropertyChanged("FactoryId"); + this.OnFactoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiddenDangerName", DbType="NVarChar(50)")] + public string HiddenDangerName + { + get + { + return this._HiddenDangerName; + } + set + { + if ((this._HiddenDangerName != value)) + { + this.OnHiddenDangerNameChanging(value); + this.SendPropertyChanging(); + this._HiddenDangerName = value; + this.SendPropertyChanged("HiddenDangerName"); + this.OnHiddenDangerNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Int")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OKNum", DbType="Int")] + public System.Nullable OKNum + { + get + { + return this._OKNum; + } + set + { + if ((this._OKNum != value)) + { + this.OnOKNumChanging(value); + this.SendPropertyChanging(); + this._OKNum = value; + this.SendPropertyChanged("OKNum"); + this.OnOKNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_HiddenDangerCheck_Base_Factory", Storage="_Base_Factory", ThisKey="FactoryId", OtherKey="FactoryId", IsForeignKey=true)] + public Base_Factory Base_Factory + { + get + { + return this._Base_Factory.Entity; + } + set + { + Base_Factory previousValue = this._Base_Factory.Entity; + if (((previousValue != value) + || (this._Base_Factory.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Factory.Entity = null; + previousValue.SYHSEData_HiddenDangerCheck.Remove(this); + } + this._Base_Factory.Entity = value; + if ((value != null)) + { + value.SYHSEData_HiddenDangerCheck.Add(this); + this._FactoryId = value.FactoryId; + } + else + { + this._FactoryId = default(string); + } + this.SendPropertyChanged("Base_Factory"); + } + } + } + + 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_RiskControl")] + public partial class SYHSEData_RiskControl : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _FactoryId; + + private string _RiskControlName; + + private System.Nullable _ReportDate; + + private EntityRef _Base_Factory; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnFactoryIdChanging(string value); + partial void OnFactoryIdChanged(); + partial void OnRiskControlNameChanging(string value); + partial void OnRiskControlNameChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + #endregion + + public SYHSEData_RiskControl() + { + this._Base_Factory = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactoryId", DbType="NVarChar(50)")] + public string FactoryId + { + get + { + return this._FactoryId; + } + set + { + if ((this._FactoryId != value)) + { + if (this._Base_Factory.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnFactoryIdChanging(value); + this.SendPropertyChanging(); + this._FactoryId = value; + this.SendPropertyChanged("FactoryId"); + this.OnFactoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskControlName", DbType="NVarChar(500)")] + public string RiskControlName + { + get + { + return this._RiskControlName; + } + set + { + if ((this._RiskControlName != value)) + { + this.OnRiskControlNameChanging(value); + this.SendPropertyChanging(); + this._RiskControlName = value; + this.SendPropertyChanged("RiskControlName"); + this.OnRiskControlNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYHSEData_RiskControl_Base_Factory", Storage="_Base_Factory", ThisKey="FactoryId", OtherKey="FactoryId", IsForeignKey=true)] + public Base_Factory Base_Factory + { + get + { + return this._Base_Factory.Entity; + } + set + { + Base_Factory previousValue = this._Base_Factory.Entity; + if (((previousValue != value) + || (this._Base_Factory.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Factory.Entity = null; + previousValue.SYHSEData_RiskControl.Remove(this); + } + this._Base_Factory.Entity = value; + if ((value != null)) + { + value.SYHSEData_RiskControl.Add(this); + this._FactoryId = value.FactoryId; + } + else + { + this._FactoryId = default(string); + } + this.SendPropertyChanged("Base_Factory"); + } + } + } + + 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_SYHSE")] public partial class SYHSEData_SYHSE : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 15cc81a8..4982201c 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -139,6 +139,11 @@ + + + + +