提交代码

This commit is contained in:
2024-05-10 15:46:52 +08:00
parent 1c23ce814d
commit 563d401af6
30 changed files with 2014 additions and 98 deletions
+28 -1
View File
@@ -22,6 +22,16 @@ namespace BLL
return Funs.DB.JDGL_MonthPlan.FirstOrDefault(e => e.MonthPlanId == MonthPlanId);
}
/// <summary>
/// 根据主键获取月度计划情况
/// </summary>
/// <param name="MonthPlanId"></param>
/// <returns></returns>
public static List<Model.JDGL_MonthPlan> GetMonthPlansByMonths(string projectId, DateTime months)
{
return (from x in Funs.DB.JDGL_MonthPlan where x.ProjectId == projectId && x.Months == months select x).ToList();
}
/// <summary>
/// 添加月度计划情况
/// </summary>
@@ -42,6 +52,7 @@ namespace BLL
Remark = MonthPlan.Remark,
CompileMan = MonthPlan.CompileMan,
CompileDate = MonthPlan.CompileDate,
SortIndex = MonthPlan.SortIndex,
};
db.JDGL_MonthPlan.InsertOnSubmit(newMonthPlan);
db.SubmitChanges();
@@ -65,7 +76,8 @@ namespace BLL
newMonthPlan.Remark = MonthPlan.Remark;
newMonthPlan.CompileMan = MonthPlan.CompileMan;
newMonthPlan.CompileDate = MonthPlan.CompileDate;
newMonthPlan.SortIndex = MonthPlan.SortIndex;
db.SubmitChanges();
}
}
@@ -84,5 +96,20 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除月度计划情况
/// </summary>
/// <param name="MonthPlanId"></param>
public static void DeleteAllMonthPlan(string projectId, DateTime months)
{
Model.SGGLDB db = Funs.DB;
var q = from x in db.JDGL_MonthPlan where x.ProjectId == projectId && x.Months == months select x;
if (q != null)
{
db.JDGL_MonthPlan.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}