20241227 新增support document
This commit is contained in:
@@ -236,6 +236,7 @@ namespace FineUIPro.Web.AttachFile
|
||||
JObject item = source[i] as JObject;
|
||||
string attachUrl = AttachPath + "\\" + item.Value<string>("savedName").Replace('/', '\\');
|
||||
string fileName = item.Value<string>("name");
|
||||
string name = fileName.Substring(0, fileName.LastIndexOf("."));
|
||||
string Id = string.Empty;
|
||||
if (MenuId == BLL.Const.StandardTemplateMenuId)
|
||||
{
|
||||
@@ -249,7 +250,6 @@ namespace FineUIPro.Web.AttachFile
|
||||
BLL.StandardTemplateService.AddStandardTemplate(temp);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Standard Template!");
|
||||
}
|
||||
|
||||
if (MenuId == BLL.Const.SESRelatedDateMenuId)
|
||||
{
|
||||
if (AttachPath.Contains("SignedContracts"))
|
||||
@@ -312,7 +312,6 @@ namespace FineUIPro.Web.AttachFile
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add One Time Contracts Contract Management!");
|
||||
}
|
||||
}
|
||||
|
||||
if (MenuId == BLL.Const.CTSalesContractsMenuId)
|
||||
{
|
||||
if (AttachPath.Contains("SignedContracts"))
|
||||
@@ -344,6 +343,30 @@ namespace FineUIPro.Web.AttachFile
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add CT Sales Contracts Signed Contract Management!");
|
||||
}
|
||||
}
|
||||
if (MenuId==BLL.Const.TemplateMenuId)
|
||||
{
|
||||
Model.SupportDocument_Template temp = new Model.SupportDocument_Template();
|
||||
Id = ToKeyId;
|
||||
temp.TemplateId = Id;
|
||||
temp.Template = name;
|
||||
temp.UploadDate = DateTime.Now;
|
||||
temp.UploadBy = this.CurrUser.UserId;
|
||||
temp.AttachUrl = attachUrl;
|
||||
BLL.TemplateService.AddTemplate(temp);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Template!");
|
||||
}
|
||||
if (MenuId==BLL.Const.GuideManualMenuId)
|
||||
{
|
||||
Model.SupportDocument_GuideManual temp = new Model.SupportDocument_GuideManual();
|
||||
Id = ToKeyId;
|
||||
temp.GuideManualId = Id;
|
||||
temp.GuideManual = name;
|
||||
temp.UploadDate = DateTime.Now;
|
||||
temp.UploadBy = this.CurrUser.UserId;
|
||||
temp.AttachUrl = attachUrl;
|
||||
BLL.GuideManualService.AddGuideManual(temp);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Guide Manual!");
|
||||
}
|
||||
|
||||
Model.AttachFile att = new Model.AttachFile();
|
||||
att.AttachFileId = BLL.SQLHelper.GetNewID(typeof(Model.AttachFile));
|
||||
@@ -465,6 +488,30 @@ namespace FineUIPro.Web.AttachFile
|
||||
}
|
||||
}
|
||||
|
||||
if (MenuId==BLL.Const.TemplateMenuId)
|
||||
{
|
||||
Model.SupportDocument_Template temp = new Model.SupportDocument_Template();
|
||||
temp.TemplateId = ToKeyId;
|
||||
temp.Template = fileName;
|
||||
temp.UploadDate = DateTime.Now;
|
||||
temp.AttachUrl = attachUrl;
|
||||
temp.UploadBy = this.CurrUser.UserId;
|
||||
BLL.TemplateService.UpdateTemplate(temp);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify Template!");
|
||||
}
|
||||
|
||||
if (MenuId==BLL.Const.GuideManualMenuId)
|
||||
{
|
||||
Model.SupportDocument_GuideManual temp = new Model.SupportDocument_GuideManual();
|
||||
temp.GuideManualId = ToKeyId;
|
||||
temp.GuideManual = fileName;
|
||||
temp.UploadDate = DateTime.Now;
|
||||
temp.AttachUrl = attachUrl;
|
||||
temp.UploadBy = this.CurrUser.UserId;
|
||||
BLL.GuideManualService.UpdateGuideManual(temp);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify Guide Manual!");
|
||||
}
|
||||
|
||||
var sour = from x in db.AttachFile where x.ToKeyId == ToKeyId select x;
|
||||
Model.AttachFile att = db.AttachFile.FirstOrDefault(x => x.AttachFileId == sour.First().AttachFileId);
|
||||
if (att != null)
|
||||
|
||||
Reference in New Issue
Block a user