1
This commit is contained in:
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class AttachFileService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加附件存储信息
|
||||
@@ -17,6 +17,7 @@ namespace BLL
|
||||
/// <param name="workArea"></param>
|
||||
public static void AddAttachFile(Model.AttachFile attachFile)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.AttachFile));
|
||||
Model.AttachFile newAttachFile = new Model.AttachFile();
|
||||
newAttachFile.AttachFileId = newKeyID;
|
||||
@@ -35,6 +36,7 @@ namespace BLL
|
||||
/// <param name="workArea"></param>
|
||||
public static void updateAttachFile(Model.AttachFile attachFile)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.AttachFile newAttachFile = db.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFile.AttachFileId);
|
||||
newAttachFile.ToKeyId = attachFile.ToKeyId;
|
||||
newAttachFile.AttachSource = attachFile.AttachSource;
|
||||
@@ -50,6 +52,7 @@ namespace BLL
|
||||
/// <param name="workAreaId"></param>
|
||||
public static void DeleteAttachFile(string rootPath, string toKeyId, string menuId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.AttachFile att = db.AttachFile.FirstOrDefault(e => e.ToKeyId == toKeyId && e.MenuId == menuId);
|
||||
if (att != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user