SVN r957
SVN-Revision: r957
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user