全局处理问题: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
@@ -12,7 +12,7 @@ namespace BLL
{
public static class AttachFileService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 添加附件存储信息
@@ -20,6 +20,7 @@ namespace BLL
/// <param name="workArea"></param>
public static void AddAttachFile(Model.AttachFile attachFile)
{
Model.SGGLDB db = Funs.DB;
string newKeyID = SQLHelper.GetNewID(typeof(Model.AttachFile));
Model.AttachFile newAttachFile = new Model.AttachFile();
newAttachFile.AttachFileId = newKeyID;
@@ -38,6 +39,7 @@ namespace BLL
/// <param name="workArea"></param>
public static void updateAttachFile(Model.AttachFile attachFile)
{
Model.SGGLDB db = Funs.DB;
Model.AttachFile newAttachFile = db.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFile.AttachFileId);
newAttachFile.ToKeyId = attachFile.ToKeyId;
newAttachFile.AttachSource = attachFile.AttachSource;
@@ -53,6 +55,7 @@ namespace BLL
/// <param name="workAreaId"></param>
public static void DeleteAttachFile(string rootPath, string toKeyId, string menuId)
{
Model.SGGLDB db = Funs.DB;
Model.AttachFile att = db.AttachFile.FirstOrDefault(e => e.ToKeyId == toKeyId && e.MenuId == menuId);
if (att != null)
{