diff --git a/DataBase/版本日志/SGGLDB_WH_2023-03-08_子公司实业脚本.sql b/DataBase/版本日志/SGGLDB_WH_2023-03-08_子公司实业脚本.sql new file mode 100644 index 00000000..017b8292 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-03-08_子公司实业脚本.sql @@ -0,0 +1,214 @@ + +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 + +alter table [dbo].[HSSEData_HSSE] alter column [TotalEnergyConsumption] decimal(18,4) null +alter table [dbo].[HSSEData_HSSE] alter column [IncomeComprehensiveEnergyConsumption] decimal(18,4) null +alter table [dbo].[HSSEData_HSSE] alter column [NewWaterConsumption] decimal(18,4) null +go \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 76b70517..c5ff2276 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -151,6 +151,7 @@ + @@ -735,6 +736,7 @@ + @@ -746,6 +748,9 @@ + + + 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 feed20d4..9a07fd70 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4926,5 +4926,11 @@ namespace BLL /// public const string Project_SYHSEData_SYHSEMenuId = ""; #endregion + + public const string Base_FactoryMenuId = "CD167198-1667-4552-9876-E768C2542C30"; + /// + /// 实业 + /// + public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C"; } } \ No newline at end of file diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 25def388..a0a7db6e 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -693,5 +693,20 @@ namespace BLL } return list; } + + 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; + } } } 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..34061ef9 --- /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_CWCEC; + Item.CollCropCode = UnitService.GetUnitByUnitId(Const.UnitId_CWCEC).CollCropCode; + Item.UnitName= UnitService.GetUnitByUnitId(Const.UnitId_CWCEC).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..d60e7bf3 --- /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_CWCEC; + 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/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 5cf49ae7..689ae4d0 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -204,6 +204,8 @@ + + @@ -1614,6 +1616,8 @@ + + @@ -5837,6 +5841,20 @@ AccidentType.aspx + + BaseFactory.aspx + ASPXCodeBehind + + + BaseFactory.aspx + + + BaseFactoryEdit.aspx + ASPXCodeBehind + + + BaseFactoryEdit.aspx + Certificate.aspx ASPXCodeBehind @@ -14835,6 +14853,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/JDGL/WBS/WorkloadInputIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputIn.aspx.cs index 5f0eff3c..b962d88c 100644 --- a/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputIn.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputIn.aspx.cs @@ -214,6 +214,10 @@ namespace FineUIPro.Web.JDGL.WBS { try { + //strConn = "Provider=Microsoft.Jet.OleDb.4.0;" + + // "data source=" + Server.MapPath("ExcelFiles/MyExcelFile.xls") + + // ";Extended Properties='Excel 8.0; HDR=Yes; IMEX=1'"; //此连接只能操作Excel2003或之前版本(.xls)文件 + string oleDBConnString = String.Empty; oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; oleDBConnString += "Data Source="; diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx index fc4e6567..56c207db 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx @@ -34,7 +34,7 @@ @@ -99,13 +99,13 @@ FieldType="String" HeaderText="特种作业培训数" TextAlign="Left" HeaderTextAlign="Center" > + FieldType="String" HeaderText="能耗总量(万吨标准煤)" TextAlign="Left" HeaderTextAlign="Center" > + FieldType="String" HeaderText="万元营业收入综合能耗(吨标准煤/万元)" TextAlign="Left" HeaderTextAlign="Center" > + FieldType="String" HeaderText="用新水量(万吨)" TextAlign="Left" HeaderTextAlign="Center" > diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx index 0ce1c3cf..00b3e395 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx @@ -118,15 +118,15 @@ - + - + - + @@ -515,6 +515,9 @@ + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs index 009ab8df..9ee554fd 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs @@ -334,7 +334,7 @@ namespace FineUIPro.Web.ZHGL.DataSync } else { - var base_Unit = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_CWCEC); + var base_Unit = BLL.UnitService.GetUnitByUnitId(Const.UnitId_CWCEC); txtUnitName.Text = base_Unit.UnitName; txtCollCropCode.Text = base_Unit.CollCropCode; txtReportDate.SelectedDate = DateTime.Now; @@ -389,7 +389,7 @@ namespace FineUIPro.Web.ZHGL.DataSync } Model.HSSEData_HSSE table = new Model.HSSEData_HSSE(); - table.UnitId = BLL.Const.UnitId_CWCEC; + table.UnitId = Const.UnitId_CWCEC; table.CollCropCode = this.txtCollCropCode.Text; table.UnitName = this.txtUnitName.Text; table.ReportDate = this.txtReportDate.SelectedDate; @@ -403,9 +403,9 @@ namespace FineUIPro.Web.ZHGL.DataSync table.SafeTrainNum = Funs.GetNewInt(this.txtSafeTrainNum.Text); table.SpecialTrainNum = Funs.GetNewInt(this.txtSpecialTrainNum.Text); table.SpecialOperationTrainNum = Funs.GetNewInt(this.txtSpecialOperationTrainNum.Text); - table.TotalEnergyConsumption = Funs.GetNewInt(this.txtTotalEnergyConsumption.Text); - table.IncomeComprehensiveEnergyConsumption = Funs.GetNewInt(this.txtIncomeComprehensiveEnergyConsumption.Text); - table.NewWaterConsumption = Funs.GetNewInt(this.txtNewWaterConsumption.Text); + table.TotalEnergyConsumption = Funs.GetNewDecimalOrZero(this.txtTotalEnergyConsumption.Text); + table.IncomeComprehensiveEnergyConsumption = Funs.GetNewDecimalOrZero(this.txtIncomeComprehensiveEnergyConsumption.Text); + table.NewWaterConsumption = Funs.GetNewDecimalOrZero(this.txtNewWaterConsumption.Text); table.HeadOfficeInspectorGeneralNum = Funs.GetNewInt(this.txtHeadOfficeInspectorGeneralNum.Text); table.HeadOfficeFullTimeNum = Funs.GetNewInt(this.txtHeadOfficeFullTimeNum.Text); table.BranchInspectorGeneralNum = Funs.GetNewInt(this.txtBranchInspectorGeneralNum.Text); @@ -551,7 +551,301 @@ namespace FineUIPro.Web.ZHGL.DataSync } } } - #endregion + #endregion + #region 复制数据 + /// + /// 复制报表数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + Model.HSSEData_HSSE model = Funs.DB.HSSEData_HSSE.OrderByDescending(x=>x.ReportDate).FirstOrDefault(); + if (model != null) + { + if (model.BeUnderConstructionNum.HasValue) + { + this.txtBeUnderConstructionNum.Text = model.BeUnderConstructionNum.Value.ToString(); + } + if (model.ShutdownNum.HasValue) + { + this.txtShutdownNum.Text = model.ShutdownNum.Value.ToString(); + } + if (model.JoinConstructionPersonNum.HasValue) + { + this.txtJoinConstructionPersonNum.Text = model.JoinConstructionPersonNum.Value.ToString(); + } + if (model.MajorProjectsUnderConstructionNum.HasValue) + { + this.txtMajorProjectsUnderConstructionNum.Text = model.MajorProjectsUnderConstructionNum.Value.ToString(); + } + if (model.TotalWorkingHour.HasValue) + { + this.txtTotalWorkingHour.Text = model.TotalWorkingHour.Value.ToString(); + } + if (model.LostWorkingHour.HasValue) + { + this.txtLostWorkingHour.Text = model.LostWorkingHour.Value.ToString(); + } + if (model.SafeWorkingHour.HasValue) + { + this.txtSafeWorkingHour.Text = model.SafeWorkingHour.Value.ToString(); + } + if (model.SafeTrainNum.HasValue) + { + this.txtSafeTrainNum.Text = model.SafeTrainNum.Value.ToString(); + } + if (model.SpecialTrainNum.HasValue) + { + this.txtSpecialTrainNum.Text = model.SpecialTrainNum.Value.ToString(); + } + if (model.SpecialOperationTrainNum.HasValue) + { + this.txtSpecialOperationTrainNum.Text = model.SpecialOperationTrainNum.Value.ToString(); + } + if (model.TotalEnergyConsumption.HasValue) + { + this.txtTotalEnergyConsumption.Text = model.TotalEnergyConsumption.Value.ToString(); + } + if (model.IncomeComprehensiveEnergyConsumption.HasValue) + { + this.txtIncomeComprehensiveEnergyConsumption.Text = model.IncomeComprehensiveEnergyConsumption.Value.ToString(); + } + if (model.NewWaterConsumption.HasValue) + { + this.txtNewWaterConsumption.Text = model.NewWaterConsumption.Value.ToString(); + } + if (model.HeadOfficeInspectorGeneralNum.HasValue) + { + this.txtHeadOfficeInspectorGeneralNum.Text = model.HeadOfficeInspectorGeneralNum.Value.ToString(); + } + if (model.HeadOfficeFullTimeNum.HasValue) + { + this.txtHeadOfficeFullTimeNum.Text = model.HeadOfficeFullTimeNum.Value.ToString(); + } + if (model.BranchInspectorGeneralNum.HasValue) + { + this.txtBranchInspectorGeneralNum.Text = model.BranchInspectorGeneralNum.Value.ToString(); + } + if (model.BranchFullTimeNum.HasValue) + { + this.txtBranchFullTimeNum.Text = model.BranchFullTimeNum.Value.ToString(); + } + if (model.ProjectInspectorGeneralNum.HasValue) + { + this.txtProjectInspectorGeneralNum.Text = model.ProjectInspectorGeneralNum.Value.ToString(); + } + if (model.ProjectFullTimeNum.HasValue) + { + this.txtProjectFullTimeNum.Text = model.ProjectFullTimeNum.Value.ToString(); + } + if (model.ProjectSafetyMonitorNum.HasValue) + { + this.txtProjectSafetyMonitorNum.Text = model.ProjectSafetyMonitorNum.Value.ToString(); + } + if (model.SafetyInjectionEngineer.HasValue) + { + this.txtSafetyInjectionEngineer.Text = model.SafetyInjectionEngineer.Value.ToString(); + } + if (model.CertificateANum.HasValue) + { + this.txtCertificateANum.Text = model.CertificateANum.Value.ToString(); + } + if (model.CertificateBNum.HasValue) + { + this.txtCertificateBNum.Text = model.CertificateBNum.Value.ToString(); + } + if (model.CertificateCNum.HasValue) + { + this.txtCertificateCNum.Text = model.CertificateCNum.Value.ToString(); + } + if (model.SafetyCommitteeMeetingNum.HasValue) + { + this.txtSafetyCommitteeMeetingNum.Text = model.SafetyCommitteeMeetingNum.Value.ToString(); + } + if (model.EnterpriseTopicsMeetingNum.HasValue) + { + this.txtEnterpriseTopicsMeetingNum.Text = model.EnterpriseTopicsMeetingNum.Value.ToString(); + } + if (model.ProjectSafetyLeadingGroupMeetingNum.HasValue) + { + this.txtProjectSafetyLeadingGroupMeetingNum.Text = model.ProjectSafetyLeadingGroupMeetingNum.Value.ToString(); + } + if (model.ProjectSafetyMeetingNum.HasValue) + { + this.txtProjectSafetyMeetingNum.Text = model.ProjectSafetyMeetingNum.Value.ToString(); + } + if (model.CompanyLeadShiftCheckNum.HasValue) + { + this.txtCompanyLeadShiftCheckNum.Text = model.CompanyLeadShiftCheckNum.Value.ToString(); + } + if (model.CompanyComprehensiveCheckNum.HasValue) + { + this.txtCompanyComprehensiveCheckNum.Text = model.CompanyComprehensiveCheckNum.Value.ToString(); + } + if (model.CompanySpecialCheckNum.HasValue) + { + this.txtCompanySpecialCheckNum.Text = model.CompanySpecialCheckNum.Value.ToString(); + } + if (model.ProjectLeadShiftCheckNum.HasValue) + { + this.txtProjectLeadShiftCheckNum.Text = model.ProjectLeadShiftCheckNum.Value.ToString(); + } + if (model.ProjectSpecialCheckNum.HasValue) + { + this.txtProjectSpecialCheckNum.Text = model.ProjectSpecialCheckNum.Value.ToString(); + } + if (model.ProjectMajorCheckNum.HasValue) + { + this.txtProjectMajorCheckNum.Text = model.ProjectMajorCheckNum.Value.ToString(); + } + if (model.NearMissNum.HasValue) + { + this.txtNearMissNum.Text = model.NearMissNum.Value.ToString(); + } + if (model.RecordableEventNum.HasValue) + { + this.txtRecordableEventNum.Text = model.RecordableEventNum.Value.ToString(); + } + if (model.GeneralAccidentNum.HasValue) + { + this.txtGeneralAccidentNum.Text = model.GeneralAccidentNum.Value.ToString(); + } + if (model.MajorAccidentNum.HasValue) + { + this.txtMajorAccidentNum.Text = model.MajorAccidentNum.Value.ToString(); + } + if (model.SeriousAccidentNum.HasValue) + { + this.txtSeriousAccidentNum.Text = model.SeriousAccidentNum.Value.ToString(); + } + if (model.SpecialSeriousAccidentNum.HasValue) + { + this.txtSpecialSeriousAccidentNum.Text = model.SpecialSeriousAccidentNum.Value.ToString(); + } + if (model.CompanyComprehensivePlanNum.HasValue) + { + this.txtCompanyComprehensivePlanNum.Text = model.CompanyComprehensivePlanNum.Value.ToString(); + } + if (model.CompanySpecialPlanNum.HasValue) + { + this.txtCompanySpecialPlanNum.Text = model.CompanySpecialPlanNum.Value.ToString(); + } + if (model.CompanyOnSiteDisposalPlan.HasValue) + { + this.txtCompanyOnSiteDisposalPlan.Text = model.CompanyOnSiteDisposalPlan.Value.ToString(); + } + if (model.CompanyDrillNum.HasValue) + { + this.txtCompanyDrillNum.Text = model.CompanyDrillNum.Value.ToString(); + } + if (model.ProjectComprehensivePlanNum.HasValue) + { + this.txtProjectComprehensivePlanNum.Text = model.ProjectComprehensivePlanNum.Value.ToString(); + } + if (model.ProjectSpecialPlanNum.HasValue) + { + this.txtProjectSpecialPlanNum.Text = model.ProjectSpecialPlanNum.Value.ToString(); + } + if (model.ProjectOnSiteDisposalPlan.HasValue) + { + this.txtProjectOnSiteDisposalPlan.Text = model.ProjectOnSiteDisposalPlan.Value.ToString(); + } + if (model.ProjectDrillNum.HasValue) + { + this.txtProjectDrillNum.Text = model.ProjectDrillNum.Value.ToString(); + } + if (model.CostExtract.HasValue) + { + this.txtCostExtract.Text = model.CostExtract.Value.ToString(); + } + if (model.CostUse.HasValue) + { + this.txtCostUse.Text = model.CostUse.Value.ToString(); + } + if (model.UseEquipmentNum.HasValue) + { + this.txtUseEquipmentNum.Text = model.UseEquipmentNum.Value.ToString(); + } + if (model.SpecialEquipmentNum.HasValue) + { + this.txtSpecialEquipmentNum.Text = model.SpecialEquipmentNum.Value.ToString(); + } + if (model.LicensesNum.HasValue) + { + this.txtLicensesNum.Text = model.LicensesNum.Value.ToString(); + } + if (model.LicensesCloseNum.HasValue) + { + this.txtLicensesCloseNum.Text = model.LicensesCloseNum.Value.ToString(); + } + if (model.GeneralClosedNum.HasValue) + { + this.txtGeneralClosedNum.Text = model.GeneralClosedNum.Value.ToString(); + } + if (model.GeneralNotClosedNum.HasValue) + { + this.txtGeneralNotClosedNum.Text = model.GeneralNotClosedNum.Value.ToString(); + } + if (model.MajorClosedNum.HasValue) + { + this.txtMajorClosedNum.Text = model.MajorClosedNum.Value.ToString(); + } + if (model.MajorNotClosedNum.HasValue) + { + this.txtMajorNotClosedNum.Text = model.MajorNotClosedNum.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.MediumRiskNum.HasValue) + { + this.txtMediumRiskNum.Text = model.MediumRiskNum.Value.ToString(); + } + if (model.HighRiskNum.HasValue) + { + this.txtHighRiskNum.Text = model.HighRiskNum.Value.ToString(); + } + if (model.CompletedNum.HasValue) + { + this.txtCompletedNum.Text = model.CompletedNum.Value.ToString(); + } + if (model.TrainPersonNum.HasValue) + { + this.txtTrainPersonNum.Text = model.TrainPersonNum.Value.ToString(); + } + if (model.ConstructionNum.HasValue) + { + this.txtConstructionNum.Text = model.ConstructionNum.Value.ToString(); + } + if (model.FinishedNum.HasValue) + { + this.txtFinishedNum.Text = model.FinishedNum.Value.ToString(); + } + if (model.SuperCompletedNum.HasValue) + { + this.txtSuperCompletedNum.Text = model.SuperCompletedNum.Value.ToString(); + } + if (model.SuperTrainPersonNum.HasValue) + { + this.txtSuperTrainPersonNum.Text = model.SuperTrainPersonNum.Value.ToString(); + } + if (model.SuperConstructionNum.HasValue) + { + this.txtSuperConstructionNum.Text = model.SuperConstructionNum.Value.ToString(); + } + if (model.SuperFinishedNum.HasValue) + { + this.txtSuperFinishedNum.Text = model.SuperFinishedNum.Value.ToString(); + } + } + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.designer.cs index 752e942d..4c290241 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ZHGL.DataSync -{ - - - public partial class HSSEData_HSSEEdit - { - +namespace FineUIPro.Web.ZHGL.DataSync { + + + public partial class HSSEData_HSSEEdit { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Form15 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form15; - + /// /// Panel1 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// GroupPanel1 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel1; - + /// /// SimpleForm2 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm2; - + /// /// txtCollCropCode 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCollCropCode; - + /// /// txtUnitName 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUnitName; - + /// /// txtReportDate 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtReportDate; - + /// /// GroupPanel2 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel2; - + /// /// Form2 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form2; - + /// /// txtBeUnderConstructionNum 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtBeUnderConstructionNum; - + /// /// txtShutdownNum 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtShutdownNum; - + /// /// txtJoinConstructionPersonNum 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtJoinConstructionPersonNum; - + /// /// txtMajorProjectsUnderConstructionNum 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMajorProjectsUnderConstructionNum; - + /// /// GroupPanel3 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel3; - + /// /// Form3 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form3; - + /// /// txtTotalWorkingHour 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtTotalWorkingHour; - + /// /// txtLostWorkingHour 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtLostWorkingHour; - + /// /// txtSafeWorkingHour 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSafeWorkingHour; - + /// /// GroupPanel4 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel4; - + /// /// Form4 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form4; - + /// /// txtSafeTrainNum 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSafeTrainNum; - + /// /// txtSpecialTrainNum 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSpecialTrainNum; - + /// /// txtSpecialOperationTrainNum 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSpecialOperationTrainNum; - + /// /// GroupPanel5 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel5; - + /// /// Form5 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form5; - + /// /// txtTotalEnergyConsumption 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtTotalEnergyConsumption; - + /// /// txtIncomeComprehensiveEnergyConsumption 控件。 /// @@ -274,7 +272,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtIncomeComprehensiveEnergyConsumption; - + /// /// txtNewWaterConsumption 控件。 /// @@ -283,7 +281,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtNewWaterConsumption; - + /// /// GroupPanel6 控件。 /// @@ -292,7 +290,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel6; - + /// /// Form6 控件。 /// @@ -301,7 +299,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form6; - + /// /// txtHeadOfficeInspectorGeneralNum 控件。 /// @@ -310,7 +308,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtHeadOfficeInspectorGeneralNum; - + /// /// txtHeadOfficeFullTimeNum 控件。 /// @@ -319,7 +317,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtHeadOfficeFullTimeNum; - + /// /// txtBranchInspectorGeneralNum 控件。 /// @@ -328,7 +326,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtBranchInspectorGeneralNum; - + /// /// txtBranchFullTimeNum 控件。 /// @@ -337,7 +335,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtBranchFullTimeNum; - + /// /// txtProjectInspectorGeneralNum 控件。 /// @@ -346,7 +344,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectInspectorGeneralNum; - + /// /// txtProjectFullTimeNum 控件。 /// @@ -355,7 +353,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectFullTimeNum; - + /// /// txtProjectSafetyMonitorNum 控件。 /// @@ -364,7 +362,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectSafetyMonitorNum; - + /// /// txtSafetyInjectionEngineer 控件。 /// @@ -373,7 +371,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSafetyInjectionEngineer; - + /// /// txtCertificateANum 控件。 /// @@ -382,7 +380,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCertificateANum; - + /// /// txtCertificateBNum 控件。 /// @@ -391,7 +389,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCertificateBNum; - + /// /// txtCertificateCNum 控件。 /// @@ -400,7 +398,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCertificateCNum; - + /// /// GroupPanel7 控件。 /// @@ -409,7 +407,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel7; - + /// /// Form7 控件。 /// @@ -418,7 +416,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form7; - + /// /// txtSafetyCommitteeMeetingNum 控件。 /// @@ -427,7 +425,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSafetyCommitteeMeetingNum; - + /// /// txtEnterpriseTopicsMeetingNum 控件。 /// @@ -436,7 +434,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtEnterpriseTopicsMeetingNum; - + /// /// txtProjectSafetyLeadingGroupMeetingNum 控件。 /// @@ -445,7 +443,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectSafetyLeadingGroupMeetingNum; - + /// /// txtProjectSafetyMeetingNum 控件。 /// @@ -454,7 +452,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectSafetyMeetingNum; - + /// /// GroupPanel8 控件。 /// @@ -463,7 +461,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel8; - + /// /// Form8 控件。 /// @@ -472,7 +470,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form8; - + /// /// txtCompanyLeadShiftCheckNum 控件。 /// @@ -481,7 +479,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanyLeadShiftCheckNum; - + /// /// txtCompanyComprehensiveCheckNum 控件。 /// @@ -490,7 +488,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanyComprehensiveCheckNum; - + /// /// txtCompanySpecialCheckNum 控件。 /// @@ -499,7 +497,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanySpecialCheckNum; - + /// /// txtProjectLeadShiftCheckNum 控件。 /// @@ -508,7 +506,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectLeadShiftCheckNum; - + /// /// txtProjectSpecialCheckNum 控件。 /// @@ -517,7 +515,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectSpecialCheckNum; - + /// /// txtProjectMajorCheckNum 控件。 /// @@ -526,7 +524,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectMajorCheckNum; - + /// /// GroupPanel9 控件。 /// @@ -535,7 +533,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel9; - + /// /// Form9 控件。 /// @@ -544,7 +542,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form9; - + /// /// txtNearMissNum 控件。 /// @@ -553,7 +551,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtNearMissNum; - + /// /// txtRecordableEventNum 控件。 /// @@ -562,7 +560,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtRecordableEventNum; - + /// /// txtGeneralAccidentNum 控件。 /// @@ -571,7 +569,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtGeneralAccidentNum; - + /// /// txtMajorAccidentNum 控件。 /// @@ -580,7 +578,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMajorAccidentNum; - + /// /// txtSeriousAccidentNum 控件。 /// @@ -589,7 +587,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSeriousAccidentNum; - + /// /// txtSpecialSeriousAccidentNum 控件。 /// @@ -598,7 +596,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSpecialSeriousAccidentNum; - + /// /// GroupPanel10 控件。 /// @@ -607,7 +605,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel10; - + /// /// Form10 控件。 /// @@ -616,7 +614,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form10; - + /// /// txtCompanyComprehensivePlanNum 控件。 /// @@ -625,7 +623,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanyComprehensivePlanNum; - + /// /// txtCompanySpecialPlanNum 控件。 /// @@ -634,7 +632,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanySpecialPlanNum; - + /// /// txtCompanyOnSiteDisposalPlan 控件。 /// @@ -643,7 +641,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanyOnSiteDisposalPlan; - + /// /// txtCompanyDrillNum 控件。 /// @@ -652,7 +650,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompanyDrillNum; - + /// /// txtProjectComprehensivePlanNum 控件。 /// @@ -661,7 +659,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectComprehensivePlanNum; - + /// /// txtProjectSpecialPlanNum 控件。 /// @@ -670,7 +668,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectSpecialPlanNum; - + /// /// txtProjectOnSiteDisposalPlan 控件。 /// @@ -679,7 +677,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectOnSiteDisposalPlan; - + /// /// txtProjectDrillNum 控件。 /// @@ -688,7 +686,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectDrillNum; - + /// /// GroupPanel11 控件。 /// @@ -697,7 +695,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel11; - + /// /// Form11 控件。 /// @@ -706,7 +704,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form11; - + /// /// txtCostExtract 控件。 /// @@ -715,7 +713,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCostExtract; - + /// /// txtCostUse 控件。 /// @@ -724,7 +722,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCostUse; - + /// /// GroupPanel12 控件。 /// @@ -733,7 +731,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel12; - + /// /// Form12 控件。 /// @@ -742,7 +740,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form12; - + /// /// txtUseEquipmentNum 控件。 /// @@ -751,7 +749,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtUseEquipmentNum; - + /// /// txtSpecialEquipmentNum 控件。 /// @@ -760,7 +758,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSpecialEquipmentNum; - + /// /// GroupPanel13 控件。 /// @@ -769,7 +767,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel13; - + /// /// Form13 控件。 /// @@ -778,7 +776,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form13; - + /// /// txtLicensesNum 控件。 /// @@ -787,7 +785,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtLicensesNum; - + /// /// txtLicensesCloseNum 控件。 /// @@ -796,7 +794,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtLicensesCloseNum; - + /// /// GroupPanel14 控件。 /// @@ -805,7 +803,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel14; - + /// /// Form14 控件。 /// @@ -814,7 +812,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form14; - + /// /// txtGeneralClosedNum 控件。 /// @@ -823,7 +821,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtGeneralClosedNum; - + /// /// txtGeneralNotClosedNum 控件。 /// @@ -832,7 +830,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtGeneralNotClosedNum; - + /// /// txtMajorClosedNum 控件。 /// @@ -841,7 +839,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMajorClosedNum; - + /// /// txtMajorNotClosedNum 控件。 /// @@ -850,7 +848,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMajorNotClosedNum; - + /// /// GroupPanel16 控件。 /// @@ -859,7 +857,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel16; - + /// /// Form16 控件。 /// @@ -868,7 +866,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form16; - + /// /// txtGeneralRiskNum 控件。 /// @@ -877,7 +875,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtGeneralRiskNum; - + /// /// txtLowRiskNum 控件。 /// @@ -886,7 +884,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtLowRiskNum; - + /// /// txtMediumRiskNum 控件。 /// @@ -895,7 +893,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMediumRiskNum; - + /// /// txtHighRiskNum 控件。 /// @@ -904,7 +902,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtHighRiskNum; - + /// /// GroupPanel17 控件。 /// @@ -913,7 +911,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel17; - + /// /// Form17 控件。 /// @@ -922,7 +920,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form17; - + /// /// txtCompletedNum 控件。 /// @@ -931,7 +929,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompletedNum; - + /// /// txtTrainPersonNum 控件。 /// @@ -940,7 +938,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtTrainPersonNum; - + /// /// txtConstructionNum 控件。 /// @@ -949,7 +947,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtConstructionNum; - + /// /// txtFinishedNum 控件。 /// @@ -958,7 +956,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtFinishedNum; - + /// /// txtSuperCompletedNum 控件。 /// @@ -967,7 +965,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSuperCompletedNum; - + /// /// txtSuperTrainPersonNum 控件。 /// @@ -976,7 +974,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSuperTrainPersonNum; - + /// /// txtSuperConstructionNum 控件。 /// @@ -985,7 +983,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSuperConstructionNum; - + /// /// txtSuperFinishedNum 控件。 /// @@ -994,7 +992,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSuperFinishedNum; - + /// /// GroupPanel15 控件。 /// @@ -1003,7 +1001,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.GroupPanel GroupPanel15; - + /// /// Form18 控件。 /// @@ -1012,7 +1010,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form18; - + /// /// Grid1 控件。 /// @@ -1021,7 +1019,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -1030,7 +1028,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// btnNew 控件。 /// @@ -1039,7 +1037,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnDelete 控件。 /// @@ -1048,7 +1046,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// DropTypeName 控件。 /// @@ -1057,7 +1055,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList DropTypeName; - + /// /// txtTotalNum 控件。 /// @@ -1066,7 +1064,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtTotalNum; - + /// /// txtNeedRectifyNum 控件。 /// @@ -1075,7 +1073,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtNeedRectifyNum; - + /// /// Toolbar1 控件。 /// @@ -1084,7 +1082,16 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + /// /// btnSave 控件。 /// @@ -1093,7 +1100,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnSyn 控件。 /// @@ -1102,7 +1109,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSyn; - + /// /// btnClose 控件。 /// @@ -1111,7 +1118,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// Window1 控件。 /// 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_CLGL.xml b/SGGL/FineUIPro.Web/common/Menu_CLGL.xml index cf58088b..3a2abafc 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CLGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CLGL.xml @@ -1,11 +1,21 @@  - - - - - + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index 31f29e93..11e96ba3 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -19,6 +19,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 4b5bf1e2..ec52492c 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -1,54 +1,10 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 42a69946..bae60bc8 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -129,6 +129,7 @@ + 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 588cd80a..78c1a686 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -54,4 +54,9 @@ + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx index 9c99da6a..5e92b1a1 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx @@ -192,16 +192,16 @@
环保数据
-
能耗总量
-
<%=showData(hSSEData_HSSE.TotalEnergyConsumption,"--") %>
+
能耗总量
(万吨标准煤)
+
<%=showDecimalData(hSSEData_HSSE.TotalEnergyConsumption,"--") %>
-
万元营业收入综合能耗
-
<%=showData(hSSEData_HSSE.IncomeComprehensiveEnergyConsumption,"--") %>
+
万元营业收入综合能耗
(吨标准煤/万元)
+
<%=showDecimalData(hSSEData_HSSE.IncomeComprehensiveEnergyConsumption,"--") %>
-
用新水量
-
<%=showData(hSSEData_HSSE.NewWaterConsumption,"--") %>
+
用新水量
(万吨)
+
<%=showDecimalData(hSSEData_HSSE.NewWaterConsumption,"--") %>
@@ -415,7 +415,6 @@