去除静态变量Funs.DB

This commit is contained in:
2025-01-07 19:00:48 +08:00
parent 188974fadc
commit 2c1a328bc1
290 changed files with 1205 additions and 1242 deletions
@@ -7,6 +7,7 @@ using System.Drawing.Printing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Model;
namespace BLL
@@ -14,8 +15,6 @@ namespace BLL
public static class InterFaceLogService
{
public static Model.SGGLDB db = Funs.DB;
public const string Type1 = "上报";
public const string Type2= "下发";
public const string Type3 = "回调";
@@ -31,7 +30,7 @@ namespace BLL
}
public static List<Model.InterFaceLog> GetInterFaceLogByModle(Model.InterFaceLog table)
{
var q = from x in db.InterFaceLog
var q = from x in Funs.DB.InterFaceLog
where
(string.IsNullOrEmpty(table.InterFaceLogId) || x.InterFaceLogId.Contains(table.InterFaceLogId)) &&
(string.IsNullOrEmpty(table.UserId) || x.UserId.Contains(table.UserId)) &&
@@ -87,7 +86,7 @@ namespace BLL
public static Model.InterFaceLog GetInterFaceLogById(string InterFaceLogId)
{
return db.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==InterFaceLogId);
return Funs.DB.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==InterFaceLogId);
}
@@ -151,7 +150,7 @@ namespace BLL
public static void UpdateInterFaceLog(Model.InterFaceLog newtable)
{
Model.InterFaceLog table = db.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==newtable.InterFaceLogId);
Model.InterFaceLog table = Funs.DB.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==newtable.InterFaceLogId);
if (table != null)
{
table.InterFaceLogId=newtable.InterFaceLogId;