1
This commit is contained in:
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据培训计划明细表Id获取所有相关明细信息
|
||||
@@ -19,6 +19,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_PlanItem> GetPlanItemByPlanId(string planId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_PlanItem where x.PlanId == planId select x).ToList();
|
||||
}
|
||||
|
||||
@@ -28,6 +29,7 @@ namespace BLL
|
||||
/// <param name="planItem"></param>
|
||||
public static void AddPlanItem(Model.Training_PlanItem planItem)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem
|
||||
{
|
||||
PlanItemId = planItem.PlanItemId,
|
||||
@@ -47,6 +49,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePlanItem(Model.Training_PlanItem model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_PlanItem newItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == model.PlanItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
@@ -65,6 +68,7 @@ namespace BLL
|
||||
/// <param name="planItemId"></param>
|
||||
public static void DeletePlanItemById(string planItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var planItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == planItemId);
|
||||
if (planItem != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user