From 4a1b636ce0ff9aef6f087ab39a1e00218f306b77 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Wed, 8 Apr 2026 14:03:39 +0800 Subject: [PATCH] 1 --- SGGL/BLL/BaseInfo/AccidentTypeService.cs | 1 - SGGL/BLL/BaseInfo/BaseFactoryService.cs | 32 +- SGGL/BLL/BaseInfo/CNProfessionalService.cs | 2 - SGGL/BLL/BaseInfo/CertificateService.cs | 2 - SGGL/BLL/BaseInfo/CostTypeService.cs | 2 +- .../BLL/BaseInfo/DesignProfessionalService.cs | 2 +- SGGL/BLL/BaseInfo/EmergencyTypeService.cs | 2 +- SGGL/BLL/BaseInfo/EmployeeCategoryService.cs | 2 +- SGGL/BLL/BaseInfo/EmployeeSubgroupService.cs | 2 +- .../BaseInfo/HSSEStandardListTypeService.cs | 2 +- SGGL/BLL/BaseInfo/InspectionAreaService.cs | 4 +- .../BaseInfo/InstitutionalDivisionService.cs | 2 +- .../BaseInfo/LawsRegulationsTypeService.cs | 2 +- SGGL/BLL/BaseInfo/LicenseTypeService.cs | 2 +- SGGL/BLL/BaseInfo/ManageRuleTypeService.cs | 2 +- SGGL/BLL/BaseInfo/PersonManageService.cs | 5 +- SGGL/BLL/BaseInfo/PictureTypeService.cs | 2 +- SGGL/BLL/BaseInfo/PositionService.cs | 2 +- SGGL/BLL/BaseInfo/PostService.cs | 7 +- SGGL/BLL/BaseInfo/PostTitleService.cs | 2 +- .../BaseInfo/PracticeCertificateService.cs | 2 +- SGGL/BLL/BaseInfo/ProjectTypeService.cs | 2 +- .../BaseInfo/QualityQuestionTypeService.cs | 2 +- SGGL/BLL/BaseInfo/QuestionTypeService.cs | 2 +- .../BaseInfo/RulesRegulationsTypeService.cs | 2 +- SGGL/BLL/BaseInfo/SafetyMeasuresService.cs | 3 +- SGGL/BLL/BaseInfo/SecretLevelService.cs | 2 +- .../BaseInfo/SolutionTempleteTypeService.cs | 6 +- SGGL/BLL/BaseInfo/SpecialEquipmentService.cs | 2 +- SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs | 2 +- SGGL/BLL/BaseInfo/SteelService.cs | 4 +- SGGL/BLL/BaseInfo/TrainLevelService.cs | 2 +- SGGL/BLL/BaseInfo/TrainTypeService.cs | 2 +- SGGL/BLL/BaseInfo/UnitTypeService.cs | 2 +- SGGL/BLL/BaseInfo/VehicleService.cs | 2 +- SGGL/BLL/BaseInfo/WorkPostService.cs | 2 +- SGGL/BLL/BaseInfo/WorkStageService.cs | 6 +- .../CQMS/Check/CheckControlApproveService.cs | 11 +- SGGL/BLL/CQMS/Check/CheckControlService.cs | 2 +- .../Check/CheckEquipmentApproveService.cs | 9 +- SGGL/BLL/CQMS/Check/CheckEquipmentService.cs | 5 +- SGGL/BLL/CQMS/Check/CheckFineService.cs | 2 +- SGGL/BLL/CQMS/Check/CheckMonthService.cs | 5 +- SGGL/BLL/CQMS/Check/DesignApproveService.cs | 9 +- SGGL/BLL/CQMS/Check/DesignService.cs | 4 +- SGGL/BLL/CQMS/Check/FileCabinetService.cs | 5 +- .../CQMS/Check/JointCheckApproveService.cs | 9 +- .../CQMS/Check/MonthSpotCheckDetailService.cs | 3 +- .../Check/SpecialEquipmentDetailService.cs | 3 +- .../BLL/CQMS/Check/SpotCheckApproveService.cs | 12 +- SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs | 3 +- SGGL/BLL/CQMS/Check/SpotCheckService.cs | 2 +- .../TechnicalContactListApproveService.cs | 11 +- .../CQMS/Check/TechnicalContactListService.cs | 4 +- .../Comprehensive/DataDistributionService.cs | 3 +- .../Comprehensive/DataReceivingService.cs | 3 +- .../Comprehensive/DesignChangeOrderService.cs | 4 +- .../Comprehensive/DesignDetailsService.cs | 4 +- .../Comprehensive/DesignDrawingsService.cs | 3 +- .../CQMS/Comprehensive/FinalFileService.cs | 2 +- .../GeneralPlanApprovalItemService.cs | 3 +- .../GeneralPlanApprovalService.cs | 3 +- .../InspectionEquipmentService.cs | 3 +- .../Comprehensive/InspectionMachineService.cs | 3 +- .../Comprehensive/InspectionPersonService.cs | 2 +- .../MajorPlanApprovalItemService.cs | 3 +- .../Comprehensive/MajorPlanApprovalService.cs | 3 +- .../Comprehensive/NCRManagementService.cs | 3 +- .../CQMS/Comprehensive/PressurePipeService.cs | 3 +- .../Comprehensive/QualityAccidentService.cs | 3 +- .../SiteVisaManagementService.cs | 3 +- .../Comprehensive/SpecialEquipmentService.cs | 3 +- .../CQMSConstructionLogApproveService.cs | 7 +- ...CQMSConstructionLogImageProgressService.cs | 2 +- .../CQMSConstructionLogItemService.cs | 2 +- .../CQMSConstructionLogService.cs | 2 +- .../CQMS/DataBase/DataTypeProjectService.cs | 2 +- .../Information/ContactSheetApproveService.cs | 6 +- .../CQMS/ManageReport/ComprehensiveService.cs | 2 +- .../ConstructionProblemsService.cs | 2 +- .../ManageReport/NextQualityControlService.cs | 2 +- .../CQMS/ManageReport/QualityGoalService.cs | 2 +- .../ManageReport/RowMaterialProblemService.cs | 3 +- .../ThisWeekOrMonthContentService.cs | 2 +- .../ManageReport/WeekAndMonthReportService.cs | 3 +- .../ProcessControl/HotProessManageService.cs | 3 +- .../InspectionManagementDetailService.cs | 3 +- .../InspectionManagementService.cs | 4 +- .../NondestructiveTestService.cs | 2 +- .../TestPackageManagementService.cs | 3 +- .../Unqualified/WorkContactApproveService.cs | 10 +- .../WBS/BreakdownProjectAuditRecordService.cs | 4 +- SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs | 8 +- SGGL/BLL/CQMS/WBS/BreakdownService.cs | 4 +- SGGL/BLL/CQMS/WBS/DivisionProjectService.cs | 4 +- SGGL/BLL/CQMS/WBS/DivisionService.cs | 4 +- SGGL/BLL/CQMS/WBS/ProjectQualityService.cs | 9 +- SGGL/BLL/Common/AttachFileService.cs | 5 +- SGGL/BLL/Common/Const.cs | 4 + SGGL/BLL/Common/ProjectDataFlowSetService.cs | 5 +- SGGL/BLL/Common/WeatherService.cs | 2 +- SGGL/BLL/DigData/HSEDataCollectService.cs | 3 +- SGGL/BLL/DoorServer/DoorServerService.cs | 2 +- .../HJGL_EMInventoryRecordsService.cs | 5 +- .../HJGL_EMaterialRegistService.cs | 6 +- .../HJGL_ElectrodeBakeService.cs | 6 +- .../HJGL_ElectrodeRecoveryService.cs | 2 +- .../HJGL_ElectrodeSecondaryBakeService.cs | 9 +- .../HJGL_MaterialApplyService.cs | 2 +- .../TrustManage/ShowTrustSearchService.cs | 3 +- .../TrustManage/TrustManageEditService.cs | 4 +- .../HJGL/WeldingManage/WeldReportService.cs | 2 +- .../HSSE/Accident/AccidentHandleService.cs | 2 +- .../Accident/AccidentPersonRecordService.cs | 2 +- .../Accident/AccidentReportOtherService.cs | 2 +- .../HSSE/Accident/AccidentReportService.cs | 2 +- SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs | 2 +- .../Check_CheckColligationDetailService.cs | 2 +- .../HSSE/Check/Check_CheckDayDetailService.cs | 2 +- .../Check/Check_CheckSpecialDetailService.cs | 2 +- .../Check/Check_ProjectLeaderCheckService.cs | 5 +- SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs | 2 +- SGGL/BLL/HSSE/Check/PunishNoticeService.cs | 2 +- SGGL/BLL/HSSE/Check/ViolationPersonService.cs | 2 +- .../HSSE/CostGoods/CostManageItemService.cs | 2 +- SGGL/BLL/HSSE/CostGoods/CostManageService.cs | 2 +- .../CostGoods/CostSmallDetailItemService.cs | 2 +- .../HSSE/CostGoods/CostSmallDetailService.cs | 2 +- SGGL/BLL/HSSE/CostGoods/ExpenseService.cs | 2 +- .../HSSE/EduTrain/AccidentCaseItemService.cs | 1 - SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs | 1 - .../EduTrain/CompanyTrainingItemService.cs | 5 +- .../EduTrain_TrainRecordDetailService.cs | 1 - .../EduTrain/EduTrain_TrainRecordService.cs | 2 - .../EduTrain/EduTrain_TrainTestService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TestPlanService.cs | 6 +- .../HSSE/EduTrain/TestRecordItemService.cs | 3 +- SGGL/BLL/HSSE/EduTrain/TestRecordService.cs | 2 +- .../HSSE/EduTrain/TestTrainingItemService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs | 3 +- .../HSSE/EduTrain/TrainTestDBItemService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs | 2 +- .../HSSE/EduTrain/TrainTestRecordService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs | 2 - .../HSSE/EduTrain/TrainingPlanItemService.cs | 6 +- SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs | 12 +- SGGL/BLL/HSSE/EduTrain/TrainingService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs | 5 +- .../HSSE/Emergency/DrillRecordListService.cs | 2 +- .../HSSE/Emergency/EmergencyListService.cs | 2 +- .../HSSE/Emergency/EmergencySupplyService.cs | 2 +- .../Emergency/EmergencyTeamAndTrainService.cs | 2 +- .../HSSE/Environmental/EIAReportService.cs | 2 +- .../EnvironmentalEmergencyPlanService.cs | 2 +- .../EnvironmentalMonitoringService.cs | 2 +- .../UnexpectedEnvironmentalService.cs | 2 +- .../HSSE/HSSESystem/HSSEMainDutyService.cs | 2 +- .../ServerSafetyInstitutionService.cs | 2 +- .../Hazard/ConstructionRiskApproveService.cs | 9 +- .../Hazard/ConstructionRiskCheckService.cs | 2 +- .../Hazard/ConstructionRiskListService.cs | 2 +- .../Hazard_EnvironmentalRiskItemService.cs | 3 +- .../Hazard_EnvironmentalRiskListService.cs | 2 +- .../HSSE/Hazard/Hazard_HazardListService.cs | 3 +- .../Hazard_HazardSelectedItemService.cs | 10 +- .../HSSE_Hazard_HazardRegisterService.cs | 2 +- .../EquipmentInItemService.cs | 2 +- .../InApproveManager/EquipmentInService.cs | 2 +- .../EquipmentOutItemService.cs | 2 +- .../InApproveManager/EquipmentOutService.cs | 2 +- .../EquipmentQualityInItemService.cs | 2 +- .../EquipmentQualityInService.cs | 2 +- .../GeneralEquipmentInItemService.cs | 2 +- .../GeneralEquipmentInService.cs | 2 +- .../GeneralEquipmentOutItemService.cs | 2 +- .../GeneralEquipmentOutService.cs | 2 +- .../ConstructionStandardIdentifyService.cs | 2 +- ...ConstructionStandardSelectedItemService.cs | 2 +- .../ProjectAccidentCauseReportItemService.cs | 2 +- .../ProjectAccidentCauseReportService.cs | 2 +- ...rillConductedQuarterlyReportItemService.cs | 2 +- ...ectDrillConductedQuarterlyReportService.cs | 2 +- ...ojectDrillPlanHalfYearReportItemService.cs | 2 +- .../ProjectDrillPlanHalfYearReportService.cs | 2 +- .../ProjectMillionsMonthlyReportService.cs | 2 +- .../ProjectSafetyQuarterlyReportService.cs | 2 +- SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs | 2 +- SGGL/BLL/HSSE/Law/LawRegulationListService.cs | 2 +- SGGL/BLL/HSSE/Law/ManageRuleService.cs | 2 +- SGGL/BLL/HSSE/Law/RulesRegulationsService.cs | 2 +- SGGL/BLL/HSSE/License/HSETechnicalService.cs | 2 +- .../BLL/HSSE/License/LicenseManagerService.cs | 2 +- SGGL/BLL/HSSE/License/LicensePublicService.cs | 2 +- .../HSSE/Manager/CompletionReportService.cs | 2 +- .../HSSE/Manager/HeadMonthReportBService.cs | 2 +- .../ManagerMonthB/AccidentReport2Service.cs | 2 +- .../ManagerMonthB/AccidentSortBService.cs | 3 +- .../ManagerMonthB/CheckSortBService.cs | 3 +- .../ManagerMonthB/CostStatisticService.cs | 4 +- .../ManagerMonthB/IncentiveSortBService.cs | 3 +- .../ManagerMonthB/ManhoursSortBService.cs | 3 +- .../ManagerMonthB/MeetingSortBService.cs | 3 +- .../ManagerMonthB/TrainSortBService.cs | 3 +- .../ManagerMonthC/AccidentSortCService.cs | 3 +- .../ManagerMonthC/ActivityDesCService.cs | 2 +- .../ManagerMonthC/CheckDetailSortCService.cs | 3 +- .../ManagerMonthC/CheckSortCService.cs | 3 +- .../ManagerMonthC/DrillSortCService.cs | 3 +- .../ManagerMonthC/EmergencySortCService.cs | 3 +- .../ManagerMonthC/HazardSortCService.cs | 3 +- .../Manager/ManagerMonthC/HseCostCService.cs | 4 +- .../ManagerMonthC/IncentiveSortCService.cs | 3 +- .../ManagerMonthC/MeetingSortCService.cs | 3 +- .../ManagerMonthC/OtherActiveSortCService.cs | 3 +- .../ManagerMonthC/OtherManagementCService.cs | 2 +- .../ManagerMonthC/PersonSortCService.cs | 3 +- .../Manager/ManagerMonthC/PlanCService.cs | 2 +- .../PromotionalActiviteSortCService.cs | 3 +- .../TrainActivitySortCService.cs | 3 +- .../ManagerMonthC/TrainSortCService.cs | 3 +- SGGL/BLL/HSSE/Material/MaterialService.cs | 2 +- SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs | 2 +- .../SafetyLeaderGroupMeetingService.cs | 2 +- .../BLL/HSSE/Meeting/SpecialMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs | 2 +- .../HazardDetectionService.cs | 2 +- .../OccupationalDiseaseAccidentService.cs | 2 +- .../PhysicalExaminationService.cs | 2 +- .../EquipmentPersonQualityService.cs | 2 +- .../EquipmentQualityAuditDetailService.cs | 2 +- .../QualityAudit/EquipmentQualityService.cs | 2 +- .../GeneralEquipmentQualityService.cs | 2 +- .../HSSE/QualityAudit/PersonQualityService.cs | 2 +- .../QualityAudit/SafePersonQualityService.cs | 2 +- .../SubUnitQualityAuditDetailService.cs | 2 +- .../QualityAudit/SubUnitQualityService.cs | 2 +- SGGL/BLL/HSSE/Resources/SignManageService.cs | 2 +- .../SafetyOrganizationService.cs | 2 +- .../BLL/HSSE/SitePerson/PersonInOutService.cs | 4 +- SGGL/BLL/HSSE/SitePerson/PersonService.cs | 8 +- .../SitePerson/SitePerson_CheckingService.cs | 2 +- .../SitePerson_DayReportUnitDetailService.cs | 2 +- ...SitePerson_MonthReportUnitDetailService.cs | 2 +- .../HSSE/Solution/ConstructSolutionService.cs | 2 +- .../HSSE/Solution/ExpertArgumentService.cs | 2 +- .../HSSE/Solution/SolutionTemplateService.cs | 2 +- SGGL/BLL/HSSE/Technique/EmergencyService.cs | 2 +- .../HSSE/Technique/EnvironmentalService.cs | 2 +- SGGL/BLL/HSSE/Technique/HazardListService.cs | 2 +- .../HSSE/Technique/HazardListTypeService.cs | 2 +- SGGL/BLL/HSSE/Technique/RectifyItemService.cs | 2 +- SGGL/BLL/HSSE/Technique/RectifyService.cs | 2 +- .../Technique/RiskEvaluationRecordService.cs | 2 +- .../HSSE/Technique/SpecialSchemeService.cs | 2 +- .../Technique_CheckItemDetailService.cs | 2 +- .../Technique_CheckItemSetService.cs | 2 +- .../ConstructionLogNewService.cs | 4 +- .../PersonStarLevelService.cs | 2 +- .../ProjectConstructionLogService.cs | 4 +- .../ProjectPersonStarService.cs | 3 +- .../InformationProject/StarLevelService.cs | 2 +- SGGL/BLL/Notice/NoticeService.cs | 2 +- .../ProjectEvaluationService.cs | 2 +- SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs | 4 +- SGGL/BLL/PZHGL/GJSX/GJSXProcessService.cs | 2 +- SGGL/BLL/PZHGL/GJSX/GJSXService.cs | 3 +- .../ConstructionLogService.cs | 2 +- .../ConstructionPlanApproveService.cs | 5 +- .../ConstructionPlanService.cs | 2 +- .../ConstructionReportApproveService.cs | 5 +- .../ConstructionReportService.cs | 2 +- .../InformationProject/PictureService.cs | 2 +- .../ReceiveFileManagerService.cs | 21 +- .../WorkHandoverApproveService.cs | 5 +- .../WorkHandoverDetailService.cs | 3 +- .../InformationProject/WorkHandoverService.cs | 2 +- .../PZHGL/ProjectData/ProjectMapService.cs | 2 +- SGGL/BLL/Person/PersonTotalService.cs | 2 +- SGGL/BLL/Person/Person_DutyService.cs | 2 +- SGGL/BLL/Person/Person_DutyTemplateService.cs | 2 +- .../Person_QuarterCheckApproveService.cs | 2 +- .../Person/Person_QuarterCheckItemService.cs | 2 +- SGGL/BLL/Person/Person_QuarterCheckService.cs | 2 +- SGGL/BLL/Person/Person_ShuntApproveService.cs | 9 +- SGGL/BLL/Person/Person_TrainingPlanService.cs | 2 +- .../Test/ServerTestPlanService.cs | 2 +- .../Test/ServerTestPlanTrainingService.cs | 2 +- .../Test/ServerTestRecordService.cs | 2 +- SGGL/BLL/ProjectData/MainItemService.cs | 4 +- SGGL/BLL/ProjectData/ProjectSateService.cs | 2 +- SGGL/BLL/ProjectData/ProjectSetMapService.cs | 2 +- SGGL/BLL/ProjectData/ProjectUnitService.cs | 3 +- SGGL/BLL/ProjectData/TeamGroupService.cs | 2 +- SGGL/BLL/ProjectData/UnitWorkService.cs | 2 +- SGGL/BLL/ProjectData/WorkAreaService.cs | 2 +- SGGL/BLL/SYHSE/SYHSEData_BaseService.cs | 4 +- .../SYHSEData_EnvironmentProtectionService.cs | 4 +- .../SYHSE/SYHSEData_HiddenDangersService.cs | 4 +- SGGL/BLL/SYHSE/SYHSEData_LicenceService.cs | 4 +- .../BLL/SYHSE/SYHSEData_MajorHazardService.cs | 4 +- SGGL/BLL/SYHSE/SYHSEData_PromiseService.cs | 4 +- SGGL/BLL/SYHSE/SYHSEData_RiskService.cs | 4 +- .../SubPackChangeRequestApproveService.cs | 3 +- .../SubPackChangeRequestService.cs | 4 +- .../SubPackTeamEvaluationApproveService.cs | 3 +- .../SubPackTeamEvaluationService.cs | 4 +- .../SubPackTeamListApproveService.cs | 3 +- .../SubPackManage/SubPackTeamListService.cs | 4 +- SGGL/BLL/SysManage/RoleItemService.cs | 2 +- SGGL/BLL/SysManage/RoleService.cs | 2 +- SGGL/BLL/SysManage/ScheduleService.cs | 2 +- SGGL/BLL/SysManage/SysHttplogService.cs | 14 +- SGGL/BLL/SysManage/SysMenuService.cs | 2 +- SGGL/BLL/SysManage/UnitService.cs | 2 +- SGGL/BLL/SysManage/UserService.cs | 2 +- .../InterFaceService/InterFaceLogService .cs | 6 +- .../ZHGL/DataSync/HJGLData_DefectService.cs | 16 +- .../HSSEData_HiddenDangerDetailService.cs | 14 +- .../DataSync/Hazard_RealTimeDeviceService.cs | 17 +- .../Project_CQMSDataService.cs | 11 +- .../Project_HJGLData_HJGLService.cs | 11 +- ...ject_HSSEData_HiddenDangerDetailService.cs | 4 +- .../Project_SYHSEData_SYHSEService.cs | 10 +- .../ZHGL/DataSync/SYHSEData_DataService.cs | 13 +- .../SYHSEData_HiddenDangerCheckService.cs | 16 +- .../DataSync/SYHSEData_RiskControlService.cs | 17 +- .../ZHGL/DataSync/SYHSEData_SYHSEService.cs | 2 +- .../Emergency/UnitDrillRecordListService.cs | 2 +- .../Emergency/UnitEmergencyListService.cs | 2 +- .../ZHGL/Environmental/EnergyReportService.cs | 11 +- .../Environmental/EnergyreportItemService .cs | 13 +- .../ProjectEnergyReportService.cs | 14 +- .../ProjectEnergyreportItemService .cs | 13 +- .../Information_EnvironmentaldataService.cs | 38 +- .../Meeting/CompanySafetyMeetingService.cs | 2 +- .../Meeting/CompanySpecialMeetingService.cs | 2 +- .../ZHGL/Person/CompanyBranchPersonService.cs | 2 +- SGGL/BLL/ZHGL/RealName/BasicDataService.cs | 2 +- SGGL/BLL/ZHGL/RealName/CityService.cs | 2 +- SGGL/BLL/ZHGL/RealName/CountryService.cs | 2 +- SGGL/BLL/ZHGL/RealName/OnPostService.cs | 5 +- .../ZHGL/RealName/RealName_ProjectService.cs | 2 +- .../Excel/DataIn/考试试题类型导入模版.xls | Bin 0 -> 18944 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../HSSE/EduTrain/TestTraining.aspx | 3 + .../HSSE/EduTrain/TestTraining.aspx.cs | 16 +- .../EduTrain/TestTraining.aspx.designer.cs | 9 + .../HSSE/EduTrain/TestTrainingIn.aspx | 84 ++++ .../HSSE/EduTrain/TestTrainingIn.aspx.cs | 367 ++++++++++++++++++ .../EduTrain/TestTrainingIn.aspx.designer.cs | 143 +++++++ SGGL/WebAPI/WebAPI.csproj | 1 - 353 files changed, 1378 insertions(+), 500 deletions(-) create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/考试试题类型导入模版.xls create mode 100644 SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.designer.cs diff --git a/SGGL/BLL/BaseInfo/AccidentTypeService.cs b/SGGL/BLL/BaseInfo/AccidentTypeService.cs index 366012df..fc75d382 100644 --- a/SGGL/BLL/BaseInfo/AccidentTypeService.cs +++ b/SGGL/BLL/BaseInfo/AccidentTypeService.cs @@ -8,7 +8,6 @@ namespace BLL /// public static class AccidentTypeService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据主键获取事故类型 diff --git a/SGGL/BLL/BaseInfo/BaseFactoryService.cs b/SGGL/BLL/BaseInfo/BaseFactoryService.cs index a07ab6e2..af6ae2ba 100644 --- a/SGGL/BLL/BaseInfo/BaseFactoryService.cs +++ b/SGGL/BLL/BaseInfo/BaseFactoryService.cs @@ -11,8 +11,6 @@ namespace BLL public static class Base_FactoryService { - public static Model.CNPCDB db = Funs.DB; - #region 获取列表 /// @@ -25,13 +23,14 @@ namespace BLL } public static List GetBase_FactoryByModle(Model.Base_Factory table) { + Model.CNPCDB db = Funs.DB; 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)) + (string.IsNullOrEmpty(table.Address) || x.Address.Contains(table.Address)) select x ; @@ -39,9 +38,8 @@ namespace BLL } public static List GetBase_FactoryList() { - var q = (from x in db.Base_Factory orderby x.FactoryCode select x).ToList(); - - + Model.CNPCDB db = Funs.DB; + var q = (from x in db.Base_Factory orderby x.FactoryCode select x).ToList(); return q; } /// 获取分页列表 @@ -74,12 +72,14 @@ namespace BLL public static Model.Base_Factory GetBase_FactoryById(string FactoryId) { + Model.CNPCDB db = Funs.DB; return db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId); } - public static string GetBase_FactoryNameById(object FactoryId) + public static string GetBase_FactoryNameById(object FactoryId) { + Model.CNPCDB db = Funs.DB; string name = string.Empty; - if (FactoryId!=null) + if (FactoryId != null) { var model = db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId.ToString()); if (model != null) @@ -88,15 +88,16 @@ namespace BLL } } - return name; + return name; } - public static Model.Base_Factory GetBase_FactoryByCode(string FactoryCode) + public static Model.Base_Factory GetBase_FactoryByCode(string FactoryCode) { + Model.CNPCDB db = Funs.DB; return db.Base_Factory.FirstOrDefault(x => x.FactoryCode == FactoryCode); } public static void AddBase_Factory(Model.Base_Factory newtable) { - + Model.CNPCDB db = Funs.DB; Model.Base_Factory table = new Model.Base_Factory { FactoryId = newtable.FactoryId, @@ -104,7 +105,7 @@ namespace BLL FactoryCode = newtable.FactoryCode, FactoryName = newtable.FactoryName, Address = newtable.Address, - MapCoordinates= newtable.MapCoordinates, + MapCoordinates = newtable.MapCoordinates, }; db.Base_Factory.InsertOnSubmit(table); db.SubmitChanges(); @@ -112,7 +113,7 @@ namespace BLL public static void AddBulkBase_Factory(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Base_Factory.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -120,7 +121,7 @@ namespace BLL public static void UpdateBase_Factory(Model.Base_Factory newtable) { - + Model.CNPCDB db = Funs.DB; Model.Base_Factory table = db.Base_Factory.FirstOrDefault(x => x.FactoryId == newtable.FactoryId); if (table != null) { @@ -136,7 +137,7 @@ namespace BLL } public static void DeleteBase_FactoryById(string FactoryId) { - + Model.CNPCDB db = Funs.DB; Model.Base_Factory table = db.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId); if (table != null) { @@ -148,6 +149,7 @@ namespace BLL public static void DeleteALLBase_Factory() { + Model.CNPCDB db = Funs.DB; if (db.Base_Factory != null) { db.Base_Factory.DeleteAllOnSubmit(db.Base_Factory); diff --git a/SGGL/BLL/BaseInfo/CNProfessionalService.cs b/SGGL/BLL/BaseInfo/CNProfessionalService.cs index 69503d85..ea127854 100644 --- a/SGGL/BLL/BaseInfo/CNProfessionalService.cs +++ b/SGGL/BLL/BaseInfo/CNProfessionalService.cs @@ -10,8 +10,6 @@ namespace BLL { public class CNProfessionalService { - public static Model.CNPCDB db = Funs.DB; - /// /// 获取实体集合 /// diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs index a83986b9..4ddf9ccc 100644 --- a/SGGL/BLL/BaseInfo/CertificateService.cs +++ b/SGGL/BLL/BaseInfo/CertificateService.cs @@ -10,8 +10,6 @@ namespace BLL /// public static class CertificateService { - public static Model.CNPCDB db = Funs.DB; - /// /// 根据主键获取特岗证书 /// diff --git a/SGGL/BLL/BaseInfo/CostTypeService.cs b/SGGL/BLL/BaseInfo/CostTypeService.cs index af2db503..49ba352b 100644 --- a/SGGL/BLL/BaseInfo/CostTypeService.cs +++ b/SGGL/BLL/BaseInfo/CostTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class CostTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取费用类型 diff --git a/SGGL/BLL/BaseInfo/DesignProfessionalService.cs b/SGGL/BLL/BaseInfo/DesignProfessionalService.cs index 362499e6..19cd0065 100644 --- a/SGGL/BLL/BaseInfo/DesignProfessionalService.cs +++ b/SGGL/BLL/BaseInfo/DesignProfessionalService.cs @@ -10,7 +10,7 @@ namespace BLL { public class DesignProfessionalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取实体集合 diff --git a/SGGL/BLL/BaseInfo/EmergencyTypeService.cs b/SGGL/BLL/BaseInfo/EmergencyTypeService.cs index f0910f78..73739934 100644 --- a/SGGL/BLL/BaseInfo/EmergencyTypeService.cs +++ b/SGGL/BLL/BaseInfo/EmergencyTypeService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class EmergencyTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/EmployeeCategoryService.cs b/SGGL/BLL/BaseInfo/EmployeeCategoryService.cs index 171023bf..8f5769b9 100644 --- a/SGGL/BLL/BaseInfo/EmployeeCategoryService.cs +++ b/SGGL/BLL/BaseInfo/EmployeeCategoryService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class EmployeeCategoryService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/EmployeeSubgroupService.cs b/SGGL/BLL/BaseInfo/EmployeeSubgroupService.cs index 1212e402..a7ec1400 100644 --- a/SGGL/BLL/BaseInfo/EmployeeSubgroupService.cs +++ b/SGGL/BLL/BaseInfo/EmployeeSubgroupService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class EmployeeSubgroupService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/HSSEStandardListTypeService.cs b/SGGL/BLL/BaseInfo/HSSEStandardListTypeService.cs index 049739df..024c9fc1 100644 --- a/SGGL/BLL/BaseInfo/HSSEStandardListTypeService.cs +++ b/SGGL/BLL/BaseInfo/HSSEStandardListTypeService.cs @@ -14,7 +14,7 @@ namespace BLL { public class HSSEStandardListTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取标准规范类别信息 diff --git a/SGGL/BLL/BaseInfo/InspectionAreaService.cs b/SGGL/BLL/BaseInfo/InspectionAreaService.cs index c2523af9..932c68f7 100644 --- a/SGGL/BLL/BaseInfo/InspectionAreaService.cs +++ b/SGGL/BLL/BaseInfo/InspectionAreaService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class InspectionAreaService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -26,7 +26,7 @@ namespace BLL /// /// 定义变量 /// - public static IQueryable qq = from x in db.Base_InspectionArea orderby x.InspectionAreaCode select x; + public static IQueryable qq = from x in Funs.DB.Base_InspectionArea orderby x.InspectionAreaCode select x; /// /// 获取分页列表 diff --git a/SGGL/BLL/BaseInfo/InstitutionalDivisionService.cs b/SGGL/BLL/BaseInfo/InstitutionalDivisionService.cs index 3bdfff58..0873693b 100644 --- a/SGGL/BLL/BaseInfo/InstitutionalDivisionService.cs +++ b/SGGL/BLL/BaseInfo/InstitutionalDivisionService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class InstitutionalDivisionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/LawsRegulationsTypeService.cs b/SGGL/BLL/BaseInfo/LawsRegulationsTypeService.cs index 06ee32b3..181dd292 100644 --- a/SGGL/BLL/BaseInfo/LawsRegulationsTypeService.cs +++ b/SGGL/BLL/BaseInfo/LawsRegulationsTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class LawsRegulationsTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据id获取法律法规类型信息 diff --git a/SGGL/BLL/BaseInfo/LicenseTypeService.cs b/SGGL/BLL/BaseInfo/LicenseTypeService.cs index bc286fa2..dfd11a37 100644 --- a/SGGL/BLL/BaseInfo/LicenseTypeService.cs +++ b/SGGL/BLL/BaseInfo/LicenseTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class LicenseTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取许可证类型 diff --git a/SGGL/BLL/BaseInfo/ManageRuleTypeService.cs b/SGGL/BLL/BaseInfo/ManageRuleTypeService.cs index 630e6bbf..879c1b00 100644 --- a/SGGL/BLL/BaseInfo/ManageRuleTypeService.cs +++ b/SGGL/BLL/BaseInfo/ManageRuleTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ManageRuleTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取管理规定分类 diff --git a/SGGL/BLL/BaseInfo/PersonManageService.cs b/SGGL/BLL/BaseInfo/PersonManageService.cs index fc5cb980..be9898e4 100644 --- a/SGGL/BLL/BaseInfo/PersonManageService.cs +++ b/SGGL/BLL/BaseInfo/PersonManageService.cs @@ -11,7 +11,7 @@ namespace BLL { public class PersonManageService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -26,7 +26,7 @@ namespace BLL /// /// 定义变量 /// - public static IQueryable qq = from x in db.BS_Welder orderby x.WED_Unit, x.WED_Code select x; + public static IQueryable qq = from x in Funs.DB.BS_Welder orderby x.WED_Unit, x.WED_Code select x; /// /// 获取分页列表 @@ -38,6 +38,7 @@ namespace BLL /// public static IEnumerable getListData(string project, string drpUnitS, string isOnGuard, string txtCodeS, string txtNameS, string txtWorkCodeS, string txtClassS, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(project)) { diff --git a/SGGL/BLL/BaseInfo/PictureTypeService.cs b/SGGL/BLL/BaseInfo/PictureTypeService.cs index 4c61816f..4f9ef0c7 100644 --- a/SGGL/BLL/BaseInfo/PictureTypeService.cs +++ b/SGGL/BLL/BaseInfo/PictureTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PictureTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目图片分类 diff --git a/SGGL/BLL/BaseInfo/PositionService.cs b/SGGL/BLL/BaseInfo/PositionService.cs index eb6515c5..35bae9cc 100644 --- a/SGGL/BLL/BaseInfo/PositionService.cs +++ b/SGGL/BLL/BaseInfo/PositionService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PositionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取主键 diff --git a/SGGL/BLL/BaseInfo/PostService.cs b/SGGL/BLL/BaseInfo/PostService.cs index f05416fb..804ce0ad 100644 --- a/SGGL/BLL/BaseInfo/PostService.cs +++ b/SGGL/BLL/BaseInfo/PostService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class PostService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -31,8 +31,9 @@ namespace BLL /// /// public static IEnumerable GetListData(string postName, int startRowIndex, int maximumRows) - { - IQueryable q = from x in db.Base_Post orderby x.PostName select x; + { + Model.CNPCDB db = Funs.DB; + IQueryable q = from x in db.Base_Post orderby x.PostName select x; if (!string.IsNullOrEmpty(postName)) { q = q.Where(e => e.PostName.Contains(postName)); diff --git a/SGGL/BLL/BaseInfo/PostTitleService.cs b/SGGL/BLL/BaseInfo/PostTitleService.cs index a6fffada..849fcd5e 100644 --- a/SGGL/BLL/BaseInfo/PostTitleService.cs +++ b/SGGL/BLL/BaseInfo/PostTitleService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class PostTitleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/PracticeCertificateService.cs b/SGGL/BLL/BaseInfo/PracticeCertificateService.cs index 4d431b65..88d38ee7 100644 --- a/SGGL/BLL/BaseInfo/PracticeCertificateService.cs +++ b/SGGL/BLL/BaseInfo/PracticeCertificateService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class PracticeCertificateService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取执业资格证书 diff --git a/SGGL/BLL/BaseInfo/ProjectTypeService.cs b/SGGL/BLL/BaseInfo/ProjectTypeService.cs index 32bce579..cfd92a7f 100644 --- a/SGGL/BLL/BaseInfo/ProjectTypeService.cs +++ b/SGGL/BLL/BaseInfo/ProjectTypeService.cs @@ -11,7 +11,7 @@ namespace BLL public static class ProjectTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs b/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs index 5aa3cd32..bdf97f22 100644 --- a/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs +++ b/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs @@ -10,7 +10,7 @@ namespace BLL { public class QualityQuestionTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取实体集合 diff --git a/SGGL/BLL/BaseInfo/QuestionTypeService.cs b/SGGL/BLL/BaseInfo/QuestionTypeService.cs index bf639278..f4b5ce02 100644 --- a/SGGL/BLL/BaseInfo/QuestionTypeService.cs +++ b/SGGL/BLL/BaseInfo/QuestionTypeService.cs @@ -9,7 +9,7 @@ namespace BLL public static class QuestionTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs b/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs index c0726b83..86c60950 100644 --- a/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs +++ b/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class RulesRegulationsTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取规章制度类别 diff --git a/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs b/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs index d2e3536b..31d158e2 100644 --- a/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs +++ b/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SafetyMeasuresService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全措施 @@ -45,6 +45,7 @@ namespace BLL /// public static void AddSafetyMeasures(Model.Base_SafetyMeasures SafetyMeasures) { + Model.CNPCDB db = Funs.DB; Model.Base_SafetyMeasures newSafetyMeasures = new Model.Base_SafetyMeasures { SafetyMeasuresId = SafetyMeasures.SafetyMeasuresId, diff --git a/SGGL/BLL/BaseInfo/SecretLevelService.cs b/SGGL/BLL/BaseInfo/SecretLevelService.cs index 247c1ccb..d890474a 100644 --- a/SGGL/BLL/BaseInfo/SecretLevelService.cs +++ b/SGGL/BLL/BaseInfo/SecretLevelService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class SecretLevelService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取密级 diff --git a/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs b/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs index 45cdd2f5..17e26be6 100644 --- a/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs +++ b/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SolutionTempleteTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取施工方案模板类型 @@ -28,6 +28,7 @@ namespace BLL /// public static void AddSolutionTempleteType(Model.Base_SolutionTempleteType solutionTempleteType) { + Model.CNPCDB db = Funs.DB; Model.Base_SolutionTempleteType newSolutionTempleteType = new Model.Base_SolutionTempleteType { SolutionTempleteTypeCode = solutionTempleteType.SolutionTempleteTypeCode, @@ -45,6 +46,7 @@ namespace BLL /// public static void UpdateSolutionTempleteType(Model.Base_SolutionTempleteType solutionTempleteType) { + Model.CNPCDB db = Funs.DB; Model.Base_SolutionTempleteType newSolutionTempleteType = db.Base_SolutionTempleteType.FirstOrDefault(e => e.SolutionTempleteTypeCode == solutionTempleteType.SolutionTempleteTypeCode); if (newSolutionTempleteType != null) { @@ -61,6 +63,7 @@ namespace BLL /// public static void DeleteSolutionTempleteTypeById(string solutionTempleteTypeCode) { + Model.CNPCDB db = Funs.DB; var solutionTemplate = db.Base_SolutionTempleteType.FirstOrDefault(e => e.SolutionTempleteTypeCode == solutionTempleteTypeCode); if (solutionTemplate != null) { @@ -75,6 +78,7 @@ namespace BLL /// public static List GetSolutionTempleteType() { + Model.CNPCDB db = Funs.DB; return (from x in db.Base_SolutionTempleteType orderby x.SortIndex select x).ToList(); } /// diff --git a/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs b/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs index c7b3d226..54c5a23e 100644 --- a/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs +++ b/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class SpecialEquipmentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取机具设备 diff --git a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs index 4ef7f904..6c9c77e0 100644 --- a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs +++ b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class SpecialSchemeTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/SteelService.cs b/SGGL/BLL/BaseInfo/SteelService.cs index f73088e0..7563ebf8 100644 --- a/SGGL/BLL/BaseInfo/SteelService.cs +++ b/SGGL/BLL/BaseInfo/SteelService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class SteelService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.BS_Steel orderby x.STE_Code select x; + private static IQueryable qq = from x in Funs.DB.BS_Steel orderby x.STE_Code select x; /// /// 获取材质列表 diff --git a/SGGL/BLL/BaseInfo/TrainLevelService.cs b/SGGL/BLL/BaseInfo/TrainLevelService.cs index f0624727..84556b2b 100644 --- a/SGGL/BLL/BaseInfo/TrainLevelService.cs +++ b/SGGL/BLL/BaseInfo/TrainLevelService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TrainLevelService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取主键 diff --git a/SGGL/BLL/BaseInfo/TrainTypeService.cs b/SGGL/BLL/BaseInfo/TrainTypeService.cs index b21a5a39..51547af3 100644 --- a/SGGL/BLL/BaseInfo/TrainTypeService.cs +++ b/SGGL/BLL/BaseInfo/TrainTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TrainTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取培训类型 diff --git a/SGGL/BLL/BaseInfo/UnitTypeService.cs b/SGGL/BLL/BaseInfo/UnitTypeService.cs index 5167edb5..c381af44 100644 --- a/SGGL/BLL/BaseInfo/UnitTypeService.cs +++ b/SGGL/BLL/BaseInfo/UnitTypeService.cs @@ -8,7 +8,7 @@ namespace BLL public static class UnitTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/VehicleService.cs b/SGGL/BLL/BaseInfo/VehicleService.cs index c142f9db..95ce3434 100644 --- a/SGGL/BLL/BaseInfo/VehicleService.cs +++ b/SGGL/BLL/BaseInfo/VehicleService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class VehicleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取机具设备 diff --git a/SGGL/BLL/BaseInfo/WorkPostService.cs b/SGGL/BLL/BaseInfo/WorkPostService.cs index dfd88544..cc1f9a06 100644 --- a/SGGL/BLL/BaseInfo/WorkPostService.cs +++ b/SGGL/BLL/BaseInfo/WorkPostService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class WorkPostService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/WorkStageService.cs b/SGGL/BLL/BaseInfo/WorkStageService.cs index 452b3b3d..7c8a54f4 100644 --- a/SGGL/BLL/BaseInfo/WorkStageService.cs +++ b/SGGL/BLL/BaseInfo/WorkStageService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class WorkStageService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取工作阶段 @@ -38,6 +38,7 @@ namespace BLL /// public static List GetWorkStageList() { + Model.CNPCDB db = Funs.DB; return (from x in db.Base_WorkStage orderby x.WorkStageCode select x).ToList(); } @@ -47,6 +48,7 @@ namespace BLL /// public static void AddWorkStage(Model.Base_WorkStage workStage) { + Model.CNPCDB db = Funs.DB; Model.Base_WorkStage newWorkStage = new Model.Base_WorkStage { WorkStageId = workStage.WorkStageId, @@ -64,6 +66,7 @@ namespace BLL /// public static void UpdateWorkStage(Model.Base_WorkStage workStage) { + Model.CNPCDB db = Funs.DB; Model.Base_WorkStage newWorkStage = db.Base_WorkStage.FirstOrDefault(e => e.WorkStageId == workStage.WorkStageId); if (newWorkStage != null) { @@ -80,6 +83,7 @@ namespace BLL /// public static void DeleteWorkStageById(string workStageId) { + Model.CNPCDB db = Funs.DB; Model.Base_WorkStage workStage = db.Base_WorkStage.FirstOrDefault(e => e.WorkStageId == workStageId); if (workStage != null) { diff --git a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs index deafe53f..5bdd838a 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs @@ -10,7 +10,7 @@ namespace BLL { public class CheckControlApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取质量巡检模板列表 /// @@ -19,6 +19,7 @@ namespace BLL /// public static DataTable getListData(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; var res = from x in db.Check_CheckControlApprove where x.CheckControlCode == CheckControlCode && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate @@ -80,6 +81,7 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetSee(string CheckControlCode, string userId) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string CheckControlCode, string userId) @@ -101,6 +103,7 @@ namespace BLL /// 一个质量巡检审批实体 public static Model.Check_CheckControlApprove GetCheckControlApproveByCheckControlId(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null); } /// @@ -166,6 +169,7 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetAudit1(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit1); } @@ -176,6 +180,7 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetAudit2(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit2); } @@ -186,6 +191,7 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetAudit3(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit3); } @@ -196,6 +202,7 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetAudit4(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit4); } @@ -206,11 +213,13 @@ namespace BLL /// public static Model.Check_CheckControlApprove GetAudit5(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit5); } public static Model.Check_CheckControlApprove GetComplie(string CheckControlCode) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Compile); } public static List GetListDataByCodeForApi(string code) diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs index cb9fc80e..bfeed1c9 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs @@ -12,7 +12,7 @@ namespace BLL { public class CheckControlService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据质量检查与控制Id删除一个质量检查与控制信息 /// diff --git a/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs b/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs index 9659a017..eb4a01c3 100644 --- a/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs +++ b/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class CheckEquipmentApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取设计变更模板列表 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null orderby x.ApproveDate @@ -41,6 +42,7 @@ namespace BLL /// 一个设计变更审批实体 public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByCheckEquipmentId(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate == null); } @@ -51,16 +53,19 @@ namespace BLL /// 一个设计变更审批实体 public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByApproveId(string approveId) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentApproveId == approveId); } public static Model.Check_CheckEquipmentApprove GetComplie(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Compile); } public static Model.Check_CheckEquipmentApprove GetApprove(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Approve); } @@ -71,6 +76,7 @@ namespace BLL /// 设计变更审批集合 public static List GetCheckEquipmentApprovesByCheckEquipmentId(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId select x).ToList(); } @@ -190,6 +196,7 @@ namespace BLL } public static List getListDataByEid(string CheckEquipmentId) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate diff --git a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs index 53acd3b8..1ab1a8c9 100644 --- a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs +++ b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs @@ -10,7 +10,7 @@ namespace BLL { public class CheckEquipmentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -24,7 +24,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.Check_CheckEquipment orderby x.CompileDate descending select x; + private static IQueryable qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x; /// /// 获取分页列表 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable getListData(string projectId, string userId, string roleId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(projectId)) { diff --git a/SGGL/BLL/CQMS/Check/CheckFineService.cs b/SGGL/BLL/CQMS/Check/CheckFineService.cs index 4348f9a3..97fa1258 100644 --- a/SGGL/BLL/CQMS/Check/CheckFineService.cs +++ b/SGGL/BLL/CQMS/Check/CheckFineService.cs @@ -12,7 +12,7 @@ namespace BLL { public class CheckFineService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据质量检查与控制Id删除一个质量检查与控制信息 /// diff --git a/SGGL/BLL/CQMS/Check/CheckMonthService.cs b/SGGL/BLL/CQMS/Check/CheckMonthService.cs index 251f3ca8..e01635ee 100644 --- a/SGGL/BLL/CQMS/Check/CheckMonthService.cs +++ b/SGGL/BLL/CQMS/Check/CheckMonthService.cs @@ -9,7 +9,7 @@ namespace BLL { public class CheckMonthService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - public static IQueryable qq = from x in db.Check_CheckMonth orderby x.Months descending select x; + public static IQueryable qq = from x in Funs.DB.Check_CheckMonth orderby x.Months descending select x; /// /// 获取分页列表 @@ -35,6 +35,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(projectId)) { diff --git a/SGGL/BLL/CQMS/Check/DesignApproveService.cs b/SGGL/BLL/CQMS/Check/DesignApproveService.cs index 3793b5db..0ff82240 100644 --- a/SGGL/BLL/CQMS/Check/DesignApproveService.cs +++ b/SGGL/BLL/CQMS/Check/DesignApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class DesignApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取设计变更模板列表 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string DesignId) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_DesignApprove where x.DesignId == DesignId && x.ApproveDate != null orderby x.ApproveDate @@ -41,6 +42,7 @@ namespace BLL /// 一个设计变更审批实体 public static Model.Check_DesignApprove GetDesignApproveByDesignId(string DesignId) { + Model.CNPCDB db = Funs.DB; return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveDate == null); } @@ -51,21 +53,25 @@ namespace BLL /// 一个设计变更审批实体 public static Model.Check_DesignApprove GetDesignApproveByApproveId(string approveId) { + Model.CNPCDB db = Funs.DB; return db.Check_DesignApprove.FirstOrDefault(x => x.DesignApproveId == approveId); } public static Model.Check_DesignApprove GetComplie(string DesignId) { + Model.CNPCDB db = Funs.DB; return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Compile); } public static Model.Check_DesignApprove GetAuditMan(string DesignId, string state) { + Model.CNPCDB db = Funs.DB; return db.Check_DesignApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == state); } public static Model.Check_DesignApprove GetAudit2(string DesignId) { + Model.CNPCDB db = Funs.DB; return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Audit2); } @@ -76,6 +82,7 @@ namespace BLL /// 设计变更审批集合 public static List GetDesignApprovesByDesignId(string DesignId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Check_DesignApprove where x.DesignId == DesignId select x).ToList(); } diff --git a/SGGL/BLL/CQMS/Check/DesignService.cs b/SGGL/BLL/CQMS/Check/DesignService.cs index 4b11f7de..31c8a64c 100644 --- a/SGGL/BLL/CQMS/Check/DesignService.cs +++ b/SGGL/BLL/CQMS/Check/DesignService.cs @@ -11,7 +11,7 @@ namespace BLL { public class DesignService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -25,7 +25,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.Check_Design orderby x.DesignDate descending select x; + private static IQueryable qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x; public static string CovBool(bool? b) diff --git a/SGGL/BLL/CQMS/Check/FileCabinetService.cs b/SGGL/BLL/CQMS/Check/FileCabinetService.cs index 3d68f8cb..658b4689 100644 --- a/SGGL/BLL/CQMS/Check/FileCabinetService.cs +++ b/SGGL/BLL/CQMS/Check/FileCabinetService.cs @@ -9,13 +9,14 @@ namespace BLL { public class FileCabinetService { - public static Model.CNPCDB db = Funs.DB; + /// /// 增加信息 /// /// 实体 public static void AddFileCabinet(Model.Project_FileCabinet addFileCabinet) { + Model.CNPCDB db = Funs.DB; Model.Project_FileCabinet newFileCabinet = new Model.Project_FileCabinet { FileCabinetId = addFileCabinet.FileCabinetId, @@ -59,6 +60,7 @@ namespace BLL /// public static Model.Project_FileCabinet getInfo(string fileCabinetId) { + Model.CNPCDB db = Funs.DB; return db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == fileCabinetId); } /// @@ -108,6 +110,7 @@ namespace BLL /// 实体 public static void UpdateFileCabinet(Model.Project_FileCabinet updateFileCabinet) { + Model.CNPCDB db = Funs.DB; Model.Project_FileCabinet getFileCabinet = db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == updateFileCabinet.FileCabinetId); if (getFileCabinet != null) { diff --git a/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs b/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs index 4dc72555..38b30cff 100644 --- a/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs +++ b/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class JointCheckApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据质量共检编号删除对应的所有质量共检审批信息 /// @@ -29,6 +29,7 @@ namespace BLL /// public static IEnumerable getListData(string JointCheckId) { + Model.CNPCDB db = Funs.DB; var approves = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList(); var approves2 = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList(); string approveType = string.Empty; @@ -73,6 +74,7 @@ namespace BLL /// public static IEnumerable listData(string JointCheckId) { + Model.CNPCDB db = Funs.DB; var approves = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList(); var approves2 = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList(); string approveType = string.Empty; @@ -178,6 +180,7 @@ namespace BLL } public static Model.Check_JointCheckApprove GetSee(string JointCheckId, string userId) { + Model.CNPCDB db = Funs.DB; return db.Check_JointCheckApprove.FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string JointCheckId, string userId) @@ -229,6 +232,7 @@ namespace BLL /// public static Model.Check_JointCheckApprove GetAudit1(string JointCheckId, string jointCheckDetailId) { + Model.CNPCDB db = Funs.DB; return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit1 && x.JointCheckDetailId == jointCheckDetailId); } @@ -239,6 +243,7 @@ namespace BLL /// public static Model.Check_JointCheckApprove GetAudit2(string JointCheckId, string jointCheckDetailId) { + Model.CNPCDB db = Funs.DB; return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit2 && x.JointCheckDetailId == jointCheckDetailId); } @@ -249,6 +254,7 @@ namespace BLL /// public static Model.Check_JointCheckApprove GetAudit3(string JointCheckId, string jointCheckDetailId) { + Model.CNPCDB db = Funs.DB; return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit3 && x.JointCheckDetailId == jointCheckDetailId); } @@ -259,6 +265,7 @@ namespace BLL /// public static Model.Check_JointCheckApprove GetAudit4(string JointCheckId, string jointCheckDetailId) { + Model.CNPCDB db = Funs.DB; return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit4 && x.JointCheckDetailId == jointCheckDetailId); } public static List getListDataByJcidForApi(string JointCheckId, string JointCheckDetailId) diff --git a/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs index ee46b37f..8914dcd5 100644 --- a/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs +++ b/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs @@ -8,7 +8,7 @@ namespace BLL { public class MonthSpotCheckDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取月报质量验收情况模板列表 @@ -18,6 +18,7 @@ namespace BLL /// public static IEnumerable getListData(string CheckMonthId) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_MonthSpotCheckDetail where x.CheckMonthId == CheckMonthId select new diff --git a/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs b/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs index 5e049fbd..6ecd4c4c 100644 --- a/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs +++ b/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs @@ -9,7 +9,7 @@ namespace BLL { public class SpecialEquipmentDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取月报特种设备信息模板列表 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string CheckMonthId) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_SpecialEquipmentDetail where x.CheckMonthId == CheckMonthId select new diff --git a/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs b/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs index d4250feb..98be5c57 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs @@ -8,7 +8,7 @@ namespace BLL { public class SpotCheckApproveService { - public static Model.CNPCDB db = Funs.DB; + public static Model.Check_SpotCheckApprove GetSpotApproveBySpotCheckDetailId(string spotCheckDetailId) { @@ -35,6 +35,7 @@ namespace BLL /// public static IEnumerable getListData(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1" orderby x.ApproveDate @@ -58,6 +59,7 @@ namespace BLL /// public static IEnumerable getList(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "2" orderby x.ApproveDate @@ -80,6 +82,7 @@ namespace BLL /// 一个实体验收审批实体 public static Model.Check_SpotCheckApprove GetSpotCheckApproveBySpotCheckCode(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveDate == null && x.Sign == "1" && x.ApproveType != "S"); } @@ -90,11 +93,13 @@ namespace BLL /// 一个实体验收审批实体 public static Model.Check_SpotCheckApprove GetSpotCheckApproveByApproveId(string approveId) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckApproveId == approveId); } public static Model.Check_SpotCheckApprove GetComplie(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Compile); } public static Model.Check_SpotCheckApprove GetComplieForApi(string SpotCheckCode) @@ -107,6 +112,7 @@ namespace BLL public static Model.Check_SpotCheckApprove GetSee(string SpotCheckCode, string userId) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string SpotCheckCode, string userId) @@ -123,11 +129,13 @@ namespace BLL } public static Model.Check_SpotCheckApprove GetAudit2(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Audit2); } public static Model.Check_SpotCheckApprove GetReCompile(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_ReCompile); } @@ -138,6 +146,7 @@ namespace BLL /// 实体验收审批集合 public static List GetSpotCheckApprovesBySpotCheckCode(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return (from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode select x).ToList(); } @@ -226,6 +235,7 @@ namespace BLL } public static List getListDataBySpotCheckCodeForApi(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1" orderby x.ApproveDate diff --git a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs index 90b82a48..9563755b 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs @@ -9,7 +9,7 @@ namespace BLL { public class SpotCheckDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取实体验收记录明细 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string SpotCheckCode) { + Model.CNPCDB db = Funs.DB; return from x in db.Check_SpotCheckDetail where x.SpotCheckCode == SpotCheckCode select new diff --git a/SGGL/BLL/CQMS/Check/SpotCheckService.cs b/SGGL/BLL/CQMS/Check/SpotCheckService.cs index bbe70dad..43a30552 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckService.cs @@ -11,7 +11,7 @@ namespace BLL { public class SpotCheckService { - public static Model.CNPCDB db = Funs.DB; + /// /// 添加实体验收记录 diff --git a/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs b/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs index 4fabca59..2e9d06c1 100644 --- a/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs +++ b/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs @@ -9,9 +9,10 @@ namespace BLL { public class TechnicalContactListApproveService { - public static Model.CNPCDB db = Funs.DB; + public static Model.Check_TechnicalContactListApprove GetSee(string TechnicalContactListId, string userId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string TechnicalContactListId, string userId) @@ -58,6 +59,7 @@ namespace BLL /// public static Model.Check_TechnicalContactListApprove GetApprove(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit1); } @@ -127,6 +129,7 @@ namespace BLL /// 一个工程联络单审批实体 public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByTechnicalContactListId(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveDate == null && x.ApproveType != "S"); } /// @@ -136,6 +139,7 @@ namespace BLL /// 一个工程联络单审批实体 public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveId(string approveId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListApproveId == approveId); } public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveIdForApi(string approveId) @@ -147,6 +151,7 @@ namespace BLL } public static Model.Check_TechnicalContactListApprove GetComplie(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Compile); } @@ -157,6 +162,7 @@ namespace BLL /// public static Model.Check_TechnicalContactListApprove GetApprove2(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit3); } @@ -167,6 +173,7 @@ namespace BLL /// public static Model.Check_TechnicalContactListApprove GetApprove3(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit2 || x.ApproveType == BLL.Const.TechnicalContactList_Audit2H)); } @@ -177,6 +184,7 @@ namespace BLL /// public static Model.Check_TechnicalContactListApprove GetApprove5(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit4 || x.ApproveType == BLL.Const.TechnicalContactList_Audit4R)); } @@ -187,6 +195,7 @@ namespace BLL /// public static Model.Check_TechnicalContactListApprove GetApprove4(string TechnicalContactListId) { + Model.CNPCDB db = Funs.DB; return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit6); } public static List GetListDataByIdForApi(string TechnicalContactListId) diff --git a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs index b41b803f..22561220 100644 --- a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs +++ b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs @@ -11,7 +11,7 @@ namespace BLL { public class TechnicalContactListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据工程联络单信息Id删除一个工程联络单信息信息 @@ -402,7 +402,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.Check_TechnicalContactList orderby x.CompileDate descending select x; + private static IQueryable qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x; /// /// 获取分页列表 diff --git a/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs b/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs index 16c1ca9c..cf30da52 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class DataDistributionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -35,6 +35,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string startDate, string endDate, string fileCode, string fileName, string cNProfessionalId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DataDistribution where x.ProjectId == projectId orderby x.SendDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs b/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs index 197dc4a1..78e20d72 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class DataReceivingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string startDate, string endDate, string fileCode, string fileName, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DataReceiving where x.ProjectId == projectId orderby x.DataReceivingDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs index bee3d5a2..e9902556 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class DesignChangeOrderService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string cNProfessionalId, string contents, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DesignChangeOrder where x.ProjectId == projectId orderby x.ChangeOrderCode descending @@ -88,6 +89,7 @@ namespace BLL } public static IEnumerable GetListDataForDataType(string installtionId,string projectId, string cNProfessionalId, string contents, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DesignChangeOrder where x.ProjectId == projectId orderby x.ChangeOrderCode descending diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs index ad9259a4..dd0dd043 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class DesignDetailsService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -32,6 +32,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string cNProfessionalId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DesignDetails where x.ProjectId == projectId orderby x.DetailsDate descending @@ -62,6 +63,7 @@ namespace BLL public static IEnumerable GetListDataForDataType(string UnitWorkId, string projectId, string cNProfessionalId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DesignDetails where x.ProjectId == projectId orderby x.DetailsDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs index 7034eb4a..973ec8a3 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class DesignDrawingsService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -31,6 +31,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string cnProfessionalId, string startDate, string endDate, string sendstartDate, string sendendDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_DesignDrawings where x.ProjectId == projectId orderby x.RemarkCode diff --git a/SGGL/BLL/CQMS/Comprehensive/FinalFileService.cs b/SGGL/BLL/CQMS/Comprehensive/FinalFileService.cs index 1742463d..19538ef4 100644 --- a/SGGL/BLL/CQMS/Comprehensive/FinalFileService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/FinalFileService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class FinalFileService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 diff --git a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalItemService.cs b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalItemService.cs index 2cf8830f..0b27c69a 100644 --- a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalItemService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalItemService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class GeneralPlanApprovalItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -31,6 +31,7 @@ namespace BLL /// public static IEnumerable GetListData(string generalPlanApprovalId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_GeneralPlanApprovalItem where x.GeneralPlanApprovalId == generalPlanApprovalId orderby x.SubmitDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs index ec987028..f488ffb1 100644 --- a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class GeneralPlanApprovalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -33,6 +33,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId,string UnitWorkId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_GeneralPlanApproval where x.ProjectId == projectId orderby x.ApprovalDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs index 6f0243eb..5e74abe9 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs @@ -12,7 +12,7 @@ namespace BLL /// public class InspectionEquipmentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -36,6 +36,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string inspectionName, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_InspectionEquipment where x.ProjectId == projectId orderby x.RemarkCode diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs index 0577dbd1..f4ecc0e2 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class InspectionMachineService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -32,6 +32,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string cnProfessionalId, string inspectionType, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_InspectionMachine where x.ProjectId == projectId orderby x.InspectionMachineCode descending diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs index bce62584..0aac6d91 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class InspectionPersonService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 diff --git a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalItemService.cs b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalItemService.cs index b529a795..35aac3d6 100644 --- a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalItemService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalItemService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class MajorPlanApprovalItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -31,6 +31,7 @@ namespace BLL /// public static IEnumerable GetListData(string majorPlanApprovalId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_MajorPlanApprovalItem where x.MajorPlanApprovalId == majorPlanApprovalId orderby x.SubmitDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs index 6be7a847..32034b73 100644 --- a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class MajorPlanApprovalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -33,6 +33,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId, string UnitWorkId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_MajorPlanApproval where x.ProjectId == projectId orderby x.ApprovalDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs index 28827ab9..ce438788 100644 --- a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class NCRManagementService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -30,6 +30,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string sendUnit, string cnProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_NCRManagement where x.ProjectId == projectId orderby x.IssuedDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs index 12ad9d34..152a8a76 100644 --- a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class PressurePipeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_PressurePipe where x.Projctid == projectId select x; diff --git a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs index 8148aeb2..fb1a3c98 100644 --- a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class QualityAccidentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string ProjectId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_QualityAccident where x.ProjectId == ProjectId select x; diff --git a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs index 7aa8b912..2ca52474 100644 --- a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class SiteVisaManagementService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -35,6 +35,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Comprehensive_SiteVisaManagement where x.ProjectId == projectId orderby x.VisaDate descending diff --git a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs index fd13419e..9fc8ed17 100644 --- a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class SpecialEquipmentServices { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string equipmentId,int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.View_Comprehensive_SpecialEquipment where x.ProjectId == projectId orderby x.UnitName descending diff --git a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogApproveService.cs b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogApproveService.cs index 806f99cc..8b4f9a47 100644 --- a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogApproveService.cs +++ b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogApproveService.cs @@ -10,7 +10,7 @@ namespace BLL { public class CQMSConstructionLogApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取质量巡检模板列表 /// @@ -19,6 +19,7 @@ namespace BLL /// public static DataTable getListData(string ConstructionLogId) { + Model.CNPCDB db = Funs.DB; var res = from x in db.CQMS_ConstructionLogApprove where x.ConstructionLogId == ConstructionLogId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate @@ -79,6 +80,7 @@ namespace BLL /// public static Model.CQMS_ConstructionLogApprove GetSee(string ConstructionLogId, string userId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string ConstructionLogId, string userId) @@ -100,6 +102,7 @@ namespace BLL /// 一个质量巡检审批实体 public static Model.CQMS_ConstructionLogApprove GetConstructionLogApproveByConstructionLogId(string ConstructionLogId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType != "S" && x.ApproveDate == null); } /// @@ -165,11 +168,13 @@ namespace BLL /// public static Model.CQMS_ConstructionLogApprove GetAudit(string ConstructionLogId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_ConstructionLogApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == BLL.Const.ConstructionLog_Audit); } public static Model.CQMS_ConstructionLogApprove GetComplie(string ConstructionLogId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == BLL.Const.ConstructionLog_Compile); } diff --git a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogImageProgressService.cs b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogImageProgressService.cs index 8a43e713..596eb3e0 100644 --- a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogImageProgressService.cs +++ b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogImageProgressService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class CQMSConstructionLogImageProgressService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogItemService.cs b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogItemService.cs index e50e6099..4539e0a9 100644 --- a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogItemService.cs +++ b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogItemService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class CQMSConstructionLogItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogService.cs b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogService.cs index 1003eed1..ec000d61 100644 --- a/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogService.cs +++ b/SGGL/BLL/CQMS/ConstructionLog/CQMSConstructionLogService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class CQMSConstructionLogService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs b/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs index 01c8e4d6..2797f251 100644 --- a/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs +++ b/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs @@ -9,7 +9,7 @@ namespace BLL { public class DataTypeProjectService { - //public static Model.CNPCDB db = Funs.DB; + // /// /// 记录数 diff --git a/SGGL/BLL/CQMS/Information/ContactSheetApproveService.cs b/SGGL/BLL/CQMS/Information/ContactSheetApproveService.cs index 1b14ddfe..2670d362 100644 --- a/SGGL/BLL/CQMS/Information/ContactSheetApproveService.cs +++ b/SGGL/BLL/CQMS/Information/ContactSheetApproveService.cs @@ -8,7 +8,7 @@ namespace BLL { public class ContactSheetApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据设计变更编号获取一个设计变更审批信息 /// @@ -16,6 +16,7 @@ namespace BLL /// 一个设计变更审批实体 public static Model.CQMS_Information_ContactSheetApprove GetDesignApproveByContactSheetId(string contactSheetId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetId == contactSheetId && x.AuditDate == null); } @@ -26,11 +27,13 @@ namespace BLL /// 一个设计变更审批实体 public static Model.CQMS_Information_ContactSheetApprove GetDesignApproveByApproveId(string contactSheetAuditId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetAuditId == contactSheetAuditId); } public static Model.CQMS_Information_ContactSheetApprove GetComplie(string contactSheetAuditId) { + Model.CNPCDB db = Funs.DB; return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetAuditId == contactSheetAuditId && x.HandleStep == BLL.Const.ContactSheet_AuditCompleted ); } @@ -71,6 +74,7 @@ namespace BLL } public static Model.CQMS_Information_ContactSheetApprove GetAuditMan(string ContactSheetId, string state) { + Model.CNPCDB db = Funs.DB; return db.CQMS_Information_ContactSheetApprove.OrderByDescending(x => x.AuditDate).FirstOrDefault(x => x.ContactSheetId == ContactSheetId && x.HandleStep == state); } diff --git a/SGGL/BLL/CQMS/ManageReport/ComprehensiveService.cs b/SGGL/BLL/CQMS/ManageReport/ComprehensiveService.cs index 43fd6950..2a292686 100644 --- a/SGGL/BLL/CQMS/ManageReport/ComprehensiveService.cs +++ b/SGGL/BLL/CQMS/ManageReport/ComprehensiveService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ComprehensiveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取本周(月)报综合信息 diff --git a/SGGL/BLL/CQMS/ManageReport/ConstructionProblemsService.cs b/SGGL/BLL/CQMS/ManageReport/ConstructionProblemsService.cs index a19904aa..b2af8df0 100644 --- a/SGGL/BLL/CQMS/ManageReport/ConstructionProblemsService.cs +++ b/SGGL/BLL/CQMS/ManageReport/ConstructionProblemsService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ConstructionProblemsService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取施工过程问题 diff --git a/SGGL/BLL/CQMS/ManageReport/NextQualityControlService.cs b/SGGL/BLL/CQMS/ManageReport/NextQualityControlService.cs index e52d929b..5b8e8b62 100644 --- a/SGGL/BLL/CQMS/ManageReport/NextQualityControlService.cs +++ b/SGGL/BLL/CQMS/ManageReport/NextQualityControlService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class NextQualityControlService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取下周质量控制点 diff --git a/SGGL/BLL/CQMS/ManageReport/QualityGoalService.cs b/SGGL/BLL/CQMS/ManageReport/QualityGoalService.cs index 264b7a6f..37969e25 100644 --- a/SGGL/BLL/CQMS/ManageReport/QualityGoalService.cs +++ b/SGGL/BLL/CQMS/ManageReport/QualityGoalService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class QualityGoalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取本周(月)报综合信息 diff --git a/SGGL/BLL/CQMS/ManageReport/RowMaterialProblemService.cs b/SGGL/BLL/CQMS/ManageReport/RowMaterialProblemService.cs index 8f4bb41c..5a5741b8 100644 --- a/SGGL/BLL/CQMS/ManageReport/RowMaterialProblemService.cs +++ b/SGGL/BLL/CQMS/ManageReport/RowMaterialProblemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class RowMaterialProblemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取原材料问题 @@ -29,6 +29,7 @@ namespace BLL /// public static List GetRowMaterialProblemByReportId(string reportId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Report_RowMaterialProblem where x.ReportId == reportId select x).ToList(); } diff --git a/SGGL/BLL/CQMS/ManageReport/ThisWeekOrMonthContentService.cs b/SGGL/BLL/CQMS/ManageReport/ThisWeekOrMonthContentService.cs index 020f59f3..c14dec69 100644 --- a/SGGL/BLL/CQMS/ManageReport/ThisWeekOrMonthContentService.cs +++ b/SGGL/BLL/CQMS/ManageReport/ThisWeekOrMonthContentService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ThisWeekOrMonthContentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取本周主要工作内容 diff --git a/SGGL/BLL/CQMS/ManageReport/WeekAndMonthReportService.cs b/SGGL/BLL/CQMS/ManageReport/WeekAndMonthReportService.cs index 16f10d59..0fe7b79f 100644 --- a/SGGL/BLL/CQMS/ManageReport/WeekAndMonthReportService.cs +++ b/SGGL/BLL/CQMS/ManageReport/WeekAndMonthReportService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class WeekAndMonthReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -29,6 +29,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string reportType, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.Report_WeekAndMonthReport where x.ProjectId == projectId && x.ReportType == reportType diff --git a/SGGL/BLL/CQMS/ProcessControl/HotProessManageService.cs b/SGGL/BLL/CQMS/ProcessControl/HotProessManageService.cs index df4e93ea..82d48ab8 100644 --- a/SGGL/BLL/CQMS/ProcessControl/HotProessManageService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/HotProessManageService.cs @@ -9,7 +9,7 @@ namespace BLL public static class HotProessManageService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -33,6 +33,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string pipelineManageCode,string jointInfoCode, string hotProessReportCode, string hotHardManageCode, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.ProcessControl_HotProessManage where x.ProjectId == projectId orderby x.HotHardManageCode descending diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementDetailService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementDetailService.cs index e9cccbe9..6ee27f45 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementDetailService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementDetailService.cs @@ -9,7 +9,7 @@ namespace BLL { public class InspectionManagementDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取共检记录明细 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string InspectionId) { + Model.CNPCDB db = Funs.DB; return from x in db.ProcessControl_InspectionManagementDetail where x.InspectionId == InspectionId select new diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 083735c9..933f6d87 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class InspectionManagementService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -36,6 +36,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string UnitWorkId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.ProcessControl_InspectionManagement where x.ProjectId == projectId && x.FileType == null orderby x.InspectionDate descending @@ -80,6 +81,7 @@ namespace BLL } public static IEnumerable GetListDataForDataType(string controlPointType, string projectId, string UnitWorkId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.ProcessControl_InspectionManagement where x.ProjectId == projectId && x.FileType == null orderby x.InspectionDate descending diff --git a/SGGL/BLL/CQMS/ProcessControl/NondestructiveTestService.cs b/SGGL/BLL/CQMS/ProcessControl/NondestructiveTestService.cs index 12c61b52..ae4fc5f3 100644 --- a/SGGL/BLL/CQMS/ProcessControl/NondestructiveTestService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/NondestructiveTestService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class NondestructiveTestService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 diff --git a/SGGL/BLL/CQMS/ProcessControl/TestPackageManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/TestPackageManagementService.cs index d46a2857..856f25cf 100644 --- a/SGGL/BLL/CQMS/ProcessControl/TestPackageManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/TestPackageManagementService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class TestPackageManagementService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -33,6 +33,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string UnitWorkId, string completedState, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.ProcessControl_TestPackageManagement where x.ProjectId == projectId orderby x.TestPackageManagementCode descending diff --git a/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs b/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs index 0d774728..5f55f36c 100644 --- a/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs +++ b/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class WorkContactApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -17,6 +17,7 @@ namespace BLL /// public static IEnumerable getListData(string workContactId) { + Model.CNPCDB db = Funs.DB; return from x in db.Unqualified_WorkContactApprove where x.WorkContactId == workContactId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate @@ -92,6 +93,7 @@ namespace BLL } public static Model.Unqualified_WorkContactApprove GetSee(string WorkContactId, string userId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == WorkContactId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string WorkContactId, string userId) @@ -113,6 +115,7 @@ namespace BLL /// 一个工作联系单审批实体 public static Model.Unqualified_WorkContactApprove GetWorkContactApproveByWorkContactId(string noticeId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == noticeId && x.ApproveDate == null && x.ApproveType != "S"); } /// @@ -140,6 +143,7 @@ namespace BLL /// public static Model.Unqualified_WorkContactApprove GetAudit1(string workContactId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit1); } @@ -150,6 +154,7 @@ namespace BLL /// public static Model.Unqualified_WorkContactApprove GetAudit2(string workContactId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit2 || x.ApproveType == BLL.Const.WorkContact_Audit2R)); } @@ -160,6 +165,7 @@ namespace BLL /// public static Model.Unqualified_WorkContactApprove GetAudit3(string workContactId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit3); } @@ -170,11 +176,13 @@ namespace BLL /// public static Model.Unqualified_WorkContactApprove GetAudit4(string workContactId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit4 || x.ApproveType == BLL.Const.WorkContact_Audit1R)); } public static Model.Unqualified_WorkContactApprove GetComplie(string workContactId) { + Model.CNPCDB db = Funs.DB; return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Compile); } public static Model.Unqualified_WorkContactApprove GetWorkContactApproveById(string WorkContactApproveId) diff --git a/SGGL/BLL/CQMS/WBS/BreakdownProjectAuditRecordService.cs b/SGGL/BLL/CQMS/WBS/BreakdownProjectAuditRecordService.cs index d111e0f3..5ec1025c 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownProjectAuditRecordService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownProjectAuditRecordService.cs @@ -9,14 +9,14 @@ namespace BLL { public class BreakdownProjectAuditRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 定义变量 /// - private static IQueryable qq = from x in db.WBS_BreakdownProjectAuditRecord orderby x.CreateDate select x; + private static IQueryable qq = from x in Funs.DB.WBS_BreakdownProjectAuditRecord orderby x.CreateDate select x; public static Model.WBS_BreakdownProjectAuditRecord GetBreakdownProjectAuditRecordById(string id) { diff --git a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs index a8e0752c..d3375306 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs @@ -9,7 +9,7 @@ namespace BLL { public class BreakdownProjectService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -41,7 +41,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.WBS_BreakdownProject orderby x.SortIndex select x; + private static IQueryable qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x; /// /// 获取项目列表 @@ -108,7 +108,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq2 = from x in db.View_WBS select x; + private static IQueryable qq2 = from x in Funs.DB.View_WBS select x; /// /// 获取项目已选择的WBS列表 @@ -164,7 +164,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq3 = from x in db.View_WBS_BreakdownProject orderby x.SortIndex select x; + private static IQueryable qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x; /// /// 获取项目列表 diff --git a/SGGL/BLL/CQMS/WBS/BreakdownService.cs b/SGGL/BLL/CQMS/WBS/BreakdownService.cs index 7f881c5a..5acd78ce 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownService.cs @@ -9,7 +9,7 @@ namespace BLL { public class BreakdownService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.WBS_Breakdown orderby x.SortIndex select x; + private static IQueryable qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x; /// /// 获取项目列表 diff --git a/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs b/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs index 7b3f84e7..c9ac35aa 100644 --- a/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs @@ -9,7 +9,7 @@ namespace BLL { public class DivisionProjectService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.WBS_DivisionProject orderby x.SortIndex select x; + private static IQueryable qq = from x in Funs.DB.WBS_DivisionProject orderby x.SortIndex select x; /// /// 获取项目列表 diff --git a/SGGL/BLL/CQMS/WBS/DivisionService.cs b/SGGL/BLL/CQMS/WBS/DivisionService.cs index 61de1fdf..a3653cb4 100644 --- a/SGGL/BLL/CQMS/WBS/DivisionService.cs +++ b/SGGL/BLL/CQMS/WBS/DivisionService.cs @@ -9,7 +9,7 @@ namespace BLL { public class DivisionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.WBS_Division orderby x.SortIndex select x; + private static IQueryable qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x; /// /// 获取项目列表 diff --git a/SGGL/BLL/CQMS/WBS/ProjectQualityService.cs b/SGGL/BLL/CQMS/WBS/ProjectQualityService.cs index ceec8556..607680e4 100644 --- a/SGGL/BLL/CQMS/WBS/ProjectQualityService.cs +++ b/SGGL/BLL/CQMS/WBS/ProjectQualityService.cs @@ -10,7 +10,7 @@ namespace BLL { public class ProjectQualityService { - public static Model.CNPCDB db = Funs.DB; + /// @@ -39,6 +39,7 @@ namespace BLL /// public static Model.WBS_ProjectQuality GetProjectQualityModel(string ProjectQualityId) { + Model.CNPCDB db = Funs.DB; var model = db.WBS_ProjectQuality.FirstOrDefault(c => c.ProjectQualityId == ProjectQualityId); return model; } @@ -51,6 +52,7 @@ namespace BLL /// public static bool UpdateProjectQuality(Model.WBS_ProjectQuality model) { + Model.CNPCDB db = Funs.DB; bool isok = true; try { @@ -91,7 +93,7 @@ namespace BLL /// public static bool DelProjectQuality(string id) { - + Model.CNPCDB db = Funs.DB; bool isok = true; try { @@ -163,6 +165,7 @@ namespace BLL /// public static List GetGroupProjectQualityDes(string projectName) { + Model.CNPCDB db = Funs.DB; var list = db.WBS_ProjectQuality.Where(c => c.ProjectName == projectName).GroupBy(c => c.ProjectQualityDes).Select(c => new { QuestionDef = c.Key, @@ -180,6 +183,7 @@ namespace BLL /// public static List GetGroupProjectQualityDes(List projectNames) { + Model.CNPCDB db = Funs.DB; var list = db.WBS_ProjectQuality.Where(c => projectNames.Contains(c.ProjectName)).GroupBy(c => c.ProjectQualityDes).Select(c => new { QuestionDef = c.Key, @@ -194,6 +198,7 @@ namespace BLL /// public static List GetProjectQualityResult(string projectQualityDes) { + Model.CNPCDB db = Funs.DB; var list = db.WBS_ProjectQuality.Where(c => c.ProjectQualityDes == projectQualityDes).Select(c => new { RectifyOpinion = c.ProjectQualityResult, diff --git a/SGGL/BLL/Common/AttachFileService.cs b/SGGL/BLL/Common/AttachFileService.cs index f5bacced..2ac54dc7 100644 --- a/SGGL/BLL/Common/AttachFileService.cs +++ b/SGGL/BLL/Common/AttachFileService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class AttachFileService { - public static Model.CNPCDB db = Funs.DB; + /// /// 添加附件存储信息 @@ -17,6 +17,7 @@ namespace BLL /// public static void AddAttachFile(Model.AttachFile attachFile) { + Model.CNPCDB db = Funs.DB; string newKeyID = SQLHelper.GetNewID(typeof(Model.AttachFile)); Model.AttachFile newAttachFile = new Model.AttachFile(); newAttachFile.AttachFileId = newKeyID; @@ -35,6 +36,7 @@ namespace BLL /// public static void updateAttachFile(Model.AttachFile attachFile) { + Model.CNPCDB db = Funs.DB; Model.AttachFile newAttachFile = db.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFile.AttachFileId); newAttachFile.ToKeyId = attachFile.ToKeyId; newAttachFile.AttachSource = attachFile.AttachSource; @@ -50,6 +52,7 @@ namespace BLL /// public static void DeleteAttachFile(string rootPath, string toKeyId, string menuId) { + Model.CNPCDB db = Funs.DB; Model.AttachFile att = db.AttachFile.FirstOrDefault(e => e.ToKeyId == toKeyId && e.MenuId == menuId); if (att != null) { diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 47d4a320..8948abf8 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3778,6 +3778,10 @@ namespace BLL /// public const string CompanyTrainingTemplateUrl = "File\\Excel\\DataIn\\公司教材库导入模板.xls"; /// + /// 考试试题类型导入模版文件原始的虚拟路径 + /// + public const string TestTrainingTypeTemplateUrl = "File\\Excel\\DataIn\\考试试题类型导入模版.xls"; + /// /// 考试试题模版文件原始的虚拟路径 /// public const string TestTrainingTemplateUrl = "File\\Excel\\DataIn\\考试试题模版.xls"; diff --git a/SGGL/BLL/Common/ProjectDataFlowSetService.cs b/SGGL/BLL/Common/ProjectDataFlowSetService.cs index 41243d74..421ad477 100644 --- a/SGGL/BLL/Common/ProjectDataFlowSetService.cs +++ b/SGGL/BLL/Common/ProjectDataFlowSetService.cs @@ -9,7 +9,7 @@ /// public static class ProjectDataFlowSetService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 /// @@ -27,6 +27,7 @@ /// public static IEnumerable getListData(string dataId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.View_ProjectData_FlowOperate where x.DataId == dataId && x.IsClosed == true orderby x.SortIndex descending @@ -296,6 +297,7 @@ /// 主表主键Id public static bool IsExitOperate(string menuId, string dataId) { + Model.CNPCDB db = Funs.DB; return (from x in db.ProjectData_FlowOperate where x.MenuId == menuId && x.DataId == dataId select x).Count() > 0; @@ -318,6 +320,7 @@ /// public static void CloseFlowOperate(string menuId, string dataId, string opinion) { + Model.CNPCDB db = Funs.DB; var updateUnFlowOperate = db.ProjectData_FlowOperate.FirstOrDefault(x => x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue)); if (updateUnFlowOperate != null) { diff --git a/SGGL/BLL/Common/WeatherService.cs b/SGGL/BLL/Common/WeatherService.cs index df9d933a..810a76df 100644 --- a/SGGL/BLL/Common/WeatherService.cs +++ b/SGGL/BLL/Common/WeatherService.cs @@ -9,7 +9,7 @@ namespace BLL /// public class WeatherService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取CNPCDB diff --git a/SGGL/BLL/DigData/HSEDataCollectService.cs b/SGGL/BLL/DigData/HSEDataCollectService.cs index e9fe74e1..456000c8 100644 --- a/SGGL/BLL/DigData/HSEDataCollectService.cs +++ b/SGGL/BLL/DigData/HSEDataCollectService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class HSEDataCollectService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目HSE数据汇总 @@ -90,6 +90,7 @@ namespace BLL /// public static void ProjectHSEDataCollectSubmission(Model.Base_Project project) { + Model.CNPCDB db = Funs.DB; if (project.ProjectState == Const.ProjectState_3) { #region 项目关闭 diff --git a/SGGL/BLL/DoorServer/DoorServerService.cs b/SGGL/BLL/DoorServer/DoorServerService.cs index 063959ba..c8112b52 100644 --- a/SGGL/BLL/DoorServer/DoorServerService.cs +++ b/SGGL/BLL/DoorServer/DoorServerService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class DoorServerService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取事故类型 diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_EMInventoryRecordsService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_EMInventoryRecordsService.cs index 344eda64..3aeee0cc 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_EMInventoryRecordsService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_EMInventoryRecordsService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class HJGL_EMInventoryRecordsService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -25,7 +25,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.HJGL_EMInventoryRecords orderby x.UpdateTime select x; + private static IQueryable qq = from x in Funs.DB.HJGL_EMInventoryRecords orderby x.UpdateTime select x; /// /// 获取分页列表 /// @@ -37,6 +37,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, string unitId, string materialid, string models, string specifications, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; q = q.Where(e => e.ProjectId == projectId); diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_EMaterialRegistService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_EMaterialRegistService.cs index b3e6db9d..481e6b29 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_EMaterialRegistService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_EMaterialRegistService.cs @@ -12,7 +12,7 @@ namespace BLL /// public class HJGL_EMaterialRegistService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -26,7 +26,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.HJGL_EMaterialRegist orderby x.EMaterialRegistCode select x; + private static IQueryable qq = from x in Funs.DB.HJGL_EMaterialRegist orderby x.EMaterialRegistCode select x; /// /// 分页查询列表 @@ -37,6 +37,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(projectId)) { @@ -277,6 +278,7 @@ namespace BLL /// public static IEnumerable GetListDataPrint(string eMaterialRegistId) { + Model.CNPCDB db = Funs.DB; return from x in db.HJGL_EMaterialRegistItem join y in db.HJGL_EMaterialRegist on x.EMaterialRegistId equals y.EMaterialRegistId where y.EMaterialRegistId == eMaterialRegistId diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeBakeService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeBakeService.cs index 59afefa2..add0a1c3 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeBakeService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeBakeService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class HJGL_ElectrodeBakeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.HJGL_ElectrodeBake orderby x.ElectrodeCode select x; + private static IQueryable qq = from x in Funs.DB.HJGL_ElectrodeBake orderby x.ElectrodeCode select x; /// /// 分页查询列表 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(projectId)) { @@ -273,6 +274,7 @@ namespace BLL /// public static IEnumerable GetListDataPrint(DateTime startDate, DateTime endDate) { + Model.CNPCDB db = Funs.DB; return from x in db.HJGL_ElectrodeBakeItem join y in db.HJGL_ElectrodeBake on x.ElectrodeID equals y.ElectrodeID where y.ElectrodeDate >= startDate && y.ElectrodeDate <= endDate diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeRecoveryService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeRecoveryService.cs index edd7976f..fbca248e 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeRecoveryService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeRecoveryService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class HJGL_ElectrodeRecoveryService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据焊条发放回收记录ID获取焊条发放回收记录信息 diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeSecondaryBakeService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeSecondaryBakeService.cs index 77e63bfa..5ee66894 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeSecondaryBakeService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_ElectrodeSecondaryBakeService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class HJGL_ElectrodeSecondaryBakeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.HJGL_ElectrodeSecondaryBake orderby x.ElectrodeCode select x; + private static IQueryable qq = from x in Funs.DB.HJGL_ElectrodeSecondaryBake orderby x.ElectrodeCode select x; /// /// 分页查询列表 @@ -34,6 +34,7 @@ namespace BLL /// public static IEnumerable GetListData(string projectId, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = qq; if (!string.IsNullOrEmpty(projectId)) { @@ -186,8 +187,8 @@ namespace BLL /// public static IEnumerable GetListDataPrint(DateTime startDate, DateTime endDate) { - return from x in db.HJGL_ElectrodeSecondaryBake - + Model.CNPCDB db = Funs.DB; + return from x in db.HJGL_ElectrodeSecondaryBake where x.ElectrodeDate >= startDate && x.ElectrodeDate <= endDate orderby x.ElectrodeCode select new diff --git a/SGGL/BLL/HJGL/MaterialManage/HJGL_MaterialApplyService.cs b/SGGL/BLL/HJGL/MaterialManage/HJGL_MaterialApplyService.cs index a1128352..ddd02b40 100644 --- a/SGGL/BLL/HJGL/MaterialManage/HJGL_MaterialApplyService.cs +++ b/SGGL/BLL/HJGL/MaterialManage/HJGL_MaterialApplyService.cs @@ -9,7 +9,7 @@ namespace BLL.HJGL.MaterialManage { public class HJGL_MaterialApplyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据焊条发放回收记录ID获取焊条发放回收记录信息 diff --git a/SGGL/BLL/HJGL/TrustManage/ShowTrustSearchService.cs b/SGGL/BLL/HJGL/TrustManage/ShowTrustSearchService.cs index 8f5c3163..1081894a 100644 --- a/SGGL/BLL/HJGL/TrustManage/ShowTrustSearchService.cs +++ b/SGGL/BLL/HJGL/TrustManage/ShowTrustSearchService.cs @@ -9,7 +9,7 @@ namespace BLL { public class ShowTrustSearchService { - public static Model.CNPCDB db = Funs.DB; + /// /// 定义变量 @@ -35,6 +35,7 @@ namespace BLL /// public static IEnumerable getListData(string projectId, string[] checkList, int startRowIndex, int maximumRows) { + Model.CNPCDB db = Funs.DB; IQueryable q = from x in db.View_CH_TrustSearch where x.ProjectId == projectId orderby x.ISO_IsoNo, x.JOT_JointNo diff --git a/SGGL/BLL/HJGL/TrustManage/TrustManageEditService.cs b/SGGL/BLL/HJGL/TrustManage/TrustManageEditService.cs index f5d86605..1aff82e4 100644 --- a/SGGL/BLL/HJGL/TrustManage/TrustManageEditService.cs +++ b/SGGL/BLL/HJGL/TrustManage/TrustManageEditService.cs @@ -10,7 +10,7 @@ namespace BLL { public class TrustManageEditService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -24,7 +24,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.View_CH_TrustItem + private static IQueryable qq = from x in Funs.DB.View_CH_TrustItem orderby x.ISO_IsoNo, x.JOT_JointNo select x; diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldReportService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldReportService.cs index b1cb4135..1d9851f3 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldReportService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldReportService.cs @@ -9,7 +9,7 @@ namespace BLL { public class WeldReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据检查编号查询焊接日报信息 diff --git a/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs b/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs index 037267a4..ea8cdd15 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AccidentHandleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取HSSE事故(含未遂)处理 diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs index 1aa90ccb..271fee3c 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AccidentPersonRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取HSSE事故(对人员)记录 diff --git a/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs b/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs index 0c9d2b85..ac6fb585 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AccidentReportOtherService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取事故调查处理报告 diff --git a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs index f7cd023e..8d4acc37 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AccidentReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取事故调查报告 diff --git a/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs b/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs index e24d5506..ea36df5c 100644 --- a/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs +++ b/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class NoFourLetoffService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取四不放过 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs b/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs index 2412587d..a90b284c 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public class Check_CheckColligationDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据综合检查id获取所有相关明细信息 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckDayDetailService.cs b/SGGL/BLL/HSSE/Check/Check_CheckDayDetailService.cs index 7ddd8102..a6587fb2 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckDayDetailService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckDayDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public class Check_CheckDayDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据日常巡检id获取所有相关明细信息 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs b/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs index 1d2fe4b0..9c5c5e32 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public class Check_CheckSpecialDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据专项检查id获取所有相关明细信息 diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs index 3a81110e..f2209e21 100644 --- a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class Check_ProjectLeaderCheckService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取领导带班检查 @@ -37,7 +37,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.Check_ProjectLeaderCheck + private static IQueryable getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck select x; /// @@ -48,6 +48,7 @@ namespace BLL /// public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1) { + Model.CNPCDB db = Funs.DB; IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId)) { diff --git a/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs b/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs index e82c3fc3..e7d7244a 100644 --- a/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs +++ b/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class IncentiveNoticeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取奖励通知单 diff --git a/SGGL/BLL/HSSE/Check/PunishNoticeService.cs b/SGGL/BLL/HSSE/Check/PunishNoticeService.cs index a12b31e5..6e62032d 100644 --- a/SGGL/BLL/HSSE/Check/PunishNoticeService.cs +++ b/SGGL/BLL/HSSE/Check/PunishNoticeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PunishNoticeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取处罚通知单 diff --git a/SGGL/BLL/HSSE/Check/ViolationPersonService.cs b/SGGL/BLL/HSSE/Check/ViolationPersonService.cs index 7a5dfa3a..49bfe073 100644 --- a/SGGL/BLL/HSSE/Check/ViolationPersonService.cs +++ b/SGGL/BLL/HSSE/Check/ViolationPersonService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ViolationPersonService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取违规人员记录 diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs index 343e98e8..2ef77dd7 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class CostManageItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键删除费用管理明细 diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs index 5da3e112..54cbeafe 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class CostManageService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全费用管理 diff --git a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs index 8d4bb112..4fe53455 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class CostSmallDetailItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全费用投入登记明细 diff --git a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs index d32bc7f2..f9515043 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class CostSmallDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全费用投入登记 diff --git a/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs b/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs index 90a19c92..55ee3bc4 100644 --- a/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs +++ b/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ExpenseService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取措施费用使用计划 diff --git a/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs b/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs index 7f03f770..3bd22470 100644 --- a/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs @@ -8,7 +8,6 @@ namespace BLL { public class AccidentCaseItemService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据常见事故案例明细Id获取事故案例明细 diff --git a/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs b/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs index 2eea4058..d06cda22 100644 --- a/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs +++ b/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs @@ -7,7 +7,6 @@ namespace BLL { public class AccidentCaseService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据主键获取事故伤害及预防 diff --git a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs index 1245d955..8fbc0851 100644 --- a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs @@ -8,7 +8,6 @@ namespace BLL /// public class CompanyTrainingItemService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据主键获取公司培训明细信息 @@ -17,6 +16,7 @@ namespace BLL /// public static Model.Training_CompanyTrainingItem GetCompanyTrainingItemById(string companyTrainingItemId) { + Model.CNPCDB db = Funs.DB; return db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainingItemId); } @@ -26,6 +26,7 @@ namespace BLL /// public static void AddCompanyTrainingItem(Model.Training_CompanyTrainingItem model) { + Model.CNPCDB db = Funs.DB; Model.Training_CompanyTrainingItem newModel = new Model.Training_CompanyTrainingItem(); newModel.CompanyTrainingItemId = model.CompanyTrainingItemId; newModel.CompanyTrainingId = model.CompanyTrainingId; @@ -49,6 +50,7 @@ namespace BLL /// public static void UpdateCompanyTrainingItem(Model.Training_CompanyTrainingItem model) { + Model.CNPCDB db = Funs.DB; Model.Training_CompanyTrainingItem newModel = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == model.CompanyTrainingItemId); if (newModel != null) { @@ -72,6 +74,7 @@ namespace BLL /// public static void DeleteCompanyTrainingItemById(string companyTrainItemId) { + Model.CNPCDB db = Funs.DB; Model.Training_CompanyTrainingItem model = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainItemId); if (model != null) { diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs index 354536c8..fc82bf8e 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs @@ -8,7 +8,6 @@ namespace BLL /// public static class EduTrain_TrainRecordDetailService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据教育培训主键获取所有的教育培训明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs index 3996db1f..ebe0067c 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs @@ -11,8 +11,6 @@ namespace BLL /// public static class EduTrain_TrainRecordService { - public static Model.CNPCDB db = Funs.DB; - /// /// 根据教育培训主键获取教育培训信息 /// diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs index 4efdf20c..b417e2fc 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EduTrain_TrainTestService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据教育培训主键获取所有的教育培训明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs index 2e2b70c9..92d64698 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TestPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取培训计划 @@ -26,6 +26,7 @@ namespace BLL /// public static void AddTestPlan(Model.Training_TestPlan testPlan) { + Model.CNPCDB db = Funs.DB; Model.Training_TestPlan newTestPlan = new Model.Training_TestPlan { TestPlanId = testPlan.TestPlanId, @@ -63,6 +64,7 @@ namespace BLL /// public static void UpdateTestPlan(Model.Training_TestPlan TestPlan) { + Model.CNPCDB db = Funs.DB; Model.Training_TestPlan newTestPlan = db.Training_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlan.TestPlanId); if (newTestPlan != null) { @@ -93,7 +95,6 @@ namespace BLL /// public static void DeleteTestPlanById(string TestPlanId) { - var getTestPlan = GetTestPlanById(TestPlanId); if (getTestPlan != null) { @@ -138,6 +139,7 @@ namespace BLL /// public static List GetTestPlanList() { + Model.CNPCDB db = Funs.DB; return (from x in db.Training_TestPlan orderby x.PlanCode select x).ToList(); } diff --git a/SGGL/BLL/HSSE/EduTrain/TestRecordItemService.cs b/SGGL/BLL/HSSE/EduTrain/TestRecordItemService.cs index a759fca2..5f7da7b8 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestRecordItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestRecordItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TestRecordItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据考试记录Id获取明细信息 @@ -28,6 +28,7 @@ namespace BLL /// public static void DeleteTestRecordItemmByTestRecordItemId(string testRecordItemId) { + Model.CNPCDB db = Funs.DB; var testRecordItem = db.Training_TestRecordItem.FirstOrDefault(x => x.TestRecordItemId == testRecordItemId); if (testRecordItem != null) { diff --git a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs index f66e048f..d2628b8c 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TestRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取考试记录 diff --git a/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs index f5c21194..acd7d017 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class TestTrainingItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs b/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs index 57858ee2..d8311d59 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs @@ -7,7 +7,6 @@ namespace BLL { public static class TestTrainingService { - public static Model.CNPCDB db = Funs.DB; /// /// 根据主键获取信息 @@ -84,6 +83,7 @@ namespace BLL /// public static List GetTestTrainingList() { + Model.CNPCDB db = Funs.DB; return (from x in db.Training_TestTraining orderby x.TrainingCode select x).ToList(); } @@ -93,6 +93,7 @@ namespace BLL /// public static List GetEndTestTrainingList() { + Model.CNPCDB db = Funs.DB; return (from x in db.Training_TestTraining where x.IsEndLever == true orderby x.TrainingCode diff --git a/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs index b9d02d5f..33810d97 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TrainTestDBItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键删除安全试题库明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs b/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs index 9e87f2ae..71a697e8 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TrainTestDBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全试题库信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainTestRecordService.cs b/SGGL/BLL/HSSE/EduTrain/TrainTestRecordService.cs index bd7d63f7..04f35a1c 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainTestRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainTestRecordService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TrainTestRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取考试记录 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs index 14cbe808..106ccb35 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs @@ -8,8 +8,6 @@ namespace BLL { public class TrainingItemService { - public static Model.CNPCDB db = Funs.DB; - /// /// /// diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs index 64709314..6585cd74 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TrainingPlanItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据培训计划明细表Id获取所有相关明细信息 @@ -19,6 +19,7 @@ namespace BLL /// public static List GetPlanItemByPlanId(string planId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Training_PlanItem where x.PlanId == planId select x).ToList(); } @@ -28,6 +29,7 @@ namespace BLL /// public static void AddPlanItem(Model.Training_PlanItem planItem) { + Model.CNPCDB db = Funs.DB; Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem { PlanItemId = planItem.PlanItemId, @@ -47,6 +49,7 @@ namespace BLL /// public static void UpdatePlanItem(Model.Training_PlanItem model) { + Model.CNPCDB db = Funs.DB; Model.Training_PlanItem newItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == model.PlanItemId); if (newItem != null) { @@ -65,6 +68,7 @@ namespace BLL /// public static void DeletePlanItemById(string planItemId) { + Model.CNPCDB db = Funs.DB; var planItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == planItemId); if (planItem != null) { diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs index bf68bc3f..68a7f5db 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class TrainingPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取培训计划 @@ -20,6 +20,7 @@ namespace BLL /// public static Model.Training_Plan GetPlanById(string planId) { + Model.CNPCDB db = Funs.DB; return db.Training_Plan.FirstOrDefault(e => e.PlanId == planId); } @@ -30,6 +31,7 @@ namespace BLL /// public static Model.Training_Plan GetPlanByCheckId(string checkId) { + Model.CNPCDB db = Funs.DB; return db.Training_Plan.FirstOrDefault(e => e.CheckId == checkId && e.IsRetakeCourse == 1); } @@ -42,6 +44,7 @@ namespace BLL /// public static List GetThisYearPlanByCompanyTrainingItemId(string projectId, string itemId, int year) { + Model.CNPCDB db = Funs.DB; var list = db.Training_Plan.Where(e => e.CompanyTrainingItemId == itemId && e.IsRetakeCourse != 1 && ((DateTime)e.DesignerDate).Year == year).ToList(); if (!string.IsNullOrWhiteSpace(projectId)) { @@ -57,6 +60,7 @@ namespace BLL /// public static void AddPlan(Model.Training_Plan model) { + Model.CNPCDB db = Funs.DB; Model.Training_Plan newModel = new Model.Training_Plan { PlanId = model.PlanId, @@ -92,6 +96,7 @@ namespace BLL /// public static void UpdatePlan(Model.Training_Plan model) { + Model.CNPCDB db = Funs.DB; Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == model.PlanId); if (isUpdate != null) { @@ -138,6 +143,7 @@ namespace BLL /// public static List GetPlanList() { + Model.CNPCDB db = Funs.DB; return (from x in db.Training_Plan orderby x.PlanCode select x).ToList(); } @@ -149,6 +155,7 @@ namespace BLL /// public static List GetPlanListByWorkPostId(string projectId, string workPostId) { + Model.CNPCDB db = Funs.DB; var list = (from x in db.Training_Plan where x.ProjectId == projectId && (x.WorkPostId == null || x.WorkPostId.Contains(workPostId)) && x.CompanyTrainingItemId != null && x.IsRetakeCourse == null && Convert.ToDateTime(x.DesignerDate).Year == DateTime.Now.Year select x).ToList(); @@ -161,6 +168,7 @@ namespace BLL /// public static void RetakeCourseProducePlan(ProducePlanInfo info) { + Model.CNPCDB db = Funs.DB; var plan = GetPlanByCheckId(info.CheckId); var person = PersonService.GetPersonById(info.PersonId); var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId); @@ -279,6 +287,7 @@ namespace BLL /// public static void SelectCompanyTrainingItemProducePlan(ProducePlanInfo info) { + Model.CNPCDB db = Funs.DB; var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId); var teachHour = companyTrainingItem.LearningTime / 3600; @@ -407,6 +416,7 @@ namespace BLL /// public static bool SelectPersonProducePlan(ProducePlanInfo info) { + Model.CNPCDB db = Funs.DB; //1、根据人员获取人员基本信息 var person = PersonService.GetPersonById(info.PersonId); if (string.IsNullOrWhiteSpace(person.WorkPostId)) diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingService.cs index 33311730..8580a171 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingService.cs @@ -5,7 +5,7 @@ namespace BLL { public class TrainingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据上级Id查询所有教育培训主键列的值 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs index 643739d8..85465296 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class TrainingTaskService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取培训任务 @@ -20,6 +20,7 @@ namespace BLL /// public static Model.Training_Task GetTaskById(string taskId) { + Model.CNPCDB db = Funs.DB; return db.Training_Task.FirstOrDefault(e => e.TaskId == taskId); } @@ -39,6 +40,7 @@ namespace BLL /// public static void AddTask(Model.Training_Task task) { + Model.CNPCDB db = Funs.DB; Model.Training_Task newTask = new Model.Training_Task { TaskId = task.TaskId, @@ -75,6 +77,7 @@ namespace BLL /// public static void DeleteTaskById(string taskId) { + Model.CNPCDB db = Funs.DB; Model.Training_Task task = db.Training_Task.FirstOrDefault(e => e.TaskId == taskId); if (task != null) { diff --git a/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs b/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs index 98dc379a..2199a4d3 100644 --- a/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs +++ b/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class DrillRecordListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs b/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs index 7039b992..8741d655 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EmergencyListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急预案管理 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs b/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs index 4008a072..18678490 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EmergencySupplyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急物资管理 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs b/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs index ba7799bb..f91a3f92 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EmergencyTeamAndTrainService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急队伍/培训 diff --git a/SGGL/BLL/HSSE/Environmental/EIAReportService.cs b/SGGL/BLL/HSSE/Environmental/EIAReportService.cs index 5ec37a94..349b06e1 100644 --- a/SGGL/BLL/HSSE/Environmental/EIAReportService.cs +++ b/SGGL/BLL/HSSE/Environmental/EIAReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EIAReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取环评报告 diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs index 62f6c9ae..ae6440bb 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EnvironmentalEmergencyPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取环境事件应急预案 diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs index cdb3e4bd..1ba2f1a6 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EnvironmentalMonitoringService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取环境监测数据 diff --git a/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs b/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs index 5e219ff7..4173cf84 100644 --- a/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs +++ b/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class UnexpectedEnvironmentalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取突发环境事件 diff --git a/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs b/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs index 8d8dbd89..1e7134e7 100644 --- a/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs +++ b/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class HSSEMainDutyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全主体责任 diff --git a/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs b/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs index 2c5c3df2..7379b77a 100644 --- a/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs +++ b/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ServerSafetyInstitutionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全制度 diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs index 48d75f19..fabe419f 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs @@ -7,7 +7,7 @@ namespace BLL { public class ConstructionRiskApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取风险管控模板列表 /// @@ -16,6 +16,7 @@ namespace BLL /// public static DataTable getListData(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; var res = from x in db.HSSE_ConstructionRiskApprove where x.ConstructionRiskId == ConstructionRiskId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate @@ -76,6 +77,7 @@ namespace BLL /// public static Model.HSSE_ConstructionRiskApprove GetSee(string ConstructionRiskId, string userId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); } public static void See(string ConstructionRiskId, string userId) @@ -97,6 +99,7 @@ namespace BLL /// 一个风险管控审批实体 public static Model.HSSE_ConstructionRiskApprove GetConstructionRiskApproveByConstructionRiskId(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType != "S" && x.ApproveDate == null); } /// @@ -162,6 +165,7 @@ namespace BLL /// public static Model.HSSE_ConstructionRiskApprove GetAudit1(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit1); } @@ -172,6 +176,7 @@ namespace BLL /// public static Model.HSSE_ConstructionRiskApprove GetAudit2(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit2); } @@ -182,11 +187,13 @@ namespace BLL /// public static Model.HSSE_ConstructionRiskApprove GetAudit3(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit3); } public static Model.HSSE_ConstructionRiskApprove GetComplie(string ConstructionRiskId) { + Model.CNPCDB db = Funs.DB; return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Compile); } public static List GetListDataByCodeForApi(string code) diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs index be646628..93594931 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class ConstructionRiskCheckService { - public static Model.CNPCDB db = Funs.DB; + /// /// 要求主键获取危险清单信息 diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs index 05a3bf30..bb9024eb 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class ConstructionRiskListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 要求主键获取危险清单信息 diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs index c55d01ec..b924c3f6 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class Hazard_EnvironmentalRiskItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据危险源明细表id得到明细信息 @@ -136,6 +136,7 @@ namespace BLL /// public static List GetEnvironmentalRiskItemByEnvironmentalId(string environmentalId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Hazard_EnvironmentalRiskItem where x.EnvironmentalId == environmentalId select x).ToList(); } } diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs index 9f1d1556..9452be2e 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class Hazard_EnvironmentalRiskListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 要求主键获取危险清单信息 diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs index 3b7dd198..75bc15a1 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class Hazard_HazardListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 要求主键获取危险清单信息 @@ -27,6 +27,7 @@ namespace BLL /// 危险清单的数量 public static int GetHazardListCountByVersionNoIsNull(string projectId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Hazard_HazardList where x.VersionNo == null && x.ProjectId == projectId select x).Count(); } diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs index 1321f035..97dbb40c 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Hazard_HazardSelectedItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据危险源类别编号查询危险源类别 @@ -17,6 +17,7 @@ namespace BLL /// public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId) { + Model.CNPCDB db = Funs.DB; return from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId select new @@ -51,6 +52,7 @@ namespace BLL /// public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId, string workStage) { + Model.CNPCDB db = Funs.DB; return from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage select new @@ -84,6 +86,7 @@ namespace BLL /// 危险因素明细集合 public static List GetHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId select x).ToList(); } @@ -93,6 +96,7 @@ namespace BLL /// 危险因素明细集合 public static List GetPromptTimeIsNotNullHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.PromptTime != null select x).ToList(); } @@ -103,6 +107,7 @@ namespace BLL /// 一个危险源辨识与评价清单审批实体 public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId, string hazardListId, string workStage) { + Model.CNPCDB db = Funs.DB; return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId && x.HazardListId == hazardListId && x.WorkStage == workStage); } @@ -113,6 +118,7 @@ namespace BLL /// 一个危险源辨识与评价清单审批实体 public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardSelectedItemId(string hazardSelectedItemId) { + Model.CNPCDB db = Funs.DB; return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardSelectedItemId == hazardSelectedItemId); } @@ -123,6 +129,7 @@ namespace BLL /// 一个危险源辨识与评价清单审批实体 public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId) { + Model.CNPCDB db = Funs.DB; return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId); } @@ -156,6 +163,7 @@ namespace BLL /// public static List GetHazardSelectedItemBySortAndListIdAndWorkStage(string hazardListTypeId, string hazardListId, string workStage) { + Model.CNPCDB db = Funs.DB; return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage select x).ToList(); } diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index 0a477670..b21786c6 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class HSSE_Hazard_HazardRegisterService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据危险观察登记主键获取危险观察登记信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs index c927ceb8..9ad27555 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentInItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备机具入场报批明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs index ac09b36d..1afdfafd 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentInService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备机具入场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs index 20cc473c..2b35219c 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentOutItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备机具出场报批明细 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs index 7878b507..a314e7f0 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentOutService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs index 5b708453..86905e60 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentQualityInItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主表ID获取明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs index 5716dcf9..903f5b0f 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentQualityInService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备审批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs index 538ee628..43731c78 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class GeneralEquipmentInItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般设备机具入场报批明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs index 182377e7..094baa6c 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class GeneralEquipmentInService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般设备机具入场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs index ec817348..7f3be8dd 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class GeneralEquipmentOutItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs index 9781d4bf..b16ebde7 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class GeneralEquipmentOutService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs index dfdf98bd..4742775e 100644 --- a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class ConstructionStandardIdentifyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据标准规范辨识主键获取一个标准规范辨识信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs index 10dafc01..df70c891 100644 --- a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class ConstructionStandardSelectedItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据标准规范辨识Id获取对应所有标准规范项信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs index 74f70aff..2e32c31c 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectAccidentCauseReportItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 职工伤亡事故原因分析报表明细表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs index 8d5c7075..e04f3a57 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectAccidentCauseReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 职工伤亡事故原因分析报表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs index 79dbb2d4..0cad5032 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectDrillConductedQuarterlyReportItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练开展情况季报表明细信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs index a9902546..6a5fa95d 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectDrillConductedQuarterlyReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练开展情况季报表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs index 648413c7..daacc54a 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectDrillPlanHalfYearReportItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练工作计划半年报明细信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs index ee4d39b7..44c234f6 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectDrillPlanHalfYearReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练工作计划半年报 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs index 236cf631..54bdb23b 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectMillionsMonthlyReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取企业安全数据统计月报 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs index 50806312..06d3501e 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectSafetyQuarterlyReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全生产数据季报 diff --git a/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs b/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs index 8f913798..e19f193b 100644 --- a/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs +++ b/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs @@ -5,7 +5,7 @@ namespace BLL { public class HSSEStandardsListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据id查询标准规范信息 diff --git a/SGGL/BLL/HSSE/Law/LawRegulationListService.cs b/SGGL/BLL/HSSE/Law/LawRegulationListService.cs index 2b719215..36ddaa26 100644 --- a/SGGL/BLL/HSSE/Law/LawRegulationListService.cs +++ b/SGGL/BLL/HSSE/Law/LawRegulationListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class LawRegulationListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取法律法规 diff --git a/SGGL/BLL/HSSE/Law/ManageRuleService.cs b/SGGL/BLL/HSSE/Law/ManageRuleService.cs index 504359f9..7ab056e4 100644 --- a/SGGL/BLL/HSSE/Law/ManageRuleService.cs +++ b/SGGL/BLL/HSSE/Law/ManageRuleService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ManageRuleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取管理规定 diff --git a/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs b/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs index ad4add05..3010cbff 100644 --- a/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs +++ b/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class RulesRegulationsService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取生产规章制度 diff --git a/SGGL/BLL/HSSE/License/HSETechnicalService.cs b/SGGL/BLL/HSSE/License/HSETechnicalService.cs index 29a743e0..55d7be2c 100644 --- a/SGGL/BLL/HSSE/License/HSETechnicalService.cs +++ b/SGGL/BLL/HSSE/License/HSETechnicalService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class HSETechnicalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全技术交底 diff --git a/SGGL/BLL/HSSE/License/LicenseManagerService.cs b/SGGL/BLL/HSSE/License/LicenseManagerService.cs index b045f2e4..c65fd4ae 100644 --- a/SGGL/BLL/HSSE/License/LicenseManagerService.cs +++ b/SGGL/BLL/HSSE/License/LicenseManagerService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class LicenseManagerService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全许可证 diff --git a/SGGL/BLL/HSSE/License/LicensePublicService.cs b/SGGL/BLL/HSSE/License/LicensePublicService.cs index 49f7e84b..6534c95d 100644 --- a/SGGL/BLL/HSSE/License/LicensePublicService.cs +++ b/SGGL/BLL/HSSE/License/LicensePublicService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class LicensePublicService { - public static Model.CNPCDB db = Funs.DB; + /// /// 状态下拉框 /// diff --git a/SGGL/BLL/HSSE/Manager/CompletionReportService.cs b/SGGL/BLL/HSSE/Manager/CompletionReportService.cs index 0049beb0..1f38e7a7 100644 --- a/SGGL/BLL/HSSE/Manager/CompletionReportService.cs +++ b/SGGL/BLL/HSSE/Manager/CompletionReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class CompletionReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取完工报告 diff --git a/SGGL/BLL/HSSE/Manager/HeadMonthReportBService.cs b/SGGL/BLL/HSSE/Manager/HeadMonthReportBService.cs index 0324377b..b37978b8 100644 --- a/SGGL/BLL/HSSE/Manager/HeadMonthReportBService.cs +++ b/SGGL/BLL/HSSE/Manager/HeadMonthReportBService.cs @@ -8,7 +8,7 @@ namespace BLL { public class HeadMonthReportBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据安全统计主键获取安全统计信息 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentReport2Service.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentReport2Service.cs index 2b2b89be..c086bef6 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentReport2Service.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentReport2Service.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AccidentReport2Service { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取事故调查报告 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentSortBService.cs index 30fcb754..33aa6f02 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/AccidentSortBService.cs @@ -7,7 +7,7 @@ namespace BLL { public class AccidentSortBService { - public static Model.CNPCDB db = Funs.DB; + public static Model.Manager_AccidentSortB GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType) { @@ -101,6 +101,7 @@ namespace BLL /// 月报告主键 public static void DeleteAccidentSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_AccidentSortB where x.MonthReportId == monthReportId select x).ToList(); db.Manager_AccidentSortB.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/CheckSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/CheckSortBService.cs index 54039848..79ac5f4e 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/CheckSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/CheckSortBService.cs @@ -7,7 +7,7 @@ namespace BLL { public class CheckSortBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE检查情况信息 @@ -75,6 +75,7 @@ namespace BLL /// 月报告主键 public static void DeleteCheckSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_CheckSortB where x.MonthReportId == monthReportId select x).ToList(); db.Manager_CheckSortB.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/CostStatisticService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/CostStatisticService.cs index 4b595229..235b1cc8 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/CostStatisticService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/CostStatisticService.cs @@ -10,7 +10,7 @@ namespace BLL { public class CostStatisticService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 /// @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable cost = from x in db.TC_CostStatistic orderby x.CostStatisticCode descending select x; + private static IQueryable cost = from x in Funs.DB.TC_CostStatistic orderby x.CostStatisticCode descending select x; /// /// 获取分页列表 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/IncentiveSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/IncentiveSortBService.cs index f6515f94..2888c688 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/IncentiveSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/IncentiveSortBService.cs @@ -7,7 +7,7 @@ namespace BLL { public class IncentiveSortBService { - public static Model.CNPCDB db = Funs.DB; + public static Model.Manager_IncentiveSortB GetIncentiveSortByMonthReportIdAndIncentiveType(string monthReportId, string incentiveType) { @@ -77,6 +77,7 @@ namespace BLL /// 月报告主键 public static void DeleteIncentiveSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_IncentiveSortB where x.MonthReportId == monthReportId select x).ToList(); db.Manager_IncentiveSortB.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/ManhoursSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/ManhoursSortBService.cs index acd5db17..cff731e6 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/ManhoursSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/ManhoursSortBService.cs @@ -8,7 +8,7 @@ namespace BLL { public class ManhoursSortBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -16,6 +16,7 @@ namespace BLL /// public static IEnumerable getListData(string monthReportId) { + Model.CNPCDB db = Funs.DB; return from x in db.Manager_ManhoursSortB where x.MonthReportId == monthReportId orderby x.UnitId diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/MeetingSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/MeetingSortBService.cs index a434fefd..64e50e8e 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/MeetingSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/MeetingSortBService.cs @@ -7,7 +7,7 @@ namespace BLL { public class MeetingSortBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE会议情况信息 @@ -78,6 +78,7 @@ namespace BLL /// 月报告主键 public static void DeleteMeetingSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_MeetingSortB where x.MonthReportId == monthReportId select x).ToList(); db.Manager_MeetingSortB.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthB/TrainSortBService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthB/TrainSortBService.cs index 3b096ca9..dc2025a9 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthB/TrainSortBService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthB/TrainSortBService.cs @@ -7,7 +7,7 @@ namespace BLL { public class TrainSortBService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE培训情况信息 @@ -75,6 +75,7 @@ namespace BLL /// 月报告主键 public static void DeleteTrainSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_TrainSortB where x.MonthReportId == monthReportId select x).ToList(); db.Manager_TrainSortB.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/AccidentSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/AccidentSortCService.cs index 8e8d3e58..1c20073b 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/AccidentSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/AccidentSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class AccidentSortCService { - public static Model.CNPCDB db = Funs.DB; + public static Model.Manager_AccidentSortC GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType) { @@ -89,6 +89,7 @@ namespace BLL /// 月报告主键 public static void DeleteAccidentSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_AccidentSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_AccidentSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/ActivityDesCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/ActivityDesCService.cs index c342bd9d..b10746e1 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/ActivityDesCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/ActivityDesCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class ActivityDesCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报Id获取相关所有活动情况说明信息 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckDetailSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckDetailSortCService.cs index c5cc041d..3ee5fa47 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckDetailSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckDetailSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class CheckDetailSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE检查明细情况信息 @@ -53,6 +53,7 @@ namespace BLL /// 月报告主键 public static void DeleteCheckDetailSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_CheckDetailSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_CheckDetailSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs index 7b9e3e4b..baa8e297 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class CheckSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE检查情况信息 @@ -77,6 +77,7 @@ namespace BLL /// 月报告主键 public static void DeleteCheckSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_CheckSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_CheckSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/DrillSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/DrillSortCService.cs index 306dfa7d..9151b7a7 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/DrillSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/DrillSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class DrillSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告应急演练信息 @@ -48,6 +48,7 @@ namespace BLL /// 月报告主键 public static void DeleteDrillSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_DrillSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_DrillSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/EmergencySortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/EmergencySortCService.cs index ff4b409f..22994f79 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/EmergencySortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/EmergencySortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class EmergencySortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告应急预案信息 @@ -48,6 +48,7 @@ namespace BLL /// 月报告主键 public static void DeleteEmergencySortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_EmergencySortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_EmergencySortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/HazardSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/HazardSortCService.cs index 4736cd15..ac3577c3 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/HazardSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/HazardSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class HazardSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告危险源信息 @@ -48,6 +48,7 @@ namespace BLL /// 月报告主键 public static void DeleteHazardSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_HazardSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_HazardSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/HseCostCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/HseCostCService.cs index b2da72e6..fab5385e 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/HseCostCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/HseCostCService.cs @@ -8,7 +8,7 @@ namespace BLL { public class HseCostCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -16,6 +16,7 @@ namespace BLL /// public static IEnumerable getListData(string monthReportId) { + Model.CNPCDB db = Funs.DB; return from x in db.Manager_HseCostC where x.MonthReportId == monthReportId orderby x.UnitId @@ -77,6 +78,7 @@ namespace BLL /// 月报告主键 public static void DeleteHseCostsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_HseCostC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_HseCostC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/IncentiveSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/IncentiveSortCService.cs index 239ffb2d..098561f7 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/IncentiveSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/IncentiveSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class IncentiveSortCService { - public static Model.CNPCDB db = Funs.DB; + public static List GetIncentiveSortsByMonthReportIdAndBigType(string monthReportId, string bigType) { @@ -67,6 +67,7 @@ namespace BLL /// 月报告主键 public static void DeleteIncentiveSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_IncentiveSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_IncentiveSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/MeetingSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/MeetingSortCService.cs index de3f72f1..773225e6 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/MeetingSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/MeetingSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class MeetingSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE会议情况信息 @@ -55,6 +55,7 @@ namespace BLL /// 月报告主键 public static void DeleteMeetingSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_MeetingSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_MeetingSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherActiveSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherActiveSortCService.cs index ff81e22b..58ab2242 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherActiveSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherActiveSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class OtherActiveSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告其他HSE管理活动信息 @@ -47,6 +47,7 @@ namespace BLL /// 月报告主键 public static void DeleteOtherActiveSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_OtherActiveSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_OtherActiveSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherManagementCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherManagementCService.cs index b17b0d0f..517cb81c 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherManagementCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/OtherManagementCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class OtherManagementCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报Id获取HSE现场其他管理情况信息 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs index 52b784f7..7b7e48de 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class PersonSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE人力投入信息 @@ -54,6 +54,7 @@ namespace BLL /// 月报告主键 public static void DeletePersonSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_PersonSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_PersonSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PlanCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PlanCService.cs index bf882a43..ac4ba7b6 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PlanCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PlanCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class PlanCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报Id获取本月文件、方案修编情况说明 diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PromotionalActiviteSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PromotionalActiviteSortCService.cs index 51591bca..26424dea 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PromotionalActiviteSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PromotionalActiviteSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class PromotionalActiviteSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE宣传活动信息 @@ -48,6 +48,7 @@ namespace BLL /// 月报告主键 public static void DeletePromotionalActiviteSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_PromotionalActiviteSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_PromotionalActiviteSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainActivitySortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainActivitySortCService.cs index 954398bb..bd5182d5 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainActivitySortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainActivitySortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class TrainActivitySortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE培训活动信息 @@ -47,6 +47,7 @@ namespace BLL /// 月报告主键 public static void DeleteTrainActivitySortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_TrainActivitySortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_TrainActivitySortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainSortCService.cs index 59fa6508..053e0700 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/TrainSortCService.cs @@ -7,7 +7,7 @@ namespace BLL { public class TrainSortCService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据月报告主键获取所有月报告HSE培训情况信息 @@ -49,6 +49,7 @@ namespace BLL /// 月报告主键 public static void DeleteTrainSortsByMonthReportId(string monthReportId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Manager_TrainSortC where x.MonthReportId == monthReportId select x).ToList(); db.Manager_TrainSortC.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Material/MaterialService.cs b/SGGL/BLL/HSSE/Material/MaterialService.cs index f768005f..56a73545 100644 --- a/SGGL/BLL/HSSE/Material/MaterialService.cs +++ b/SGGL/BLL/HSSE/Material/MaterialService.cs @@ -9,7 +9,7 @@ namespace BLL.HSSE public static class MaterialService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般机具设备资质 diff --git a/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs b/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs index f07af3d9..9a0de117 100644 --- a/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class AttendMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取其他会议记录 diff --git a/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs b/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs index eadb7e9a..0f8ff036 100644 --- a/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ClassMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取班前会 diff --git a/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs b/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs index f7287c3c..d1e9e849 100644 --- a/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class MonthMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全月例会 diff --git a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs index c802a13d..cd208f63 100644 --- a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class SafetyLeaderGroupMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全领导小组会议 diff --git a/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs index 449d74d4..3e56aaf1 100644 --- a/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class SpecialMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取专题例会 diff --git a/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs b/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs index 1fe953e9..253a117f 100644 --- a/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class WeekMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取周例会 diff --git a/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs b/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs index 8dea4dee..ed475cd2 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class HazardDetectionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取危害检测 diff --git a/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs b/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs index a44d84d7..be472263 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class OccupationalDiseaseAccidentService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取职业病事故 diff --git a/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs b/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs index 25e98e19..81b39936 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PhysicalExaminationService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取体检管理 diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs index d06ccece..5d996ed9 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentPersonQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备作业人员资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs index b581dc3c..2deacdd4 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentQualityAuditDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特种设备资质审查明细 diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs index 41240c9d..8aa065da 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class EquipmentQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特殊机具设备资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs index 4338ff96..9ef04cf4 100644 --- a/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class GeneralEquipmentQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般机具设备资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs index efaad2fc..d9ee91fc 100644 --- a/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PersonQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取特殊岗位人员资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs index 36ed6be4..8bcd9acb 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SafePersonQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全人员资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs index 6ffcec01..16c311e8 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SubUnitQualityAuditDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取分包商资质审查明细 diff --git a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs index a133cc6d..07d3810f 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SubUnitQualityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取分包商资质 diff --git a/SGGL/BLL/HSSE/Resources/SignManageService.cs b/SGGL/BLL/HSSE/Resources/SignManageService.cs index dc4e616d..8a527d25 100644 --- a/SGGL/BLL/HSSE/Resources/SignManageService.cs +++ b/SGGL/BLL/HSSE/Resources/SignManageService.cs @@ -7,7 +7,7 @@ public static class SignManageService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取标牌信息 diff --git a/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs b/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs index 375cfed8..26be49f8 100644 --- a/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs +++ b/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SafetyOrganizationService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全管理机构信息 diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index 5c492905..99eee875 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class PersonInOutService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -27,7 +27,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SitePerson_PersonInOut + private static IQueryable getDataLists = from x in Funs.DB.SitePerson_PersonInOut select x; /// diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 38706e1b..e6ce67ca 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -12,7 +12,7 @@ namespace BLL /// public static class PersonService { - public static Model.CNPCDB db = Funs.DB; + #region 劳务人员列表 /// @@ -27,7 +27,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.View_SitePerson_Person + private static IQueryable getDataLists = from x in Funs.DB.View_SitePerson_Person select x; /// @@ -43,6 +43,7 @@ namespace BLL /// public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, Grid Grid1) { + Model.CNPCDB db = Funs.DB; IQueryable getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId); if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { @@ -785,7 +786,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getInPersonLists = from x in db.SitePerson_Person + private static IQueryable getInPersonLists = from x in Funs.DB.SitePerson_Person where x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now) select x; @@ -797,6 +798,7 @@ namespace BLL /// public static IEnumerable getInPsersonListData(string projectId, string unitId, string personName, string identityCard, Grid Grid1) { + Model.CNPCDB db = Funs.DB; IQueryable getInPersonList = getInPersonLists.Where(x => x.ProjectId == projectId); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) { diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs index bfdb03c4..e14e5faa 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs @@ -8,7 +8,7 @@ namespace BLL { public class SitePerson_CheckingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据人员考勤主键获取人员考勤管理信息 diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs index 7c81fcbd..e09f5faf 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs @@ -8,7 +8,7 @@ namespace BLL { public class SitePerson_DayReportUnitDetailService { - public static Model.CNPCDB db = Funs.DB; + /// diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs index fd863e2f..95741e2e 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs @@ -8,7 +8,7 @@ namespace BLL { public class SitePerson_MonthReportUnitDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 增加工作日报明细信息 diff --git a/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs b/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs index 033c5ec0..9c16997b 100644 --- a/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs +++ b/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ConstructSolutionService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取施工方案/审查 diff --git a/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs b/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs index f05bb8f4..3fe10e7c 100644 --- a/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs +++ b/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ExpertArgumentService { - public static Model.CNPCDB db = Funs.DB; + #region 专家论证清单 /// diff --git a/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs b/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs index b5250a6c..28ef5a03 100644 --- a/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs +++ b/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class SolutionTemplateService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取方案模板 diff --git a/SGGL/BLL/HSSE/Technique/EmergencyService.cs b/SGGL/BLL/HSSE/Technique/EmergencyService.cs index 08280e81..cc22745a 100644 --- a/SGGL/BLL/HSSE/Technique/EmergencyService.cs +++ b/SGGL/BLL/HSSE/Technique/EmergencyService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class EmergencyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急预案 diff --git a/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs b/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs index 49cd6090..2d09a648 100644 --- a/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs +++ b/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs @@ -4,7 +4,7 @@ namespace BLL { public static class EnvironmentalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取环境危险源信息 diff --git a/SGGL/BLL/HSSE/Technique/HazardListService.cs b/SGGL/BLL/HSSE/Technique/HazardListService.cs index ada76612..c832dc90 100644 --- a/SGGL/BLL/HSSE/Technique/HazardListService.cs +++ b/SGGL/BLL/HSSE/Technique/HazardListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class HazardListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取危险源清单 diff --git a/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs b/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs index 5b61edc5..4cc8fe50 100644 --- a/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs +++ b/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class HazardListTypeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取危险源类型 diff --git a/SGGL/BLL/HSSE/Technique/RectifyItemService.cs b/SGGL/BLL/HSSE/Technique/RectifyItemService.cs index 6d6c3f1f..7953c7c7 100644 --- a/SGGL/BLL/HSSE/Technique/RectifyItemService.cs +++ b/SGGL/BLL/HSSE/Technique/RectifyItemService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class RectifyItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全隐患明细 diff --git a/SGGL/BLL/HSSE/Technique/RectifyService.cs b/SGGL/BLL/HSSE/Technique/RectifyService.cs index 43df2c1f..81bc5102 100644 --- a/SGGL/BLL/HSSE/Technique/RectifyService.cs +++ b/SGGL/BLL/HSSE/Technique/RectifyService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class RectifyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取安全隐患 diff --git a/SGGL/BLL/HSSE/Technique/RiskEvaluationRecordService.cs b/SGGL/BLL/HSSE/Technique/RiskEvaluationRecordService.cs index 62419222..d8d07831 100644 --- a/SGGL/BLL/HSSE/Technique/RiskEvaluationRecordService.cs +++ b/SGGL/BLL/HSSE/Technique/RiskEvaluationRecordService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class RiskEvaluationRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取风险评价记录 diff --git a/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs b/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs index 82f65a7c..ab709111 100644 --- a/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs +++ b/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs @@ -8,7 +8,7 @@ namespace BLL public static class SpecialSchemeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取专项方案 diff --git a/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs b/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs index c98b1ac8..d759218e 100644 --- a/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs +++ b/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class Technique_CheckItemDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取检查项明细 diff --git a/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs b/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs index 48ee83c6..296fbe4b 100644 --- a/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs +++ b/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class Technique_CheckItemSetService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取检查项 diff --git a/SGGL/BLL/InformationProject/ConstructionLogNewService.cs b/SGGL/BLL/InformationProject/ConstructionLogNewService.cs index f195e10d..c829672a 100644 --- a/SGGL/BLL/InformationProject/ConstructionLogNewService.cs +++ b/SGGL/BLL/InformationProject/ConstructionLogNewService.cs @@ -10,7 +10,7 @@ namespace BLL { public class ConstructionLogNewService { - public static Model.CNPCDB db = Funs.DB; + #region 获取人员列表信息 /// @@ -25,7 +25,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.InformationProject_ConstructionLog + private static IQueryable getDataLists = from x in Funs.DB.InformationProject_ConstructionLog select x; /// diff --git a/SGGL/BLL/InformationProject/PersonStarLevelService.cs b/SGGL/BLL/InformationProject/PersonStarLevelService.cs index 2751033e..f9cfacb7 100644 --- a/SGGL/BLL/InformationProject/PersonStarLevelService.cs +++ b/SGGL/BLL/InformationProject/PersonStarLevelService.cs @@ -8,7 +8,7 @@ namespace BLL { public class PersonStarLevelService { - public static Model.CNPCDB db = Funs.DB; + /// /// 设置人员星级 diff --git a/SGGL/BLL/InformationProject/ProjectConstructionLogService.cs b/SGGL/BLL/InformationProject/ProjectConstructionLogService.cs index 6c4eb3fe..8e2ce716 100644 --- a/SGGL/BLL/InformationProject/ProjectConstructionLogService.cs +++ b/SGGL/BLL/InformationProject/ProjectConstructionLogService.cs @@ -9,7 +9,7 @@ namespace BLL { public class ProjectConstructionLogService { - public static Model.CNPCDB db = Funs.DB; + #region 获取人员列表信息 /// @@ -24,7 +24,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.InformationProject_ConstructionLog + private static IQueryable getDataLists = from x in Funs.DB.InformationProject_ConstructionLog select x; /// diff --git a/SGGL/BLL/InformationProject/ProjectPersonStarService.cs b/SGGL/BLL/InformationProject/ProjectPersonStarService.cs index bcd963bc..0f81f3eb 100644 --- a/SGGL/BLL/InformationProject/ProjectPersonStarService.cs +++ b/SGGL/BLL/InformationProject/ProjectPersonStarService.cs @@ -9,7 +9,7 @@ namespace BLL { public class ProjectPersonStarService { - public static Model.CNPCDB db = Funs.DB; + #region 劳务人员列表 /// @@ -40,6 +40,7 @@ namespace BLL /// public static IEnumerable getListData(string projetcId, string unitId, string name, string idCard, string states, Grid Grid1) { + Model.CNPCDB db = Funs.DB; IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { diff --git a/SGGL/BLL/InformationProject/StarLevelService.cs b/SGGL/BLL/InformationProject/StarLevelService.cs index ddb8e2db..0d88519e 100644 --- a/SGGL/BLL/InformationProject/StarLevelService.cs +++ b/SGGL/BLL/InformationProject/StarLevelService.cs @@ -5,7 +5,7 @@ namespace BLL { public class StarLevelService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取五星级别 diff --git a/SGGL/BLL/Notice/NoticeService.cs b/SGGL/BLL/Notice/NoticeService.cs index 15ac28e0..4b7a4906 100644 --- a/SGGL/BLL/Notice/NoticeService.cs +++ b/SGGL/BLL/Notice/NoticeService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class NoticeService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取通知 diff --git a/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs b/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs index 39141b22..9f6e248c 100644 --- a/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs +++ b/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectEvaluationService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目绩效评价 diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs index fe7129ed..6fdc356a 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class GJSXItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据关键事项ID查询所有关键事项进展 @@ -30,6 +30,7 @@ namespace BLL /// public static System.Collections.IEnumerable GetIEnumerableByGJSXID(string GJSXID) { + Model.CNPCDB db = Funs.DB; return from x in db.GJSX_detail where x.GJSXID == GJSXID orderby x.Sort @@ -152,6 +153,7 @@ namespace BLL /// public static bool IsExistOperateionId(string GJSXID, string operationId) { + Model.CNPCDB db = Funs.DB; var q = from x in db.GJSX_detail where x.GJSXID == GJSXID && x.Progress_user == operationId select x; if (q.Count() > 0) { diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXProcessService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXProcessService.cs index 0526ad6d..3497289d 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXProcessService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXProcessService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class GJSXProcessService { - public static Model.CNPCDB db = Funs.DB; + /// /// 添加 diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXService.cs index 7fac7d55..d5ffbd62 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class GJSXService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取信息 @@ -97,6 +97,7 @@ namespace BLL public static System.Collections.IEnumerable GetListData(string projectId) { + Model.CNPCDB db = Funs.DB; IQueryable q =GetGJSXList().AsQueryable(); diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs index 08b2e2f7..4d5b61a4 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class ConstructionLogService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs index c3607d26..a194df2e 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class ConstructionPlanApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -17,6 +17,7 @@ namespace BLL /// public static IEnumerable getListData(string ConstructionPlanId) { + Model.CNPCDB db = Funs.DB; return from x in db.ZHGL_ConstructionPlanApprove where x.ConstructionPlanId == ConstructionPlanId && x.ApproveDate != null orderby x.ApproveDate @@ -98,6 +99,7 @@ namespace BLL /// 一个总承包商施工计划审批实体 public static Model.ZHGL_ConstructionPlanApprove GetConstructionPlanApproveByConstructionPlanId(string constructionPlanId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == constructionPlanId && x.ApproveDate == null); } /// @@ -120,6 +122,7 @@ namespace BLL public static Model.ZHGL_ConstructionPlanApprove GetComplie(string ConstructionPlanId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == ConstructionPlanId && x.ApproveType == BLL.Const.ConstructionPlan_Compile); } public static Model.ZHGL_ConstructionPlanApprove GetConstructionPlanApproveById(string ConstructionPlanApproveId) diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs index 2ab76212..7d6a2b6d 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class ConstructionPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取总承包商施工计划 diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs index 180cc5ed..1362e7b7 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class ConstructionReportApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -17,6 +17,7 @@ namespace BLL /// public static IEnumerable getListData(string ConstructionReportId) { + Model.CNPCDB db = Funs.DB; return from x in db.ZHGL_ConstructionReportApprove where x.ConstructionReportId == ConstructionReportId && x.ApproveDate != null orderby x.ApproveDate @@ -98,6 +99,7 @@ namespace BLL /// 一个总承包商施工报告审批实体 public static Model.ZHGL_ConstructionReportApprove GetConstructionReportApproveByConstructionReportId(string constructionReportId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == constructionReportId && x.ApproveDate == null); } /// @@ -120,6 +122,7 @@ namespace BLL public static Model.ZHGL_ConstructionReportApprove GetComplie(string ConstructionReportId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == ConstructionReportId && x.ApproveType == BLL.Const.ConstructionReport_Compile); } public static Model.ZHGL_ConstructionReportApprove GetConstructionReportApproveById(string ConstructionReportApproveId) diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs index d8459f72..c9102d20 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class ConstructionReportService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取总承包商施工报告 diff --git a/SGGL/BLL/PZHGL/InformationProject/PictureService.cs b/SGGL/BLL/PZHGL/InformationProject/PictureService.cs index aec19b11..aa05aeaf 100644 --- a/SGGL/BLL/PZHGL/InformationProject/PictureService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/PictureService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class PictureService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目图片 diff --git a/SGGL/BLL/PZHGL/InformationProject/ReceiveFileManagerService.cs b/SGGL/BLL/PZHGL/InformationProject/ReceiveFileManagerService.cs index 51367a6b..a3f246f4 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ReceiveFileManagerService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ReceiveFileManagerService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ReceiveFileManagerService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取一般来文 @@ -45,9 +45,9 @@ namespace BLL AttachUrl = ReceiveFileManager.AttachUrl, States = ReceiveFileManager.States, UnitIds = ReceiveFileManager.UnitIds, - FileType=ReceiveFileManager.FileType, - FromId=ReceiveFileManager.FromId, - FromType=ReceiveFileManager.FromType, + FileType = ReceiveFileManager.FileType, + FromId = ReceiveFileManager.FromId, + FromType = ReceiveFileManager.FromType, }; db.InformationProject_ReceiveFileManager.InsertOnSubmit(newReceiveFileManager); db.SubmitChanges(); @@ -65,7 +65,7 @@ namespace BLL Model.InformationProject_ReceiveFileManager newReceiveFileManager = db.InformationProject_ReceiveFileManager.FirstOrDefault(e => e.ReceiveFileManagerId == ReceiveFileManager.ReceiveFileManagerId); if (newReceiveFileManager != null) { - // newReceiveFileManager.ReceiveFileCode = ReceiveFileManager.ReceiveFileCode; + // newReceiveFileManager.ReceiveFileCode = ReceiveFileManager.ReceiveFileCode; newReceiveFileManager.ReceiveFileName = ReceiveFileManager.ReceiveFileName; newReceiveFileManager.Version = ReceiveFileManager.Version; newReceiveFileManager.FileUnitId = ReceiveFileManager.FileUnitId; @@ -109,7 +109,7 @@ namespace BLL public static void CreateReceiveFile(Model.InformationProject_Notice notice) { var getProjects = Funs.GetStrListByStr(notice.AccessProjectId, ','); - string unitId =Const.UnitId_XJYJ; + string unitId = Const.UnitId_XJYJ; var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == notice.NoticeId); foreach (var item in getProjects) { @@ -126,8 +126,8 @@ namespace BLL GetFileDate = DateTime.Now, SendPersonId = notice.CompileMan, MainContent = notice.MainContent, - FromId=notice.NoticeId, - FromType ="1", + FromId = notice.NoticeId, + FromType = "1", }; if (!string.IsNullOrEmpty(notice.ProjectId)) { @@ -150,7 +150,7 @@ namespace BLL newFile.FileType = "1"; newFile.UnitIds = unitId; } - + newFile.States = Const.State_2; ReceiveFileManagerService.AddReceiveFileManager(newFile); if (getAtt != null && !string.IsNullOrEmpty(getAtt.AttachUrl)) @@ -166,6 +166,7 @@ namespace BLL /// public static void IssueReceiveFile(string receiveFileManagerId) { + Model.CNPCDB db = Funs.DB; var getFile = Funs.DB.InformationProject_ReceiveFileManager.FirstOrDefault(x => x.ReceiveFileManagerId == receiveFileManagerId); if (getFile != null && getFile.FileType == "1") { @@ -185,7 +186,7 @@ namespace BLL Model.InformationProject_ReceiveFileManager newReceiveFileManager = new Model.InformationProject_ReceiveFileManager { ReceiveFileManagerId = SQLHelper.GetNewID(), - ProjectId = getFile.ProjectId, + ProjectId = getFile.ProjectId, ReceiveFileName = getFile.ReceiveFileName, Version = getFile.Version, FileUnitId = getFile.FileUnitId, diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs index 8f46966c..22769f3c 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class WorkHandoverApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分页列表 @@ -17,6 +17,7 @@ namespace BLL /// public static IEnumerable getListData(string WorkHandoverId) { + Model.CNPCDB db = Funs.DB; return from x in db.ZHGL_WorkHandoverApprove where x.WorkHandoverId == WorkHandoverId && x.ApproveDate != null orderby x.ApproveDate @@ -98,6 +99,7 @@ namespace BLL /// 一个工作交接审批实体 public static Model.ZHGL_WorkHandoverApprove GetWorkHandoverApproveByWorkHandoverId(string constructionPlanId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == constructionPlanId && x.ApproveDate == null); } /// @@ -120,6 +122,7 @@ namespace BLL public static Model.ZHGL_WorkHandoverApprove GetComplie(string WorkHandoverId) { + Model.CNPCDB db = Funs.DB; return db.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == WorkHandoverId && x.ApproveType == BLL.Const.WorkHandover_Compile); } public static Model.ZHGL_WorkHandoverApprove GetWorkHandoverApproveById(string WorkHandoverApproveId) diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs index b0677210..927a409c 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs @@ -9,7 +9,7 @@ namespace BLL { public class WorkHandoverDetailService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取工作交接明细列表 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string WorkHandoverId) { + Model.CNPCDB db = Funs.DB; return from x in db.ZHGL_WorkHandoverDetail where x.WorkHandoverId == WorkHandoverId select new diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs index a6e6e496..4adfbe5e 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class WorkHandoverService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取工作交接 diff --git a/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs b/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs index 841ecdd9..c39d381a 100644 --- a/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs +++ b/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectMapService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目地图 diff --git a/SGGL/BLL/Person/PersonTotalService.cs b/SGGL/BLL/Person/PersonTotalService.cs index 1eaddb47..d605b267 100644 --- a/SGGL/BLL/Person/PersonTotalService.cs +++ b/SGGL/BLL/Person/PersonTotalService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class PersonTotalService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_DutyService.cs b/SGGL/BLL/Person/Person_DutyService.cs index 8b6c594c..9d59c43b 100644 --- a/SGGL/BLL/Person/Person_DutyService.cs +++ b/SGGL/BLL/Person/Person_DutyService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Person_DutyService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 /// diff --git a/SGGL/BLL/Person/Person_DutyTemplateService.cs b/SGGL/BLL/Person/Person_DutyTemplateService.cs index 21e82c74..66aa352a 100644 --- a/SGGL/BLL/Person/Person_DutyTemplateService.cs +++ b/SGGL/BLL/Person/Person_DutyTemplateService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Person_DutyTemplateService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取员工责任书模板信息 /// diff --git a/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs b/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs index cfce5b5b..1ed78532 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Person_QuarterCheckApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_QuarterCheckItemService.cs b/SGGL/BLL/Person/Person_QuarterCheckItemService.cs index fedf0ded..0e2de01c 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckItemService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckItemService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Person_QuarterCheckItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_QuarterCheckService.cs b/SGGL/BLL/Person/Person_QuarterCheckService.cs index 60a21fdc..ae3667f3 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class Person_QuarterCheckService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_ShuntApproveService.cs b/SGGL/BLL/Person/Person_ShuntApproveService.cs index 0a5adf34..2b2ba670 100644 --- a/SGGL/BLL/Person/Person_ShuntApproveService.cs +++ b/SGGL/BLL/Person/Person_ShuntApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class Person_ShuntApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分流管理模板列表 @@ -19,6 +19,7 @@ namespace BLL /// public static IEnumerable getListData(string ShuntId) { + Model.CNPCDB db = Funs.DB; return from x in db.Person_ShuntApprove where x.ShuntId == ShuntId && x.ApproveDate != null orderby x.ApproveDate @@ -41,6 +42,7 @@ namespace BLL /// 一个分流管理审批实体 public static Model.Person_ShuntApprove GetShuntApproveByShuntApproveId(string ShuntApproveId) { + Model.CNPCDB db = Funs.DB; return db.Person_ShuntApprove.FirstOrDefault(x => x.ShuntApproveId == ShuntApproveId); } @@ -51,6 +53,7 @@ namespace BLL /// 一个分流管理审批实体 public static Model.Person_ShuntApprove GetShuntApproveByShuntId(string ShuntId) { + Model.CNPCDB db = Funs.DB; return db.Person_ShuntApprove.FirstOrDefault(x => x.ShuntId == ShuntId && x.ApproveDate == null); } @@ -61,16 +64,19 @@ namespace BLL /// 一个分流管理审批实体 public static Model.Person_ShuntApprove GetShuntApproveByApproveId(string approveId) { + Model.CNPCDB db = Funs.DB; return db.Person_ShuntApprove.FirstOrDefault(x => x.ShuntApproveId == approveId); } public static Model.Person_ShuntApprove GetComplie(string ShuntId) { + Model.CNPCDB db = Funs.DB; return db.Person_ShuntApprove.FirstOrDefault(x => x.ShuntId == ShuntId && x.ApproveType == BLL.Const.Shunt_Compile); } public static Model.Person_ShuntApprove GetAudit(string ShuntId) { + Model.CNPCDB db = Funs.DB; return db.Person_ShuntApprove.FirstOrDefault(x => x.ShuntId == ShuntId && x.ApproveType == BLL.Const.Shunt_Audit); } @@ -81,6 +87,7 @@ namespace BLL /// 分流管理审批集合 public static List GetShuntApprovesByShuntApproveId(string ShuntApproveId) { + Model.CNPCDB db = Funs.DB; return (from x in db.Person_ShuntApprove where x.ShuntApproveId == ShuntApproveId select x).ToList(); } diff --git a/SGGL/BLL/Person/Person_TrainingPlanService.cs b/SGGL/BLL/Person/Person_TrainingPlanService.cs index 2d5896c4..9e18ad8a 100644 --- a/SGGL/BLL/Person/Person_TrainingPlanService.cs +++ b/SGGL/BLL/Person/Person_TrainingPlanService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class Person_TrainingPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取人员信息 /// diff --git a/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs b/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs index f595d365..7473d083 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class ServerTestPlanService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取知识竞赛计划 diff --git a/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs b/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs index f25f7723..071196dc 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ServerTestPlanTrainingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取知识竞赛计划 diff --git a/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs b/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs index af586cda..2e7fdd3c 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ServerTestRecordService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取考试记录 diff --git a/SGGL/BLL/ProjectData/MainItemService.cs b/SGGL/BLL/ProjectData/MainItemService.cs index 65d1423f..9c07d57e 100644 --- a/SGGL/BLL/ProjectData/MainItemService.cs +++ b/SGGL/BLL/ProjectData/MainItemService.cs @@ -10,7 +10,7 @@ namespace BLL { public class MainItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 记录数 @@ -24,7 +24,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in db.ProjectData_MainItem select x; + private static IQueryable qq = from x in Funs.DB.ProjectData_MainItem select x; /// diff --git a/SGGL/BLL/ProjectData/ProjectSateService.cs b/SGGL/BLL/ProjectData/ProjectSateService.cs index 30a1d93d..7b5238fe 100644 --- a/SGGL/BLL/ProjectData/ProjectSateService.cs +++ b/SGGL/BLL/ProjectData/ProjectSateService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class ProjectSateService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取项目状态及软件关闭信息 diff --git a/SGGL/BLL/ProjectData/ProjectSetMapService.cs b/SGGL/BLL/ProjectData/ProjectSetMapService.cs index 0f94c8d2..09ce995a 100644 --- a/SGGL/BLL/ProjectData/ProjectSetMapService.cs +++ b/SGGL/BLL/ProjectData/ProjectSetMapService.cs @@ -6,7 +6,7 @@ public static class ProjectSetMapService { - public static Model.CNPCDB db = Funs.DB; + /// ///获取项目坐标点 diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs index 366519ee..3f9858ed 100644 --- a/SGGL/BLL/ProjectData/ProjectUnitService.cs +++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs @@ -6,7 +6,7 @@ public static class ProjectUnitService { - public static Model.CNPCDB db = Funs.DB; + /// ///获取项目单位信息 @@ -177,6 +177,7 @@ /// public static void DeleteProjectUnitByProjectId(string projectId) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Project_ProjectUnit where x.ProjectId == projectId select x).ToList(); if (q != null) { diff --git a/SGGL/BLL/ProjectData/TeamGroupService.cs b/SGGL/BLL/ProjectData/TeamGroupService.cs index 26545cd9..4dcc0314 100644 --- a/SGGL/BLL/ProjectData/TeamGroupService.cs +++ b/SGGL/BLL/ProjectData/TeamGroupService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class TeamGroupService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取班组信息 diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs index 1f99d899..46c3ccc5 100644 --- a/SGGL/BLL/ProjectData/UnitWorkService.cs +++ b/SGGL/BLL/ProjectData/UnitWorkService.cs @@ -10,7 +10,7 @@ namespace BLL { public class UnitWorkService { - public static Model.CNPCDB db = Funs.DB; + public static Model.WBS_UnitWork GetUnitWorkByUnitWorkName(string projectId, string unitWorkName) { return Funs.DB.WBS_UnitWork.FirstOrDefault(e => e.ProjectId == projectId && e.UnitWorkName == unitWorkName); diff --git a/SGGL/BLL/ProjectData/WorkAreaService.cs b/SGGL/BLL/ProjectData/WorkAreaService.cs index 98b86646..068dcbd5 100644 --- a/SGGL/BLL/ProjectData/WorkAreaService.cs +++ b/SGGL/BLL/ProjectData/WorkAreaService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class WorkAreaService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取班组信息 diff --git a/SGGL/BLL/SYHSE/SYHSEData_BaseService.cs b/SGGL/BLL/SYHSE/SYHSEData_BaseService.cs index 98df3c68..7a391b88 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_BaseService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_BaseService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_BaseService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_Base select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_Base select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_EnvironmentProtectionService.cs b/SGGL/BLL/SYHSE/SYHSEData_EnvironmentProtectionService.cs index 56767f0b..1d5e8739 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_EnvironmentProtectionService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_EnvironmentProtectionService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_EnvironmentProtectionService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_EnvironmentProtection select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_EnvironmentProtection select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_HiddenDangersService.cs b/SGGL/BLL/SYHSE/SYHSEData_HiddenDangersService.cs index 56cd9680..6677246b 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_HiddenDangersService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_HiddenDangersService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_HiddenDangersService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_HiddenDangers select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_HiddenDangers select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_LicenceService.cs b/SGGL/BLL/SYHSE/SYHSEData_LicenceService.cs index d464e417..9806a8d0 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_LicenceService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_LicenceService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_LicenceService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_Licence select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_Licence select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_MajorHazardService.cs b/SGGL/BLL/SYHSE/SYHSEData_MajorHazardService.cs index 7ed7cd2f..dc660b7f 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_MajorHazardService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_MajorHazardService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_MajorHazardService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_MajorHazard select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_MajorHazard select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_PromiseService.cs b/SGGL/BLL/SYHSE/SYHSEData_PromiseService.cs index 54a7b119..52731cfc 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_PromiseService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_PromiseService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_PromiseService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_Promise select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_Promise select x; /// /// 数据列表 diff --git a/SGGL/BLL/SYHSE/SYHSEData_RiskService.cs b/SGGL/BLL/SYHSE/SYHSEData_RiskService.cs index a9510016..8a886d05 100644 --- a/SGGL/BLL/SYHSE/SYHSEData_RiskService.cs +++ b/SGGL/BLL/SYHSE/SYHSEData_RiskService.cs @@ -13,7 +13,7 @@ namespace BLL /// public static class SYHSEData_RiskService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表信息 /// @@ -28,7 +28,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SYHSEData_Risk select x; + private static IQueryable getDataLists = from x in Funs.DB.SYHSEData_Risk select x; /// /// 数据列表 diff --git a/SGGL/BLL/SubPackManage/SubPackChangeRequestApproveService.cs b/SGGL/BLL/SubPackManage/SubPackChangeRequestApproveService.cs index 2d39086e..b491e406 100644 --- a/SGGL/BLL/SubPackManage/SubPackChangeRequestApproveService.cs +++ b/SGGL/BLL/SubPackManage/SubPackChangeRequestApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class SubPackChangeRequestApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分包队伍变更单审核列表 @@ -18,6 +18,7 @@ namespace BLL /// public static DataTable getListData(string subPackChangeRequestID) { + Model.CNPCDB db = Funs.DB; var res = from x in db.SubPack_ChangeRequestApprove where x.SubPackChangeRequestID == subPackChangeRequestID && x.ApproveDate != null orderby x.ApproveDate diff --git a/SGGL/BLL/SubPackManage/SubPackChangeRequestService.cs b/SGGL/BLL/SubPackManage/SubPackChangeRequestService.cs index c8a8547c..bb25106d 100644 --- a/SGGL/BLL/SubPackManage/SubPackChangeRequestService.cs +++ b/SGGL/BLL/SubPackManage/SubPackChangeRequestService.cs @@ -9,13 +9,14 @@ namespace BLL { public class SubPackChangeRequestService { - public static Model.CNPCDB db = Funs.DB; + /// /// 项目名称 下拉框绑定 /// public static void DropSelectProject(FineUIPro.DropDownList dropName, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var projectList = (from x in db.Base_Project select new { @@ -36,6 +37,7 @@ namespace BLL /// public static void DropSelectUnitWork(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var unitWorkList = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.UnitType == "2" && y.ProjectId == projectid diff --git a/SGGL/BLL/SubPackManage/SubPackTeamEvaluationApproveService.cs b/SGGL/BLL/SubPackManage/SubPackTeamEvaluationApproveService.cs index d6a24364..4bffc598 100644 --- a/SGGL/BLL/SubPackManage/SubPackTeamEvaluationApproveService.cs +++ b/SGGL/BLL/SubPackManage/SubPackTeamEvaluationApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class SubPackTeamEvaluationApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分包队伍单审核列表 @@ -18,6 +18,7 @@ namespace BLL /// public static DataTable getListData(string subPackTeamEvaluationID) { + Model.CNPCDB db = Funs.DB; var res = from x in db.SubPack_TeamEvaluationApprove where x.SubPackTeamEvaluationID == subPackTeamEvaluationID && x.ApproveDate != null orderby x.ApproveDate diff --git a/SGGL/BLL/SubPackManage/SubPackTeamEvaluationService.cs b/SGGL/BLL/SubPackManage/SubPackTeamEvaluationService.cs index 1e7604aa..8ead945f 100644 --- a/SGGL/BLL/SubPackManage/SubPackTeamEvaluationService.cs +++ b/SGGL/BLL/SubPackManage/SubPackTeamEvaluationService.cs @@ -8,13 +8,14 @@ namespace BLL { public class SubPackTeamEvaluationService { - public static Model.CNPCDB db = Funs.DB; + /// /// 项目名称 下拉框绑定 /// public static void DropSelectProject(FineUIPro.DropDownList dropName, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var projectList = (from x in db.Base_Project select new { @@ -35,6 +36,7 @@ namespace BLL /// public static void DropSelectUnitWork(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var unitWorkList = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.UnitType == "2" && y.ProjectId == projectid diff --git a/SGGL/BLL/SubPackManage/SubPackTeamListApproveService.cs b/SGGL/BLL/SubPackManage/SubPackTeamListApproveService.cs index fac3dc73..8e0a0f97 100644 --- a/SGGL/BLL/SubPackManage/SubPackTeamListApproveService.cs +++ b/SGGL/BLL/SubPackManage/SubPackTeamListApproveService.cs @@ -9,7 +9,7 @@ namespace BLL { public class SubPackTeamListApproveService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取分包队伍单审核列表 @@ -18,6 +18,7 @@ namespace BLL /// public static DataTable getListData(string SubPackTeamListID) { + Model.CNPCDB db = Funs.DB; var res = from x in db.SubPack_TeamListApprove where x.SubPackTeamListID == SubPackTeamListID && x.ApproveDate != null orderby x.ApproveDate diff --git a/SGGL/BLL/SubPackManage/SubPackTeamListService.cs b/SGGL/BLL/SubPackManage/SubPackTeamListService.cs index bc07506b..5a44668b 100644 --- a/SGGL/BLL/SubPackManage/SubPackTeamListService.cs +++ b/SGGL/BLL/SubPackManage/SubPackTeamListService.cs @@ -10,13 +10,14 @@ namespace BLL { public static class SubPackTeamListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 项目名称 下拉框绑定 /// public static void DropSelectProject(FineUIPro.DropDownList dropName, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var projectList = (from x in db.Base_Project select new { @@ -37,6 +38,7 @@ namespace BLL /// public static void DropSelectUnitWork(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) { + Model.CNPCDB db = Funs.DB; var unitWorkList = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.UnitType == "2" && y.ProjectId == projectid diff --git a/SGGL/BLL/SysManage/RoleItemService.cs b/SGGL/BLL/SysManage/RoleItemService.cs index 6b631402..8a6fd5d2 100644 --- a/SGGL/BLL/SysManage/RoleItemService.cs +++ b/SGGL/BLL/SysManage/RoleItemService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class RoleItemService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取角色明细信息 diff --git a/SGGL/BLL/SysManage/RoleService.cs b/SGGL/BLL/SysManage/RoleService.cs index f0417444..7a8316bc 100644 --- a/SGGL/BLL/SysManage/RoleService.cs +++ b/SGGL/BLL/SysManage/RoleService.cs @@ -7,7 +7,7 @@ public static class RoleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 获取角色信息 diff --git a/SGGL/BLL/SysManage/ScheduleService.cs b/SGGL/BLL/SysManage/ScheduleService.cs index 8dc0e786..8d2fd3bc 100644 --- a/SGGL/BLL/SysManage/ScheduleService.cs +++ b/SGGL/BLL/SysManage/ScheduleService.cs @@ -8,7 +8,7 @@ namespace BLL { public class ScheduleService { - public static Model.CNPCDB db = Funs.DB; + /// /// 添加 diff --git a/SGGL/BLL/SysManage/SysHttplogService.cs b/SGGL/BLL/SysManage/SysHttplogService.cs index 69328a18..a05faa32 100644 --- a/SGGL/BLL/SysManage/SysHttplogService.cs +++ b/SGGL/BLL/SysManage/SysHttplogService.cs @@ -11,9 +11,6 @@ namespace BLL public static class SysHttplogService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,6 +22,7 @@ namespace BLL } public static List GetSys_HttpLogByModle(Model.Sys_HttpLog table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Sys_HttpLog where (string.IsNullOrEmpty(table.HttpLogId) || x.HttpLogId.Contains(table.HttpLogId)) && @@ -74,13 +72,14 @@ namespace BLL public static Model.Sys_HttpLog GetSys_HttpLogById(string HttpLogId) { + Model.CNPCDB db = Funs.DB; return db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId); } public static void AddSys_HttpLog(Model.Sys_HttpLog newtable) { - + Model.CNPCDB db = Funs.DB; Model.Sys_HttpLog table = new Model.Sys_HttpLog { HttpLogId = newtable.HttpLogId, @@ -96,7 +95,7 @@ namespace BLL public static void AddBulkSys_HttpLog(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Sys_HttpLog.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -104,7 +103,7 @@ namespace BLL public static void UpdateSys_HttpLog(Model.Sys_HttpLog newtable) { - + Model.CNPCDB db = Funs.DB; Model.Sys_HttpLog table = db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == newtable.HttpLogId); if (table != null) { @@ -120,7 +119,7 @@ namespace BLL } public static void DeleteSys_HttpLogById(string HttpLogId) { - + Model.CNPCDB db = Funs.DB; Model.Sys_HttpLog table = db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId); if (table != null) { @@ -132,6 +131,7 @@ namespace BLL public static void DeleteALLSys_HttpLog() { + Model.CNPCDB db = Funs.DB; if (db.Sys_HttpLog != null) { db.Sys_HttpLog.DeleteAllOnSubmit(db.Sys_HttpLog); diff --git a/SGGL/BLL/SysManage/SysMenuService.cs b/SGGL/BLL/SysManage/SysMenuService.cs index 01a8d795..62e1d6fb 100644 --- a/SGGL/BLL/SysManage/SysMenuService.cs +++ b/SGGL/BLL/SysManage/SysMenuService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class SysMenuService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据MenuId获取菜单名称项 diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 1199ce4b..f640187e 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class UnitService { - //public static Model.CNPCDB db = Funs.DB; + // /// /// 获取单位信息 diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index 3e851cc8..51ed3a89 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -8,7 +8,7 @@ namespace BLL public static class UserService { - public static Model.CNPCDB db = Funs.DB; + /// /// ȡûϢ diff --git a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs index 8a07488e..ec9b980c 100644 --- a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs +++ b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs @@ -8,7 +8,7 @@ namespace BLL public static class InterFaceLogService { - public static Model.CNPCDB db = Funs.DB; + public const string Type1 = "上报"; public const string Type2 = "下发"; @@ -25,6 +25,7 @@ namespace BLL } public static IQueryable GetInterFaceLogByModle(Model.InterFaceLog table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.InterFaceLog where (string.IsNullOrEmpty(table.InterFaceLogId) || x.InterFaceLogId.Contains(table.InterFaceLogId)) && @@ -81,6 +82,7 @@ namespace BLL public static Model.InterFaceLog GetInterFaceLogById(string InterFaceLogId) { + Model.CNPCDB db = Funs.DB; return db.InterFaceLog.FirstOrDefault(x => x.InterFaceLogId == InterFaceLogId); } @@ -142,7 +144,7 @@ namespace BLL public static void UpdateInterFaceLog(Model.InterFaceLog newtable) { - + Model.CNPCDB db = Funs.DB; Model.InterFaceLog table = db.InterFaceLog.FirstOrDefault(x => x.InterFaceLogId == newtable.InterFaceLogId); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs b/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs index 44be5bf3..50bb5272 100644 --- a/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs @@ -11,9 +11,6 @@ namespace BLL public static class HJGLData_DefectService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,6 +22,7 @@ namespace BLL } public static List GetHJGLData_DefectByModle(Model.HJGLData_Defect table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.HJGLData_Defect where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -69,10 +67,12 @@ namespace BLL public static Model.HJGLData_Defect GetHJGLData_DefectById(string Id) { + Model.CNPCDB db = Funs.DB; return db.HJGLData_Defect.FirstOrDefault(x => x.Id == Id); } public static List GetHJGLData_DefectByDate(DateTime? reportDate) { + Model.CNPCDB db = Funs.DB; var q = from x in db.HJGLData_Defect where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 select x; @@ -81,7 +81,7 @@ namespace BLL public static void AddHJGLData_Defect(Model.HJGLData_Defect newtable) { - + Model.CNPCDB db = Funs.DB; Model.HJGLData_Defect table = new Model.HJGLData_Defect { Id = newtable.Id, @@ -99,7 +99,7 @@ namespace BLL public static void UpdateHJGLData_Defect(Model.HJGLData_Defect newtable) { - + Model.CNPCDB db = Funs.DB; Model.HJGLData_Defect table = db.HJGLData_Defect.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -116,7 +116,7 @@ namespace BLL } public static void DeleteHJGLData_DefectById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.HJGLData_Defect table = db.HJGLData_Defect.FirstOrDefault(x => x.Id == Id); if (table != null) { @@ -127,8 +127,8 @@ namespace BLL } public static void DeleteHJGLData_DefectByDate(DateTime? reportDate) { - - var table = db.HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + Model.CNPCDB db = Funs.DB; + var table = db.HJGLData_Defect.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); if (table != null) { db.HJGLData_Defect.DeleteAllOnSubmit(table); diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs index e69ddb79..e5617f18 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs @@ -11,9 +11,6 @@ namespace BLL public static class HSSEData_HiddenDangerDetailService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,6 +22,7 @@ namespace BLL } public static List GetHSSEData_HiddenDangerDetailByModle(Model.HSSEData_HiddenDangerDetail table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.HSSEData_HiddenDangerDetail where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -70,11 +68,13 @@ namespace BLL public static Model.HSSEData_HiddenDangerDetail GetHSSEData_HiddenDangerDetailById(string Id) { + Model.CNPCDB db = Funs.DB; return db.HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id); } public static List GetHSSEData_HiddenDangerDetailByDate(DateTime? reportDate) { + Model.CNPCDB db = Funs.DB; var q = from x in db.HSSEData_HiddenDangerDetail where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 select x; @@ -82,7 +82,7 @@ namespace BLL } public static void AddHSSEData_HiddenDangerDetail(Model.HSSEData_HiddenDangerDetail newtable) { - + Model.CNPCDB db = Funs.DB; Model.HSSEData_HiddenDangerDetail table = new Model.HSSEData_HiddenDangerDetail { Id = newtable.Id, @@ -101,7 +101,7 @@ namespace BLL public static void UpdateHSSEData_HiddenDangerDetail(Model.HSSEData_HiddenDangerDetail newtable) { - + Model.CNPCDB db = Funs.DB; Model.HSSEData_HiddenDangerDetail table = db.HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -119,7 +119,7 @@ namespace BLL } public static void DeleteHSSEData_HiddenDangerDetailById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.HSSEData_HiddenDangerDetail table = db.HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id); if (table != null) { @@ -130,7 +130,7 @@ namespace BLL } public static void DeleteHSSEData_HiddenDangerDetailByDate(DateTime? reportDate) { - + Model.CNPCDB db = Funs.DB; var table = db.HSSEData_HiddenDangerDetail.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs index 50ff0ef1..3ae34cef 100644 --- a/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs +++ b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs @@ -11,9 +11,6 @@ namespace BLL public static class HazardRealtimedeviceService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,6 +22,7 @@ namespace BLL } public static List GetHazard_RealTimeDeviceByModle(Model.Hazard_RealTimeDevice table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Hazard_RealTimeDevice where (string.IsNullOrEmpty(table.ID) || x.ID.Contains(table.ID)) && @@ -130,13 +128,14 @@ namespace BLL public static Model.Hazard_RealTimeDevice GetHazard_RealTimeDeviceById(string ID) { + Model.CNPCDB db = Funs.DB; return db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID); } public static void AddHazard_RealTimeDevice(Model.Hazard_RealTimeDevice newtable) { - + Model.CNPCDB db = Funs.DB; Model.Hazard_RealTimeDevice table = new Model.Hazard_RealTimeDevice { ID = newtable.ID, @@ -183,7 +182,7 @@ namespace BLL public static void AddBulkHazard_RealTimeDevice(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Hazard_RealTimeDevice.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -191,7 +190,7 @@ namespace BLL public static void UpdateHazard_RealTimeDevice(Model.Hazard_RealTimeDevice newtable) { - + Model.CNPCDB db = Funs.DB; Model.Hazard_RealTimeDevice table = db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == newtable.ID); if (table != null) { @@ -238,7 +237,7 @@ namespace BLL } public static void DeleteHazard_RealTimeDeviceById(string ID) { - + Model.CNPCDB db = Funs.DB; Model.Hazard_RealTimeDevice table = db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID); if (table != null) { @@ -250,6 +249,7 @@ namespace BLL public static void DeleteALLHazard_RealTimeDevice() { + Model.CNPCDB db = Funs.DB; if (db.Hazard_RealTimeDevice != null) { db.Hazard_RealTimeDevice.DeleteAllOnSubmit(db.Hazard_RealTimeDevice); @@ -258,6 +258,7 @@ namespace BLL } public static List GetHazard_RealTimeDeviceByDate(DateTime? reportDate) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Hazard_RealTimeDevice where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 select x; @@ -265,7 +266,7 @@ namespace BLL } public static void DeleteHazard_RealTimeDeviceByDate(DateTime? reportDate) { - + Model.CNPCDB db = Funs.DB; var table = db.Hazard_RealTimeDevice.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs index 18e2ed66..0f60f31d 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs @@ -13,7 +13,7 @@ namespace BLL public static class Project_CQMSDataService { - public static Model.CNPCDB db = Funs.DB; + /// /// CQMS数据类型 /// @@ -64,6 +64,7 @@ namespace BLL } public static List GetProject_CQMSData_CQMSByModle(Model.Project_CQMSData_CQMS table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Project_CQMSData_CQMS where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -141,10 +142,12 @@ namespace BLL /// public static Model.Project_CQMSData_CQMS GetProject_CQMSData_CQMSById(string Id) { + Model.CNPCDB db = Funs.DB; return db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id); } public static List GetProject_CQMSData_CQMSByprojectid(string projectid) { + Model.CNPCDB db = Funs.DB; var q = (from x in db.Project_CQMSData_CQMS where x.ProjectId == projectid select x).ToList(); @@ -156,7 +159,7 @@ namespace BLL /// public static void AddProject_CQMSData_CQMS(Model.Project_CQMSData_CQMS newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS { Id = newtable.Id, @@ -204,7 +207,7 @@ namespace BLL /// public static void UpdateProject_CQMSData_CQMS(Model.Project_CQMSData_CQMS newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -253,7 +256,7 @@ namespace BLL /// public static void DeleteProject_CQMSData_CQMSById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.Project_CQMSData_CQMS table = db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs index be860567..64f335fd 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs @@ -14,7 +14,7 @@ namespace BLL public static class Project_HJGLData_HJGLService { - public static Model.CNPCDB db = Funs.DB; + /// /// HJGL数据类型 /// @@ -54,6 +54,7 @@ namespace BLL } public static List GetProject_HJGLData_HJGLByModle(Model.Project_HJGLData_HJGL table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Project_HJGLData_HJGL where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -102,11 +103,13 @@ namespace BLL public static Model.Project_HJGLData_HJGL GetProject_HJGLData_HJGLById(string Id) { + Model.CNPCDB db = Funs.DB; return db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id); } public static List GetProject_HJGLData_HJGLByProjectid (string Projectid) { + Model.CNPCDB db = Funs.DB; var q =( from x in db.Project_HJGLData_HJGL where x.ProjectId == Projectid select x).ToList(); @@ -114,7 +117,7 @@ namespace BLL } public static void AddProject_HJGLData_HJGL(Model.Project_HJGLData_HJGL newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_HJGLData_HJGL table = new Model.Project_HJGLData_HJGL { Id = newtable.Id, @@ -134,7 +137,7 @@ namespace BLL } public static void UpdateProject_HJGLData_HJGL(Model.Project_HJGLData_HJGL newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -155,7 +158,7 @@ namespace BLL } public static void DeleteProject_HJGLData_HJGLById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.Project_HJGLData_HJGL table = db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs index 4c0d2aa2..39920f12 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs @@ -12,7 +12,7 @@ namespace BLL public static class Project_HSSEData_HiddenDangerDetailService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 @@ -26,6 +26,7 @@ namespace BLL } public static List GetProject_HSSEData_HiddenDangerDetailByModle(Model.Project_HSSEData_HiddenDangerDetail table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Project_HSSEData_HiddenDangerDetail where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -73,6 +74,7 @@ namespace BLL public static Model.Project_HSSEData_HiddenDangerDetail GetModelById(string Id) { + Model.CNPCDB db = Funs.DB; return db.Project_HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id); } /// diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs index e46f3bdb..75515d82 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs @@ -13,7 +13,7 @@ namespace BLL public static class Project_SYHSEData_SYHSEService { - public static Model.CNPCDB db = Funs.DB; + /// /// 实业数据类型 /// @@ -61,6 +61,7 @@ namespace BLL } public static List GetProject_SYHSEData_SYHSEByModle(Model.Project_SYHSEData_SYHSE table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Project_SYHSEData_SYHSE where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -138,11 +139,12 @@ namespace BLL public static Model.Project_SYHSEData_SYHSE GetProject_SYHSEData_SYHSEById(string Id) { + Model.CNPCDB db = Funs.DB; return db.Project_SYHSEData_SYHSE.FirstOrDefault(x => x.Id == Id); } public static void AddProject_SYHSEData_SYHSE(Model.Project_SYHSEData_SYHSE newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_SYHSEData_SYHSE table = new Model.Project_SYHSEData_SYHSE { Id = newtable.Id, @@ -191,7 +193,7 @@ namespace BLL } public static void UpdateProject_SYHSEData_SYHSE(Model.Project_SYHSEData_SYHSE newtable) { - + Model.CNPCDB db = Funs.DB; Model.Project_SYHSEData_SYHSE table = db.Project_SYHSEData_SYHSE.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -241,7 +243,7 @@ namespace BLL } public static void DeleteProject_SYHSEData_SYHSEById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.Project_SYHSEData_SYHSE table = db.Project_SYHSEData_SYHSE.FirstOrDefault(x => x.Id == Id); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs index 77f0bfd1..0a9ef5ad 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs @@ -13,8 +13,6 @@ namespace BLL public static class SYHSEData_DataService { - public static Model.CNPCDB db = Funs.DB; - #region 获取列表 /// @@ -27,6 +25,7 @@ namespace BLL } public static List GetSYHSEData_DataByModle(Model.SYHSEData_Data table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.SYHSEData_Data where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -174,13 +173,14 @@ namespace BLL public static Model.SYHSEData_Data GetSYHSEData_DataById(string Id) { + Model.CNPCDB db = Funs.DB; return db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id); } public static void AddSYHSEData_Data(Model.SYHSEData_Data newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_Data table = new Model.SYHSEData_Data { Id = newtable.Id, @@ -198,7 +198,7 @@ namespace BLL public static void AddBulkSYHSEData_Data(List newtables) { - + Model.CNPCDB db = Funs.DB; db.SYHSEData_Data.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -206,7 +206,7 @@ namespace BLL public static void UpdateSYHSEData_Data(Model.SYHSEData_Data newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -224,7 +224,7 @@ namespace BLL } public static void DeleteSYHSEData_DataById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id); if (table != null) { @@ -236,6 +236,7 @@ namespace BLL public static void DeleteALLSYHSEData_Data() { + Model.CNPCDB db = Funs.DB; if (db.SYHSEData_Data != null) { db.SYHSEData_Data.DeleteAllOnSubmit(db.SYHSEData_Data); diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs index 2de03b4a..edc67d7c 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs @@ -11,8 +11,6 @@ namespace BLL public static class SyhsedataHiddendangercheckService { - public static Model.CNPCDB db = Funs.DB; - #region 获取列表 /// @@ -25,6 +23,7 @@ namespace BLL } public static List GetSYHSEData_HiddenDangerCheckByModle(Model.SYHSEData_HiddenDangerCheck table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.SYHSEData_HiddenDangerCheck where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -67,13 +66,14 @@ namespace BLL public static Model.SYHSEData_HiddenDangerCheck GetSYHSEData_HiddenDangerCheckById(string Id) { + Model.CNPCDB db = Funs.DB; return db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id); } public static void AddSYHSEData_HiddenDangerCheck(Model.SYHSEData_HiddenDangerCheck newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_HiddenDangerCheck table = new Model.SYHSEData_HiddenDangerCheck { Id = newtable.Id, @@ -89,7 +89,7 @@ namespace BLL public static void AddBulkSYHSEData_HiddenDangerCheck(List newtables) { - + Model.CNPCDB db = Funs.DB; db.SYHSEData_HiddenDangerCheck.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -97,7 +97,7 @@ namespace BLL public static void UpdateSYHSEData_HiddenDangerCheck(Model.SYHSEData_HiddenDangerCheck newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -113,7 +113,7 @@ namespace BLL } public static void DeleteSYHSEData_HiddenDangerCheckById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id); if (table != null) { @@ -125,6 +125,7 @@ namespace BLL public static void DeleteALLSYHSEData_HiddenDangerCheck() { + Model.CNPCDB db = Funs.DB; if (db.SYHSEData_HiddenDangerCheck != null) { db.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(db.SYHSEData_HiddenDangerCheck); @@ -133,6 +134,7 @@ namespace BLL } public static List GetSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate) { + Model.CNPCDB db = Funs.DB; var q = from x in db.SYHSEData_HiddenDangerCheck where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 select x; @@ -140,7 +142,7 @@ namespace BLL } public static void DeleteSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate) { - + Model.CNPCDB db = Funs.DB; var table = db.SYHSEData_HiddenDangerCheck.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs index 86e9f9ca..808593ea 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs @@ -11,9 +11,6 @@ namespace BLL public static class SyhsedataRiskcontrolService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,6 +22,7 @@ namespace BLL } public static List GetSYHSEData_RiskControlByModle(Model.SYHSEData_RiskControl table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.SYHSEData_RiskControl where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && @@ -65,13 +63,14 @@ namespace BLL public static Model.SYHSEData_RiskControl GetSYHSEData_RiskControlById(string Id) { + Model.CNPCDB db = Funs.DB; return db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id); } public static void AddSYHSEData_RiskControl(Model.SYHSEData_RiskControl newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_RiskControl table = new Model.SYHSEData_RiskControl { Id = newtable.Id, @@ -85,7 +84,7 @@ namespace BLL public static void AddBulkSYHSEData_RiskControl(List newtables) { - + Model.CNPCDB db = Funs.DB; db.SYHSEData_RiskControl.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -93,7 +92,7 @@ namespace BLL public static void UpdateSYHSEData_RiskControl(Model.SYHSEData_RiskControl newtable) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -107,7 +106,7 @@ namespace BLL } public static void DeleteSYHSEData_RiskControlById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id); if (table != null) { @@ -119,6 +118,7 @@ namespace BLL public static void DeleteALLSYHSEData_RiskControl() { + Model.CNPCDB db = Funs.DB; if (db.SYHSEData_RiskControl != null) { db.SYHSEData_RiskControl.DeleteAllOnSubmit(db.SYHSEData_RiskControl); @@ -127,6 +127,7 @@ namespace BLL } public static List GetSYHSEData_RiskControlByDate(DateTime? reportDate) { + Model.CNPCDB db = Funs.DB; var q = from x in db.SYHSEData_RiskControl where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 select x; @@ -134,7 +135,7 @@ namespace BLL } public static void DeleteSYHSEData_RiskControlByDate(DateTime? reportDate) { - + Model.CNPCDB db = Funs.DB; var table = db.SYHSEData_RiskControl.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); if (table != null) { diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs index 06b17053..021bb424 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs @@ -10,7 +10,7 @@ namespace BLL { public static class SYHSEData_SYHSEService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 diff --git a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs index fec5a282..b037c899 100644 --- a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs +++ b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class UnitDrillRecordListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急演练 diff --git a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs index bd615acd..f9c539b4 100644 --- a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs +++ b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class UnitEmergencyListService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取应急预案管理 diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs index efac4310..848fdcd0 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs @@ -11,7 +11,7 @@ namespace BLL public static class EnergyReportService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 @@ -25,6 +25,7 @@ namespace BLL } public static List GetEnvironmental_EnergyReportByModle(Model.Environmental_EnergyReport table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Environmental_EnergyReport where (string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) && @@ -71,6 +72,7 @@ namespace BLL public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportById(string EnergyReportId) { + Model.CNPCDB db = Funs.DB; return db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId); } @@ -80,7 +82,7 @@ namespace BLL } public static void AddEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_EnergyReport table = new Model.Environmental_EnergyReport { EnergyReportId = newtable.EnergyReportId, @@ -98,7 +100,7 @@ namespace BLL public static void AddBulkEnvironmental_EnergyReport(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Environmental_EnergyReport.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -124,7 +126,7 @@ namespace BLL } public static void UpdateEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId); if (table != null) { @@ -154,6 +156,7 @@ namespace BLL public static void DeleteALLEnvironmental_EnergyReport() { + Model.CNPCDB db = Funs.DB; if (db.Environmental_EnergyReport != null) { db.Environmental_EnergyReport.DeleteAllOnSubmit(db.Environmental_EnergyReport); diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs index 8410b9b1..2dc4fdfd 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs @@ -11,7 +11,7 @@ namespace BLL public static class EnergyreportItemService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 @@ -25,6 +25,7 @@ namespace BLL } public static List GetEnvironmental_EnergyReportItemByModle(Model.Environmental_EnergyReportItem table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Environmental_EnergyReportItem where (string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) && @@ -87,6 +88,7 @@ namespace BLL public static Model.Environmental_EnergyReportItem GetEnvironmental_EnergyReportItemById(string EnergyReportItemId) { + Model.CNPCDB db = Funs.DB; return db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId); } @@ -177,7 +179,7 @@ namespace BLL } public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_EnergyReportItem table = new Model.Environmental_EnergyReportItem { EnergyReportItemId = newtable.EnergyReportItemId, @@ -209,7 +211,7 @@ namespace BLL public static void AddBulkEnvironmental_EnergyReportItem(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Environmental_EnergyReportItem.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -217,7 +219,7 @@ namespace BLL public static void UpdateEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId); if (table != null) { @@ -249,7 +251,7 @@ namespace BLL } public static void DeleteEnvironmental_EnergyReportItemById(string EnergyReportItemId) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId); if (table != null) { @@ -261,6 +263,7 @@ namespace BLL public static void DeleteALLEnvironmental_EnergyReportItem() { + Model.CNPCDB db = Funs.DB; if (db.Environmental_EnergyReportItem != null) { db.Environmental_EnergyReportItem.DeleteAllOnSubmit(db.Environmental_EnergyReportItem); diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs index e8f2d5a8..bb246771 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs @@ -12,9 +12,6 @@ namespace BLL public static class ProjectEnergyReportService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -26,6 +23,7 @@ namespace BLL } public static List GetEnvironmental_ProjectEnergyReportByModle(Model.Environmental_ProjectEnergyReport table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Environmental_ProjectEnergyReport where (string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) && @@ -73,6 +71,7 @@ namespace BLL public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportById(string EnergyReportId) { + Model.CNPCDB db = Funs.DB; return db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId); } @@ -82,7 +81,7 @@ namespace BLL } public static void AddEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReport table = new Model.Environmental_ProjectEnergyReport { EnergyReportId = newtable.EnergyReportId, @@ -101,7 +100,7 @@ namespace BLL public static void AddBulkEnvironmental_ProjectEnergyReport(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Environmental_ProjectEnergyReport.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -131,7 +130,7 @@ namespace BLL } public static void UpdateEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId); if (table != null) { @@ -150,7 +149,7 @@ namespace BLL } public static void DeleteEnvironmental_ProjectEnergyReportById(string EnergyReportId) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId); if (table != null) { @@ -162,6 +161,7 @@ namespace BLL public static void DeleteALLEnvironmental_ProjectEnergyReport() { + Model.CNPCDB db = Funs.DB; if (db.Environmental_ProjectEnergyReport != null) { db.Environmental_ProjectEnergyReport.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReport); diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs index 5be2312e..e7106251 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs @@ -11,7 +11,7 @@ namespace BLL public static class ProjectEnergyreportItemService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 @@ -25,6 +25,7 @@ namespace BLL } public static List GetEnvironmental_ProjectEnergyReportItemByModle(Model.Environmental_ProjectEnergyReportItem table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Environmental_ProjectEnergyReportItem where (string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) && @@ -87,6 +88,7 @@ namespace BLL public static Model.Environmental_ProjectEnergyReportItem GetEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId) { + Model.CNPCDB db = Funs.DB; return db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId); } @@ -183,7 +185,7 @@ namespace BLL } public static void AddEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReportItem table = new Model.Environmental_ProjectEnergyReportItem { EnergyReportItemId = newtable.EnergyReportItemId, @@ -215,7 +217,7 @@ namespace BLL public static void AddBulkEnvironmental_ProjectEnergyReportItem(List newtables) { - + Model.CNPCDB db = Funs.DB; db.Environmental_ProjectEnergyReportItem.InsertAllOnSubmit(newtables); db.SubmitChanges(); } @@ -223,7 +225,7 @@ namespace BLL public static void UpdateEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId); if (table != null) { @@ -255,7 +257,7 @@ namespace BLL } public static void DeleteEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId) { - + Model.CNPCDB db = Funs.DB; Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId); if (table != null) { @@ -267,6 +269,7 @@ namespace BLL public static void DeleteALLEnvironmental_ProjectEnergyReportItem() { + Model.CNPCDB db = Funs.DB; if (db.Environmental_ProjectEnergyReportItem != null) { db.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReportItem); diff --git a/SGGL/BLL/ZHGL/Information/Information_EnvironmentaldataService.cs b/SGGL/BLL/ZHGL/Information/Information_EnvironmentaldataService.cs index ebe6e875..56e4e3b5 100644 --- a/SGGL/BLL/ZHGL/Information/Information_EnvironmentaldataService.cs +++ b/SGGL/BLL/ZHGL/Information/Information_EnvironmentaldataService.cs @@ -11,9 +11,6 @@ namespace BLL public static class Information_EnvironmentalDataService { - public static Model.CNPCDB db = Funs.DB; - - #region 获取列表 /// /// 记录数 @@ -25,11 +22,12 @@ namespace BLL } public static List GetInformation_EnvironmentalDataByModle(Model.Information_EnvironmentalData table) { + Model.CNPCDB db = Funs.DB; var q = from x in db.Information_EnvironmentalData where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && - (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) + (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) select x ; @@ -55,12 +53,12 @@ namespace BLL select new { x.Id, - UnitName=BLL.UnitService.GetUnitNameByUnitId(x.UnitId) , + UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId), x.TotalEnergyConsumption, x.IncomeComprehensiveEnergyConsumption, x.NewWaterConsumption, x.ReportDate, - CreateMan= UserService.GetUserNameByUserId(x.CreateMan), + CreateMan = UserService.GetUserNameByUserId(x.CreateMan), x.CreateDate, }; @@ -69,15 +67,18 @@ namespace BLL public static Model.Information_EnvironmentalData GetInformation_EnvironmentalDataById(string Id) { + Model.CNPCDB db = Funs.DB; return db.Information_EnvironmentalData.FirstOrDefault(x => x.Id == Id); } - public static Model.Information_EnvironmentalData GetInformation_EnvironmentalDataByReportDate(DateTime ReportDate) + public static Model.Information_EnvironmentalData GetInformation_EnvironmentalDataByReportDate(DateTime ReportDate) { - var q= (from x in db.Information_EnvironmentalData where x.ReportDate.Value.Year.ToString()==ReportDate.Year.ToString() && x.ReportDate.Value.Month.ToString() == ReportDate.Month.ToString() select x).FirstOrDefault(); - return q; + Model.CNPCDB db = Funs.DB; + var q = (from x in db.Information_EnvironmentalData where x.ReportDate.Value.Year.ToString() == ReportDate.Year.ToString() && x.ReportDate.Value.Month.ToString() == ReportDate.Month.ToString() select x).FirstOrDefault(); + return q; } public static bool IsExitDataByReportDate(DateTime? ReportDate) { + Model.CNPCDB db = Funs.DB; bool result = false; var q = (from x in db.Information_EnvironmentalData where x.ReportDate.Value.Year.ToString() == ReportDate.Value.Year.ToString() && x.ReportDate.Value.Month.ToString() == ReportDate.Value.Month.ToString() select x).FirstOrDefault(); if (q != null) @@ -86,30 +87,33 @@ namespace BLL } return result; } - public static int GetLatstTimeTotalEnergyConsumption() + public static int GetLatstTimeTotalEnergyConsumption() { + Model.CNPCDB db = Funs.DB; int? result = 0; - var q = (from x in db.Information_EnvironmentalData orderby x.ReportDate descending select x).FirstOrDefault(); - if (q!=null) + var q = (from x in db.Information_EnvironmentalData orderby x.ReportDate descending select x).FirstOrDefault(); + if (q != null) { - result= q.TotalEnergyConsumption; + result = q.TotalEnergyConsumption; } return (int)result; } public static int GetLatstTimeIncomeComprehensiveEnergyConsumption() { + Model.CNPCDB db = Funs.DB; int? result = 0; var q = (from x in db.Information_EnvironmentalData orderby x.ReportDate descending select x).FirstOrDefault(); if (q != null) { result = q.IncomeComprehensiveEnergyConsumption; } - return (int)result; + return (int)result; } public static int GetLatstTimeNewWaterConsumption() { + Model.CNPCDB db = Funs.DB; int? result = 0; var q = (from x in db.Information_EnvironmentalData orderby x.ReportDate descending select x).FirstOrDefault(); if (q != null) @@ -121,7 +125,7 @@ namespace BLL } public static void AddInformation_EnvironmentalData(Model.Information_EnvironmentalData newtable) { - + Model.CNPCDB db = Funs.DB; Model.Information_EnvironmentalData table = new Model.Information_EnvironmentalData { Id = newtable.Id, @@ -140,7 +144,7 @@ namespace BLL public static void UpdateInformation_EnvironmentalData(Model.Information_EnvironmentalData newtable) { - + Model.CNPCDB db = Funs.DB; Model.Information_EnvironmentalData table = db.Information_EnvironmentalData.FirstOrDefault(x => x.Id == newtable.Id); if (table != null) { @@ -158,7 +162,7 @@ namespace BLL } public static void DeleteInformation_EnvironmentalDataById(string Id) { - + Model.CNPCDB db = Funs.DB; Model.Information_EnvironmentalData table = db.Information_EnvironmentalData.FirstOrDefault(x => x.Id == Id); if (table != null) { diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs index 69777305..710622be 100644 --- a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs +++ b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class CompanySafetyMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取企业安委会 diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs index 7949e79c..08ac5ca9 100644 --- a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs +++ b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class CompanySpecialMeetingService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取企业专题会 diff --git a/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs b/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs index c707098b..af99cc01 100644 --- a/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs +++ b/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class CompanyBranchPersonService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取公司分支机构人员 diff --git a/SGGL/BLL/ZHGL/RealName/BasicDataService.cs b/SGGL/BLL/ZHGL/RealName/BasicDataService.cs index 6d279d0a..e4d17c27 100644 --- a/SGGL/BLL/ZHGL/RealName/BasicDataService.cs +++ b/SGGL/BLL/ZHGL/RealName/BasicDataService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class BasicDataService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取字典信息 diff --git a/SGGL/BLL/ZHGL/RealName/CityService.cs b/SGGL/BLL/ZHGL/RealName/CityService.cs index 86fc8b5f..3d0abb63 100644 --- a/SGGL/BLL/ZHGL/RealName/CityService.cs +++ b/SGGL/BLL/ZHGL/RealName/CityService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class CityService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取国家信息 diff --git a/SGGL/BLL/ZHGL/RealName/CountryService.cs b/SGGL/BLL/ZHGL/RealName/CountryService.cs index c9fe0175..48afe818 100644 --- a/SGGL/BLL/ZHGL/RealName/CountryService.cs +++ b/SGGL/BLL/ZHGL/RealName/CountryService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class CountryService { - public static Model.CNPCDB db = Funs.DB; + /// /// 根据主键获取国家信息 diff --git a/SGGL/BLL/ZHGL/RealName/OnPostService.cs b/SGGL/BLL/ZHGL/RealName/OnPostService.cs index 75b62e75..eb0dae5e 100644 --- a/SGGL/BLL/ZHGL/RealName/OnPostService.cs +++ b/SGGL/BLL/ZHGL/RealName/OnPostService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class OnPostService { - public static Model.CNPCDB db = Funs.DB; + #region 获取列表 /// @@ -22,7 +22,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable getDataLists = from x in db.SitePerson_Person + private static IQueryable getDataLists = from x in Funs.DB.SitePerson_Person where x.IsUsed == true select x; @@ -37,6 +37,7 @@ namespace BLL public static IEnumerable getListData(string projectId, string personName, string identityCard, string rblStates, string rbInfo, string rbIDCardNo, string rbRealName, Grid Grid1) { + Model.CNPCDB db = Funs.DB; IQueryable getDataList = getDataLists; if (projectId != Const._Null && !string.IsNullOrEmpty(projectId)) { diff --git a/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs b/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs index 332f9a6c..a51d8793 100644 --- a/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs +++ b/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs @@ -8,7 +8,7 @@ namespace BLL { public static class RealName_ProjectService { - public static Model.CNPCDB db = Funs.DB; + /// /// diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/考试试题类型导入模版.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/考试试题类型导入模版.xls new file mode 100644 index 0000000000000000000000000000000000000000..f2f274b02edced5e6e774d911534dfb1622b3ac7 GIT binary patch literal 18944 zcmeHP2V7J~x1U`WSWu)$6BHJtDVIeK4G~c>pdw09Q4}mhKu{zWET~vRK#f=< zmS|$chS)G@us;hC3&tK}Lq*wl&b{2-%eElzeed`3{l4KhckY}y=Rar8oSA!PW-nF0 z>DO%BYj&5&gdRkVG>El`28+&tdyG`jBg7JJFy9~+i)kVuaQmO|53;~#(A63`PYogu zqB=zEb4`eRh*}V}A-00p8ln!wHV}0of(sCRhz1bbLNtVE1ko6x2}Dzf?I4;#G>6z8 zVh4y85YcBaTETrsR{kGkx_=8*!$=bRO(OylNG3y?OumNRXnrsTk6{eK1u+31uY??@ zt|W*~=&N3c$%l`pZ*v5YJ&ukBVK~&DOeT^TN{@*&@e8g7gv(*-$Fw=3sNo?Wnlq4u zL(5a4<-N%mxQ=NK0E@>E>c=?{$4_(XNAbC|nZSBO$aFFZ{>D(Y?+d*UN7)1^)5v(Z zpNs-ZfG(SX5!mvG4*UKv~oxd$s~NPR?^urGM0xvVgwwBlOnQo8Oys9B&& zT$Kh=pc?A^laRM!0n9c`I4(ds2eNO)@T7awJUUKoWwr_1;)uD~e% ze0}{jt=544u9W_`Dr4x!ERR_do)$&Nl^R2*`Dr??-e`JU9L?`V@#Bh)qF*7=a0?4K zT2EZ%HPXir;wEVquKXzaez?KF>rCO`YOpEYnWEzgu_@h=qT{NuDcy~t16hV{u7qx> zgzlsSzpD~{+8^ZWrR}VYF0VgrPkDaY{_=EVCHl~Gd3>P~er5X8c9yS~ZkIg1rxJW+ zc2-6=rEui&eU#wS{v)raYWpBR2Uh{$nN*O>OYrE$`3jdw7@E+5KV4s+nm06bD1FrN zQH^ddLq|~x-@B1tg40M(1v(GrpGF));Rpz^q4;@C>s3TY9H0wi`B`+HKZTRdHzese zVM#(ilDukpeFoo|WHg~80~dB~45?KrN5YRgIqHO)!EYxcfYSv>Ss~6DN(*t~P+Ewy zhtfivLL`Nt%ZUMDKft4;0sLv_1_w{M?B zKwAM#Qvr>yfW~X2iN%!?JS7^V$4WH@?!Objoi%B%;{F2@um+C28{jsaw1&*gOxYTG z%Gd<=?9^ZZLHi9ebg&l2mt<=NUy=oB&jJyPS_p!>hKwd2!e)ZV`UGw}DmNIYzFemL zmLQ-h@d>uU7@uI%7@uI%7@uI%BtB8OPSOErPxL#HXoiH==qIvD37RM+5{V=Nj8beG zqZFIQD8;5RO1*mZN`faEdV7R0Uzi1>^=NCDCKI}rP( zAWsV<0*qT04F6kA93&vhYyu3DprkpSfPuD&8i|c-pNxabYX$e$APlVVe*(Nu}N1b zVww{hr^%A|0-JcUKq?2c5X6fG;vsAyh&Ky_J|1OS#59M=W2(d^c<>~(3HwEz0cnPx zbYp>34rn2WFAKy&*g}x*ED-v*7zk8gn#1HVRbmrAD3aO)cUzdifHcD_fR12++o%-aEw7XQv7aJIK6u1ONy} z@_GP^Fv&w%eznp2OEnB^iH5R<4EnoTWd-_tsX*|T3iMSiu#yXJ16f48f^SAvu*M*V zL&RL-J?i8_kSEBcm!&4gR6mPHr3P8*RN6L6gGvpvG^x}mi%+G-Sz3^4!C?R#cRory zw_L6Yt~OMGC3F=!ux-L4oVeV6;qzmi;#cr3nrg&tCFT*PlorvVj$}ES32WENp{wZv zI+oC^y0D)D>(cuR&n>r)rtt+b_+7>7L|V=$WsXWAjsSL3usYn+EB5fri_$);cE%?b4^u@|$v4iET#We(L zVF|-3pjkgEU^SvxKT24wkac73nlyP-V_?M+8dVq0#-I<5C)CCd9TG6Od%_C7Y#*3F zA4tm?v5qL#kY7AjnV2bvNz0iw*q~y45`ClP6jN&lieU-Os!42NX5nOvSiv_1QzDTL z9FCcoLo!BSZY5Wf*dg1Ck@9Tj!1iJ!&89`{v0`qXbBJ8Uoc2&Lme8z5a3IDfoNlAl z7SE3z9$Bz9c`of{c1_jbbrAE3EEf%71t(~22*(2sV{M55jx_~xj4Sx)hR99_4$nf| z2F_HKOCaA$t`(fT0(2J@jPlTy0If=bfp$b_&o6=&0JJIz8rlfXS>m7GnP z@n{8RRB2O$leMX}N}EcdT~ymt5p+kDHkCrVsjXd9I_WuT3qpX6+c6P2t@ZRKpr zOjuSheX6u6!pYjyPNhwy&>pI7stDR%rA?*KLe(}^1nr>GrVO+Z3==t<;!G}U(@t_W zWoC3M(p9xh5l+^oomJXY3hk-dri!2)RoYYv?WNkLilCiT+LVDdBHr>g?W(}0&T=-z z#UefF`KY!j!pYjyMWs!p(A`wqR1vhRN}EcdeO2335wx31n=;Twq`SOLJr&s0UCySs zcBXCWr`o0nCu>s=l{S?^_fTz9MbJW(HkCq)RNGV$bQhI2rJ=|2jmcQn^Vpa&6JA#H z&$eF8DnVLke>EPS^b;~aKB^{ez|>yKe}Ak>0aPdM>}n<_h$|^P^xyf z)va`|!ET!=oI;`TRpF?b75g#eth+Y*;|bTD{{JT8gW~vaOwP_YMs1r?_9V0?H+5ivd*s8 zESjCH`{&Min|X6G?CPd^1?Qiun>k|~zdYjiyFL{))%m%Gj;V%!h1k4Qe?RcXg~_|F z-R$dro|}Ky@OF>&A>)IqB1&7gS$#pXwT003t^e7R!KHRfbIO8#JQQ>`=b8JQ3+_)f z+y_~^hqs`n8oVvEpe0|ZSk}eD4O5;NG2kq! zGVMt11jn=aKelx}d^xf8tyP@|<(^;Z&wBm&>CeZG&3;|( zmHGMAx%;0(YZmHQUd|7GlNYtYzI#sbx`PMP&-RY`Ev6v)Nkk1VJuOOCFvaubU9Qmb z#e#!Y>304-(~sZ(&}#lu2mO>lKcOf%Of&VgkMF$`=2@DvTpUl_|Ju0T-Xz7mj(0!h z&TYQ}A1#Z@l)R89DL48r2zc#YzV3v3#e!ZRI~3{P8&RFo@4JJA7el91Y}NML`iMUy zDfslXdxn?JJ({;AZ%xiJ!RDI_&)*PEJGn0DYDV%4>oJkh53NLYm0I`R3mpqSMlGFs z?pan*%&PanOO37fPgUD4xa>Zry^ghY@ox{8XTANZZzg$icTj!1$jvTc4&7dV=zgl; z*4Z9KZw(3__IS1+ZsC&8Q5QD!cAr(bN_Y0@>JFQVtaQC^t$z`p@BR2_6u)rpl$-g( z)HmI!%&}i{W}fd`->>#`vI~m!zuw`OknuCN&oB|*-ZCN0`_9r)^&Ncmk8KIF)P7R! zYCrMgVVye5@Y)`Q@yoOl=bbNkGdN$gDEZ|vliEpXAKn$G79SN+tlve$7`vcgMLd5zb$+^J!7lW$$*#xX1lxYoO-b1Hg5HV-7i8` zrImYn&b)2QnUvPS;MzEsg?_pV-zA4?R@~lZm0)2I7yI*xP4~x49bP(m%Y)UVWx4I07OIbdd&>$`rvywkDY zbM19Af+K1lu5erK?l-{B+d6jolZ!j64o)ud-I?F*%`}H|5fNQ(&b)Kx-j-i9N~ceX zUboB8DZr$9!-4DbR%lKAU1!Ub(ep)@+fV58q}(aaJ^hXLDhJO`1M_W7!rty3uqey? zVy7#D;zj(E2{(1#yxQ4iPi4Y_yTk6N_k15+G2MSyk1ol1)4VFib+g^L@ABj&kAh8> zZFre8EcK4r>u<9U*cJsG>eF}H9J@r9!f1!Rait|{rh~OCr#}ho(oy@4m7`VU)jMB} z?Hqf(K`&v#Hq$dsgQnaVoapXa6Lik8+r#aP=DZCrX~&(AvpI3z$_TFr-)$jYyAB1F zjhT4;$nD@h7Yxo1{cT!!;LL%?7WoLBZXN&1De2k+=V8C<1(fdhO}DCky5iP|3Dq}! zHa;=Xd)aw*VM$ufH_?M52R;nFyx1!?V&V*+C-0Wla$PshSY>VQ0~@x{+~HVvM*)~zEo~%JHxd&FTnNt z406{YGr`*Ymig0LgU)DZm-6Rr{F6I^O20n8ziM>L8*{6S_xdv*Va5J1&H+LpK zDe3Ydz2$b*3#xWqQJeRmtB$A0X7ID;Iwekgm-%Ckt{Y#v=DUivV?BO%PuO9`@Ai1r z)b(YP4nAAzA7&h~@P_ZWJ<)TQCV4$KieKK}VW6E&n1hS^+T=F&{Z$yVkj1!9IV!?c=#;mY&&^e*Ek@8{>-q+P8IRecgad;k~vAj1!%1 z-2df|)TolW`x|DMu6!N-c<88voN*cVx9xmW|FBc()z0prYT5Qbyy2`Ib$yLV?L$4c zPLH>QKQ8pS-EL*#vW}Z?Yuaqz-(%_VeM`R6iWY4MNEvD9b$V8e&4tu+RntFYIVWlk zTbAb2V}0-TD~8pb$!)vylHQ3Lr#)-ecj$V@;YP2s#VJQu&N8{QDj^|dwcF6y8crFz zJ=Q-m3s2JfpdNJ5&1u=m-A_A<{hluVAt^F`?_V=~&k0`nyn67_{-H2$v9Lk+Yb{@` zwI7n64hrqh;TpoRJM&s7Ybq#!jV}RQyJ;yj91Wn@AEhUN_`@z;IQ(KfvT3EV!xWes zE5!pd)}U>EWe7pP8>*7QS7bV%f;JG@?~|$|aj4M&C5_?5oh_-jnX*F<T4pIff-Ggx@&H*M{=(sh9Wewy@frf(3Vlu84WzzG8Bcwm<^exs9#4JxHI2o= z{<_GMM04*)eL5#0;Y>$Cw&==dmeSQ1MWB~JQUfp?s2o44v$2gSoa%YV_yrjf=0q0>O_c;3YSGp z${_`?vsJ(V&@fG|(s4KxF!&^c`sA08ES;W^=TUjY&(f3TVKbdPu}5pr$)KKyV z3Z89a$c2HF%d*=zKOXdF)Dkh&T!3^Be~aIx=nuVEKQ-|9=bM^vBU4y6d@DvCFAGuh$*M z4NQy?_QNlV!9k8U9`pZSr>GA#9-5N^4@j{obR$A;vBaaBF=OBA>y352ZS)s10nPWy6N;i;AEl4N}Zw8Rq-K3*azFk%r^0Klth(SeM|) z83$fF7QD9?q~l@Kj04VCD8YcTsCxjcaS|zCPlP+>e`|z+1g?7&k7*mAyTKu^2aHHB z>K7ZHFk*t>-W^Vlz2M#*+Jh8#xFUx)#314W_g + @@ -12691,6 +12692,13 @@ CompanyTrainingItemIn.aspx + + TestTrainingIn.aspx + ASPXCodeBehind + + + TestTrainingIn.aspx + TrainFindWorkPost.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx index 4efcd3d6..bc9db3e2 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx @@ -156,6 +156,9 @@ + diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.cs index ec4d86a6..47fb5ea0 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.cs @@ -97,7 +97,20 @@ namespace FineUIPro.Web.HSSE.EduTrain // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainingSave.aspx", "编辑 - "))); //} - + /// + /// 导入题库类型 + /// + /// + /// + protected void btnMenuImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("TestTrainingIn.aspx", "新增 - "))); + } + /// + /// 新增题库类型 + /// + /// + /// protected void btnMenuADD_Click(object sender, EventArgs e) { if (this.tvTestTraining.SelectedNode != null) @@ -362,6 +375,7 @@ namespace FineUIPro.Web.HSSE.EduTrain if (buttonList.Contains(BLL.Const.BtnAdd)) { this.btnMenuADD.Hidden = false; + this.btnMenuImport.Hidden = false; this.btnImport.Hidden = false; this.btnNewDetail.Hidden = false; } diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.designer.cs index e165ea5e..9137ac20 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTraining.aspx.designer.cs @@ -266,6 +266,15 @@ namespace FineUIPro.Web.HSSE.EduTrain /// protected global::FineUIPro.MenuButton btnMenuADD; + /// + /// btnMenuImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuImport; + /// /// btnTreeMenuEdit 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx new file mode 100644 index 00000000..51109f20 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx @@ -0,0 +1,84 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestTrainingIn.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.TestTrainingIn" %> + + + + + + 导入考试试题类型 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.cs new file mode 100644 index 00000000..f79c7000 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.cs @@ -0,0 +1,367 @@ +using BLL; +using Model; +using NPOI.OpenXmlFormats.Vml; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.HSSE.EduTrain +{ + public partial class TestTrainingIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 导入集合 + /// + public static List viewTrainingItems = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (viewTrainingItems != null) + { + viewTrainingItems.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 数据导入 + /// + /// 数据导入 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (viewTrainingItems != null) + { + viewTrainingItems.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + viewTrainingItems.Clear(); + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + ///现有试题类型 + var trainings = from x in Funs.DB.Training_TestTraining select x; + + for (int i = 0; i < ir; i++) + { + Model.Training_TestTraining newViewTrainingItem = new Model.Training_TestTraining(); + newViewTrainingItem.TrainingId = SQLHelper.GetNewID(typeof(Model.Training_TestTraining)); + + string col1 = pds.Rows[i][0].ToString().Trim();//试题类型编号 + string col2 = pds.Rows[i][1].ToString().Trim();//试题类型 + string col3 = pds.Rows[i][2].ToString().Trim();//试题类型上级 + string col4 = pds.Rows[i][3].ToString().Trim();//是否末级 + + bool isEndLever = col4 == "是"; + newViewTrainingItem.IsEndLever = isEndLever; + if (!string.IsNullOrEmpty(col3) && col3 != "考试试题库") + { + var standard = trainings.FirstOrDefault(x => x.TrainingName == col3 && x.IsEndLever == false); + if (standard != null) + { + newViewTrainingItem.SupTrainingId = standard.TrainingId; + } + else + { + errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "上级", Reason = $"上级[{col3}]不存在!" }); + } + } + else + { + newViewTrainingItem.SupTrainingId = "0"; + } + if (!string.IsNullOrEmpty(col2)) + { + var standard = trainings.FirstOrDefault(x => x.TrainingName == col2 && x.IsEndLever == isEndLever && x.SupTrainingId == newViewTrainingItem.SupTrainingId); + if (standard != null) + { + errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "试题类型", Reason = $"试题类型[{col2}]已存在!" }); + } + else + { + newViewTrainingItem.TrainingName = col2; + } + } + else + { + errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "试题类型", Reason = "此项为必填项!" }); + } + + + if (!string.IsNullOrEmpty(col1)) + { + var train = trainings.FirstOrDefault(x => x.TrainingCode == col1 && x.SupTrainingId == newViewTrainingItem.SupTrainingId); + if (train != null) + { + errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "类型编号", Reason = $"类型编号[{col1}]已存在!" }); + } + else + { + newViewTrainingItem.TrainingCode = col1; + } + } + else + { + errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "类型编号", Reason = "此项为必填项!" }); + } + + ///加入培训试题库 + viewTrainingItems.Add(newViewTrainingItem); + + + } + if (errorInfos.Any()) + { + viewTrainingItems.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + else + { + errorInfos.Clear(); + if (!viewTrainingItems.Any()) + { + Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning); + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + } + else + { + Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (!errorInfos.Any()) + { + int a = viewTrainingItems.Count(); + int insertCount = 0; + int updateCount = 0; + for (int i = 0; i < a; i++) + { + Model.Training_TestTraining newModel = new Model.Training_TestTraining + { + SupTrainingId = viewTrainingItems[i].SupTrainingId, + TrainingId = viewTrainingItems[i].TrainingId, + TrainingCode = viewTrainingItems[i].TrainingCode, + IsEndLever = viewTrainingItems[i].IsEndLever, + TrainingName = viewTrainingItems[i].TrainingName, + TrainingEngName = viewTrainingItems[i].TrainingEngName, + TrainTypeId = viewTrainingItems[i].TrainTypeId, + }; + BLL.TestTrainingService.AddTestTraining(newModel); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && File.Exists(filePath)) + { + File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入完成!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + if (Session["trainingItem"] != null) + { + viewTrainingItems = Session["trainingItem"] as List; + } + if (viewTrainingItems.Count > 0) + { + this.gvErrorInfo.Hidden = false; + this.gvErrorInfo.DataSource = viewTrainingItems; + this.gvErrorInfo.DataBind(); + } + } + + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string filePath = Const.TestTrainingTypeTemplateUrl; + string uploadfilepath = rootPath + filePath; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.designer.cs new file mode 100644 index 00000000..ec789395 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingIn.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.EduTrain +{ + + + public partial class TestTrainingIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 36d81b52..58e274a2 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -321,7 +321,6 @@ Web.config
-