62 lines
3.3 KiB
C#
62 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace BLL
|
|
{
|
|
public class ConstructionLogWorkEfficiencyMonthService
|
|
{
|
|
/// <summary>
|
|
/// 获取施工日志月工效明细列表
|
|
/// </summary>
|
|
/// <param name="satartRowIndex"></param>
|
|
/// <param name="maximumRows"></param>
|
|
/// <returns></returns>
|
|
public static List<Model.ZHGL_ConstructionLogWorkEfficiencyMonth> getListData(string projectId, DateTime month)
|
|
{
|
|
return (from x in Funs.DB.ZHGL_ConstructionLogWorkEfficiencyMonth
|
|
where x.ProjectId == projectId && x.Month == month
|
|
select x).ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 增加施工日志月工效明细
|
|
/// </summary>
|
|
/// <param name="managerRuleApprove">施工日志月工效明细实体</param>
|
|
public static void AddConstructionLogWorkEfficiencyMonth(Model.ZHGL_ConstructionLogWorkEfficiencyMonth constructionLogWorkEfficiencyMonth)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.ZHGL_ConstructionLogWorkEfficiencyMonth newConstructionLogWorkEfficiencyMonth = new Model.ZHGL_ConstructionLogWorkEfficiencyMonth();
|
|
newConstructionLogWorkEfficiencyMonth.ConstructionLogWorkEfficiencyMonthId = constructionLogWorkEfficiencyMonth.ConstructionLogWorkEfficiencyMonthId;
|
|
newConstructionLogWorkEfficiencyMonth.ProjectId = constructionLogWorkEfficiencyMonth.ProjectId;
|
|
newConstructionLogWorkEfficiencyMonth.Month = constructionLogWorkEfficiencyMonth.Month;
|
|
newConstructionLogWorkEfficiencyMonth.ContractTrackId = constructionLogWorkEfficiencyMonth.ContractTrackId;
|
|
newConstructionLogWorkEfficiencyMonth.PhysicalCompletionQuantity = constructionLogWorkEfficiencyMonth.PhysicalCompletionQuantity;
|
|
newConstructionLogWorkEfficiencyMonth.MaterialConsumption = constructionLogWorkEfficiencyMonth.MaterialConsumption;
|
|
newConstructionLogWorkEfficiencyMonth.UnitOfMeasurement = constructionLogWorkEfficiencyMonth.UnitOfMeasurement;
|
|
newConstructionLogWorkEfficiencyMonth.Type = constructionLogWorkEfficiencyMonth.Type;
|
|
newConstructionLogWorkEfficiencyMonth.TypeId = constructionLogWorkEfficiencyMonth.TypeId;
|
|
newConstructionLogWorkEfficiencyMonth.ConsumeHours = constructionLogWorkEfficiencyMonth.ConsumeHours;
|
|
newConstructionLogWorkEfficiencyMonth.WorkEfficiency = constructionLogWorkEfficiencyMonth.WorkEfficiency;
|
|
|
|
db.ZHGL_ConstructionLogWorkEfficiencyMonth.InsertOnSubmit(newConstructionLogWorkEfficiencyMonth);
|
|
db.SubmitChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据月报id删除对应的所有施工日志月工效明细
|
|
/// </summary>
|
|
/// <param name="ConstructionLogId">施工日志月工效明细编号</param>
|
|
public static void DeleteConstructionLogWorkEfficiencyMonthsByConstructionLogId(string projectId, DateTime month)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
var q = (from x in db.ZHGL_ConstructionLogWorkEfficiencyMonth where x.ProjectId == projectId && x.Month == month select x).ToList();
|
|
if (q.Count() > 0)
|
|
{
|
|
db.ZHGL_ConstructionLogWorkEfficiencyMonth.DeleteAllOnSubmit(q);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|