全局处理问题:public static Model.SGGLDB db = Funs.DB;
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
@@ -10,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingTaskService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训任务
|
||||
@@ -19,7 +20,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Task GetTaskById(string taskId)
|
||||
{
|
||||
return db.Training_Task.FirstOrDefault(e => e.TaskId == taskId);
|
||||
return Funs.DB.Training_Task.FirstOrDefault(e => e.TaskId == taskId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,6 +39,7 @@ namespace BLL
|
||||
/// <param name="task"></param>
|
||||
public static void AddTask(Model.Training_Task task)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Training_Task newTask = new Model.Training_Task
|
||||
{
|
||||
TaskId = task.TaskId,
|
||||
|
||||
Reference in New Issue
Block a user