增加施工月报
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 添加施工月报
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReport"></param>
|
||||
public static void AddConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = new Model.ZHGL_ConstructionMonthReport();
|
||||
newConstructionMonthReport.ConstructionMonthReportId = ConstructionMonthReport.ConstructionMonthReportId;
|
||||
newConstructionMonthReport.ProjectId = ConstructionMonthReport.ProjectId;
|
||||
newConstructionMonthReport.Month = ConstructionMonthReport.Month;
|
||||
newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
|
||||
newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
|
||||
newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
|
||||
newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
|
||||
newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
|
||||
newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
|
||||
newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
|
||||
newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
|
||||
newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
|
||||
newConstructionMonthReport.CompileMan = ConstructionMonthReport.CompileMan;
|
||||
newConstructionMonthReport.CompileDate = ConstructionMonthReport.CompileDate;
|
||||
|
||||
db.ZHGL_ConstructionMonthReport.InsertOnSubmit(newConstructionMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工月报
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReport"></param>
|
||||
public static void UpdateConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReport.ConstructionMonthReportId);
|
||||
newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
|
||||
newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
|
||||
newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
|
||||
newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
|
||||
newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
|
||||
newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
|
||||
newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
|
||||
newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
|
||||
newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据施工月报Id删除一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId"></param>
|
||||
public static void DeleteConstructionMonthReport(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport ConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
|
||||
db.ZHGL_ConstructionMonthReport.DeleteOnSubmit(ConstructionMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据施工月报Id获取一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportDetailId"></param>
|
||||
public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReport(string ConstructionMonthReportId)
|
||||
{
|
||||
return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月份获取一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="months">月份</param>
|
||||
public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReportByMonth(DateTime month, string projectId)
|
||||
{
|
||||
return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.Month == month && e.ProjectId == projectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user