1
This commit is contained in:
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestPlanService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
@@ -26,6 +26,7 @@ namespace BLL
|
||||
/// <param name="testPlan"></param>
|
||||
public static void AddTestPlan(Model.Training_TestPlan testPlan)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestPlan newTestPlan = new Model.Training_TestPlan
|
||||
{
|
||||
TestPlanId = testPlan.TestPlanId,
|
||||
@@ -63,6 +64,7 @@ namespace BLL
|
||||
/// <param name="TestPlan"></param>
|
||||
public static void UpdateTestPlan(Model.Training_TestPlan TestPlan)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestPlan newTestPlan = db.Training_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlan.TestPlanId);
|
||||
if (newTestPlan != null)
|
||||
{
|
||||
@@ -93,7 +95,6 @@ namespace BLL
|
||||
/// <param name="TestPlanId"></param>
|
||||
public static void DeleteTestPlanById(string TestPlanId)
|
||||
{
|
||||
|
||||
var getTestPlan = GetTestPlanById(TestPlanId);
|
||||
if (getTestPlan != null)
|
||||
{
|
||||
@@ -138,6 +139,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_TestPlan> GetTestPlanList()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_TestPlan orderby x.PlanCode select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user