提交代码
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionLogHJGLService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工日志焊接数据明细列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionLogHJGL> getListData(string ConstructionLogId)
|
||||
{
|
||||
return (from x in db.ZHGL_ConstructionLogHJGL
|
||||
where x.ConstructionLogId == ConstructionLogId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工日志焊接数据明细实体</param>
|
||||
public static void AddConstructionLogHJGL(Model.ZHGL_ConstructionLogHJGL constructionLogHJGL)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionLogHJGL newConstructionLogHJGL = new Model.ZHGL_ConstructionLogHJGL();
|
||||
newConstructionLogHJGL.ConstructionLogHJGLId = constructionLogHJGL.ConstructionLogHJGLId;
|
||||
newConstructionLogHJGL.ConstructionLogId = constructionLogHJGL.ConstructionLogId;
|
||||
newConstructionLogHJGL.UnitWorkId = constructionLogHJGL.UnitWorkId;
|
||||
newConstructionLogHJGL.TodayCompleteSize = constructionLogHJGL.TodayCompleteSize;
|
||||
newConstructionLogHJGL.TotalCompleteSize = constructionLogHJGL.TotalCompleteSize;
|
||||
newConstructionLogHJGL.TotalSize = constructionLogHJGL.TotalSize;
|
||||
newConstructionLogHJGL.TotalRate = constructionLogHJGL.TotalRate;
|
||||
newConstructionLogHJGL.TomorrowPlanSize = constructionLogHJGL.TomorrowPlanSize;
|
||||
|
||||
db.ZHGL_ConstructionLogHJGL.InsertOnSubmit(newConstructionLogHJGL);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
|
||||
public static void DeleteConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionLogHJGL.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
|
||||
public static List<Model.ZHGL_ConstructionLogHJGL> GetConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user