2023-03-31 报表升级
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public static class ProjectEPSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_EPSummaryReport GetEPSummaryReportById(string ePSummaryReportId)
|
||||
{
|
||||
return Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void AddEPSummaryReport(Model.InformationProject_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.InformationProject_EPSummaryReport newReport = new Model.InformationProject_EPSummaryReport
|
||||
{
|
||||
EPSummaryReportId = ePSummaryReport.EPSummaryReportId,
|
||||
ProjectId = ePSummaryReport.ProjectId,
|
||||
UnitId = ePSummaryReport.UnitId,
|
||||
YearId = ePSummaryReport.YearId,
|
||||
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.InformationProject_EPSummaryReport.InsertOnSubmit(newReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void UpdateEPSummaryReport(Model.InformationProject_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.InformationProject_EPSummaryReport newReport = Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReport.EPSummaryReportId);
|
||||
if (newReport != null)
|
||||
{
|
||||
newReport.UnitId = ePSummaryReport.UnitId;
|
||||
newReport.YearId = ePSummaryReport.YearId;
|
||||
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.InformationProject_EPSummaryReport ePSummaryReport = Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
if (ePSummaryReport != null)
|
||||
{
|
||||
Funs.DB.InformationProject_EPSummaryReport.DeleteOnSubmit(ePSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user