2025-5-14 附件重复上传提醒
This commit is contained in:
parent
1cda2d1914
commit
647d00f201
|
@ -7,6 +7,9 @@ using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using Microsoft.JScript;
|
||||||
|
using System.Security.Policy;
|
||||||
|
|
||||||
namespace FineUIPro.Web.AttachFile
|
namespace FineUIPro.Web.AttachFile
|
||||||
{
|
{
|
||||||
|
@ -278,25 +281,44 @@ namespace FineUIPro.Web.AttachFile
|
||||||
//合同管理附件名重复提醒
|
//合同管理附件名重复提醒
|
||||||
if (MenuId == BLL.Const.SESRelatedDateMenuId)
|
if (MenuId == BLL.Const.SESRelatedDateMenuId)
|
||||||
{
|
{
|
||||||
string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\"));
|
if (!string.IsNullOrEmpty(attachUrl))
|
||||||
string n = newName.Substring(newName.IndexOf("_") + 1);
|
|
||||||
foreach (var item in sour)
|
|
||||||
{
|
{
|
||||||
if (item.AttachUrl.Contains(n))
|
string newName = attachUrl.Substring(attachUrl.LastIndexOf("\\"));
|
||||||
|
string n = newName.Substring(newName.IndexOf("_") + 1);
|
||||||
|
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning);
|
if (item.FileId != ToKeyId)
|
||||||
return;
|
{
|
||||||
}
|
if (item.AttachUrl.Contains(n))
|
||||||
}
|
{
|
||||||
string fc_id = Request.QueryString["fcid"];
|
Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning);
|
||||||
string fileTypeId = Request.QueryString["fileTypeId"];
|
return;
|
||||||
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)
|
}
|
||||||
{
|
else
|
||||||
if (item.AttachUrl.Contains(n))
|
{
|
||||||
{
|
List<string> newNames = new List<string>();
|
||||||
Alert.ShowInTop(n + "已存在!", MessageBoxIcon.Warning);
|
var list = attachUrl.Split(',').ToList();
|
||||||
return;
|
foreach (var l in list)
|
||||||
|
{
|
||||||
|
string oldname = l.Substring(l.LastIndexOf("\\"));
|
||||||
|
string oldn = oldname.Substring(oldname.IndexOf("_") + 1);
|
||||||
|
newNames.Add(oldn);
|
||||||
|
}
|
||||||
|
var query = newNames.GroupBy(x => x).Where(g => g.Count() > 1).ToDictionary(x => x.Key, y => y.Count());
|
||||||
|
foreach (var i in query)
|
||||||
|
{
|
||||||
|
if (i.Value > 1)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop(i.Key + "已存在!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ namespace FineUIPro.Web.Evaluation
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == FoNo && p.Requisitioner == CurrUser.Account && (p.Blocked == null || p.Blocked == "") && (p.Deleted == null || p.Deleted == "")).ToList();
|
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == FoNo && p.Requisitioner == CurrUser.Account && (p.Blocked == null || p.Blocked == "") && (p.Deleted == null || p.Deleted == "")).ToList();
|
||||||
}
|
}
|
||||||
Grid2.DataSource = sesList.OrderByDescending(x=>x.ShowViolationDegree);
|
Grid2.DataSource = sesList.OrderByDescending(x=>x.ShowViolationDegree);
|
||||||
Grid2.DataBind();
|
Grid2.DataBind();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ShowAllFiles</ProjectView>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress>
|
<Use64BitIISExpress>
|
||||||
</Use64BitIISExpress>
|
</Use64BitIISExpress>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||||
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
||||||
</httpHandlers>
|
</httpHandlers>
|
||||||
<compilation debug="false" targetFramework="4.6.1">
|
<compilation debug="true" targetFramework="4.6.1">
|
||||||
<buildProviders>
|
<buildProviders>
|
||||||
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
|
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
|
||||||
</buildProviders>
|
</buildProviders>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<IISExpressWindowsAuthentication />
|
<IISExpressWindowsAuthentication />
|
||||||
<IISExpressUseClassicPipelineMode />
|
<IISExpressUseClassicPipelineMode />
|
||||||
<UseGlobalApplicationHostFile />
|
<UseGlobalApplicationHostFile />
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
|
|
Loading…
Reference in New Issue