SVN-Revision: r957
This commit is contained in:
tdx
2025-08-26 08:24:15 +00:00
parent 66bb6a3883
commit 668967bb89
3 changed files with 78 additions and 42 deletions
@@ -1455,6 +1455,16 @@ namespace Lskj.PubBomImport
{
detailTable = frmMain.ToExcelDataTable(childInfo.FullName, out int count, out int errorCount, true);
}));
var qdCodeRows = detailTable.AsEnumerable();
foreach (DataRow qdItem in detailTable.Rows)
{
string qdCode = (qdItem["ProductId"] + "").Trim();
int qdCount = qdCodeRows.Where(n => (n["ProductId"] + "").Trim().StartsWith(qdCode)).Count();
if (qdCount > 1)//只允许存在一个
{
throw new Exception($"{sourceCode}中的{qdCode}重复,请修改");
}
}
foreach (DataRow detailRow in detailTable.Rows)
{
int.TryParse(detailRow["amount"] + "", out int amount);