SVN r663
SVN-Revision: r663
This commit is contained in:
@@ -115,9 +115,8 @@ namespace Lskj.PubBomImport
|
|||||||
string[] fileNames = dialog.FileNames;
|
string[] fileNames = dialog.FileNames;
|
||||||
foreach (string fileName in fileNames)
|
foreach (string fileName in fileNames)
|
||||||
{
|
{
|
||||||
string code = Path.GetFileNameWithoutExtension(fileName);
|
string code = Path.GetFileName(fileName);
|
||||||
GetFileCodeInfo(code, out string sourceCode, out string sourceName, out string sourceBB, out int sourceBC);
|
int count = fileNames.Where(n => Path.GetFileName(n).Equals(code)).Count();
|
||||||
int count = fileNames.Where(n => Path.GetFileNameWithoutExtension(n).Trim().StartsWith(code)).Count();
|
|
||||||
if (count > 1)//只允许存在一个
|
if (count > 1)//只允许存在一个
|
||||||
{
|
{
|
||||||
throw new Exception($"{code}存在多条记录\r\n不允许重复");
|
throw new Exception($"{code}存在多条记录\r\n不允许重复");
|
||||||
|
|||||||
Reference in New Issue
Block a user