20250410
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.HSSF.Record.Chart;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -272,8 +272,34 @@ namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
attachUrl = attachUrl.Replace('/', '\\');
|
||||
attachUrl = attachUrl.Substring(0, attachUrl.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
var sour = from x in db.AttachFile where x.ToKeyId == ToKeyId select x;
|
||||
|
||||
//合同管理附件名重复提醒
|
||||
if (MenuId == BLL.Const.SESRelatedDateMenuId)
|
||||
{
|
||||
string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\"));
|
||||
string n = newName.Substring(newName.IndexOf("_") + 1);
|
||||
foreach (var item in sour)
|
||||
{
|
||||
if (item.AttachUrl.Contains(n))
|
||||
{
|
||||
Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
string fc_id = Request.QueryString["fcid"];
|
||||
string fileTypeId = Request.QueryString["fileTypeId"];
|
||||
var conLists = from x in Funs.DB.FC_ContractManagement where x.FC_ID.ToString() == fc_id && x.FileTypeId == fileTypeId select x;
|
||||
foreach (var item in conLists)
|
||||
{
|
||||
if (item.AttachUrl.Contains(n))
|
||||
{
|
||||
Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sour.Count() == 0)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user