全局处理问题:public static Model.SGGLDB db = Funs.DB;

This commit is contained in:
2026-04-23 11:36:49 +08:00
parent 5a38880a14
commit 746cb57619
315 changed files with 641 additions and 449 deletions
+4 -1
View File
@@ -8,7 +8,7 @@ namespace BLL
/// </summary>
public static class TestPlanService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取培训计划
@@ -26,6 +26,7 @@ namespace BLL
/// <param name="testPlan"></param>
public static void AddTestPlan(Model.Training_TestPlan testPlan)
{
Model.SGGLDB 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.SGGLDB db = Funs.DB;
Model.Training_TestPlan newTestPlan = db.Training_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlan.TestPlanId);
if (newTestPlan != null)
{
@@ -138,6 +140,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.Training_TestPlan> GetTestPlanList()
{
Model.SGGLDB db = Funs.DB;
return (from x in db.Training_TestPlan orderby x.PlanCode select x).ToList();
}