69 lines
3.2 KiB
C#
69 lines
3.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace BLL
|
|
{
|
|
public class ConstructionLogProblemService
|
|
{
|
|
public static Model.SGGLDB db = Funs.DB;
|
|
|
|
/// <summary>
|
|
/// 获取施工日志需要协调解决的问题明细列表
|
|
/// </summary>
|
|
/// <param name="satartRowIndex"></param>
|
|
/// <param name="maximumRows"></param>
|
|
/// <returns></returns>
|
|
public static List<Model.ZHGL_ConstructionLogProblem> getListData(string ConstructionLogId)
|
|
{
|
|
return (from x in db.ZHGL_ConstructionLogProblem
|
|
where x.ConstructionLogId == ConstructionLogId
|
|
select x).ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 增加施工日志需要协调解决的问题明细
|
|
/// </summary>
|
|
/// <param name="managerRuleApprove">施工日志需要协调解决的问题明细实体</param>
|
|
public static void AddConstructionLogProblem(Model.ZHGL_ConstructionLogProblem constructionLogProblem)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.ZHGL_ConstructionLogProblem newConstructionLogProblem = new Model.ZHGL_ConstructionLogProblem();
|
|
newConstructionLogProblem.ConstructionLogProblemId = constructionLogProblem.ConstructionLogProblemId;
|
|
newConstructionLogProblem.ConstructionLogId = constructionLogProblem.ConstructionLogId;
|
|
newConstructionLogProblem.UnitWorkId = constructionLogProblem.UnitWorkId;
|
|
newConstructionLogProblem.MainProblem = constructionLogProblem.MainProblem;
|
|
newConstructionLogProblem.HandlingMeasures = constructionLogProblem.HandlingMeasures;
|
|
newConstructionLogProblem.WorkPackageId = constructionLogProblem.WorkPackageId;
|
|
newConstructionLogProblem.ImportanceLevel = constructionLogProblem.ImportanceLevel;
|
|
|
|
db.ZHGL_ConstructionLogProblem.InsertOnSubmit(newConstructionLogProblem);
|
|
db.SubmitChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据月报id删除对应的所有施工日志需要协调解决的问题明细
|
|
/// </summary>
|
|
/// <param name="ConstructionLogId">施工日志需要协调解决的问题明细编号</param>
|
|
public static void DeleteConstructionLogProblemsByConstructionLogId(string ConstructionLogId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
var q = (from x in db.ZHGL_ConstructionLogProblem where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
|
if (q.Count() > 0)
|
|
{
|
|
db.ZHGL_ConstructionLogProblem.DeleteAllOnSubmit(q);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据月报id获取对应的所有施工日志需要协调解决的问题明细
|
|
/// </summary>
|
|
/// <param name="ConstructionLogId">施工日志需要协调解决的问题明细编号</param>
|
|
public static List<Model.ZHGL_ConstructionLogProblem> GetConstructionLogProblemsByConstructionLogId(string ConstructionLogId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
return (from x in db.ZHGL_ConstructionLogProblem where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
|
|
}
|
|
}
|
|
}
|