| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Text; | 
					
						
							|  |  |  |  | using System.Threading.Tasks; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace BLL | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     /// <summary> | 
					
						
							|  |  |  |  |     /// 生态环保工作总结报告 | 
					
						
							|  |  |  |  |     /// </summary> | 
					
						
							|  |  |  |  |     public static class EPSummaryReportService | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据主键获取生态环保工作总结报告 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="ePSummaryReportId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public static Model.Information_EPSummaryReport GetEPSummaryReportById(string ePSummaryReportId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据单位和年份获取生态环保工作总结报告 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="unitId"></param> | 
					
						
							|  |  |  |  |         /// <param name="yearId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2023-07-12 15:58:52 +08:00
										 |  |  |  |         public static Model.Information_EPSummaryReport GetEPSummaryReportByUnitIdAndYearIdAndQuarters(string unitId, int yearId, int quarters) | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2023-07-12 15:58:52 +08:00
										 |  |  |  |             return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarters); | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 添加生态环保工作总结报告 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="ePSummaryReport"></param> | 
					
						
							|  |  |  |  |         public static void AddEPSummaryReport(Model.Information_EPSummaryReport ePSummaryReport) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.Information_EPSummaryReport newReport = new Model.Information_EPSummaryReport | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 EPSummaryReportId = ePSummaryReport.EPSummaryReportId, | 
					
						
							|  |  |  |  |                 UnitId = ePSummaryReport.UnitId, | 
					
						
							|  |  |  |  |                 YearId = ePSummaryReport.YearId, | 
					
						
							| 
									
										
										
										
											2023-07-12 15:58:52 +08:00
										 |  |  |  |                 Quarter = ePSummaryReport.Quarter, | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 ResponsiblePerson = ePSummaryReport.ResponsiblePerson, | 
					
						
							|  |  |  |  |                 ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel, | 
					
						
							|  |  |  |  |                 ContactPerson = ePSummaryReport.ContactPerson, | 
					
						
							|  |  |  |  |                 ContactPersonTel = ePSummaryReport.ContactPersonTel, | 
					
						
							|  |  |  |  |                 ReportDate = ePSummaryReport.ReportDate, | 
					
						
							|  |  |  |  |                 Description1 = ePSummaryReport.Description1, | 
					
						
							|  |  |  |  |                 Description2 = ePSummaryReport.Description2, | 
					
						
							|  |  |  |  |                 Description3 = ePSummaryReport.Description3, | 
					
						
							|  |  |  |  |                 Description4 = ePSummaryReport.Description4, | 
					
						
							|  |  |  |  |                 Description5 = ePSummaryReport.Description5, | 
					
						
							|  |  |  |  |                 Description6 = ePSummaryReport.Description6, | 
					
						
							|  |  |  |  |                 Description7 = ePSummaryReport.Description7, | 
					
						
							|  |  |  |  |                 Description8 = ePSummaryReport.Description8, | 
					
						
							|  |  |  |  |                 Description9 = ePSummaryReport.Description9 | 
					
						
							|  |  |  |  |             }; | 
					
						
							|  |  |  |  |             Funs.DB.Information_EPSummaryReport.InsertOnSubmit(newReport); | 
					
						
							|  |  |  |  |             Funs.DB.SubmitChanges(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 修改生态环保工作总结报告 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="ePSummaryReport"></param> | 
					
						
							|  |  |  |  |         public static void UpdateEPSummaryReport(Model.Information_EPSummaryReport ePSummaryReport) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.Information_EPSummaryReport newReport = Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReport.EPSummaryReportId); | 
					
						
							|  |  |  |  |             if (newReport != null) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 newReport.UnitId = ePSummaryReport.UnitId; | 
					
						
							|  |  |  |  |                 newReport.YearId = ePSummaryReport.YearId; | 
					
						
							| 
									
										
										
										
											2023-07-12 15:58:52 +08:00
										 |  |  |  |                 newReport.Quarter = ePSummaryReport.Quarter; | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 newReport.ResponsiblePerson = ePSummaryReport.ResponsiblePerson; | 
					
						
							|  |  |  |  |                 newReport.ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel; | 
					
						
							|  |  |  |  |                 newReport.ContactPerson = ePSummaryReport.ContactPerson; | 
					
						
							|  |  |  |  |                 newReport.ContactPersonTel = ePSummaryReport.ContactPersonTel; | 
					
						
							|  |  |  |  |                 newReport.ReportDate = ePSummaryReport.ReportDate; | 
					
						
							|  |  |  |  |                 newReport.Description1 = ePSummaryReport.Description1; | 
					
						
							|  |  |  |  |                 newReport.Description2 = ePSummaryReport.Description2; | 
					
						
							|  |  |  |  |                 newReport.Description3 = ePSummaryReport.Description3; | 
					
						
							|  |  |  |  |                 newReport.Description4 = ePSummaryReport.Description4; | 
					
						
							|  |  |  |  |                 newReport.Description5 = ePSummaryReport.Description5; | 
					
						
							|  |  |  |  |                 newReport.Description6 = ePSummaryReport.Description6; | 
					
						
							|  |  |  |  |                 newReport.Description7 = ePSummaryReport.Description7; | 
					
						
							|  |  |  |  |                 newReport.Description8 = ePSummaryReport.Description8; | 
					
						
							|  |  |  |  |                 newReport.Description9 = ePSummaryReport.Description9; | 
					
						
							|  |  |  |  |                 Funs.DB.SubmitChanges(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据主键删除生态环保工作总结报告 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="ePSummaryReportId"></param> | 
					
						
							|  |  |  |  |         public static void DeleteEPSummaryReportById(string ePSummaryReportId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.Information_EPSummaryReport ePSummaryReport = Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId); | 
					
						
							|  |  |  |  |             if (ePSummaryReport != null) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 Funs.DB.Information_EPSummaryReport.DeleteOnSubmit(ePSummaryReport); | 
					
						
							|  |  |  |  |                 Funs.DB.SubmitChanges(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |