取消材料导入必填项限制

This commit is contained in:
高飞 2023-02-21 14:27:04 +08:00
parent 74a415d211
commit 494f749a11
1 changed files with 11 additions and 11 deletions

View File

@ -192,18 +192,18 @@ namespace FineUIPro.Web.CQMS.Material
}
string row2 = pds.Rows[i][2].ToString();
if (string.IsNullOrEmpty(row2))
{
result += (i + 2).ToString() + "," + "主项名称" + "," + "此项为必填项!" + "|";
}
else
{
//if (string.IsNullOrEmpty(row2))
//{
// result += (i + 2).ToString() + "," + "主项名称" + "," + "此项为必填项!" + "|";
//}
//else
//{
var mainItem = mainItems.FirstOrDefault(x => x.MainItemName == row2);
if (mainItem == null)
{
result += (i + 2).ToString() + "," + "主项名称" + "," + "[" + row2 + "]不存在!" + "|";
}
}
//}
string row3 = pds.Rows[i][3].ToString();
if (string.IsNullOrEmpty(row3))
@ -246,10 +246,10 @@ namespace FineUIPro.Web.CQMS.Material
result += (i + 2).ToString() + "," + "到货日期" + "," + "[" + row10 + "]格式错误!" + "|";
}
}
else
{
result += (i + 2).ToString() + "," + "到货日期" + "," + "此项为必填项!" + "|";
}
//else
//{
// result += (i + 2).ToString() + "," + "到货日期" + "," + "此项为必填项!" + "|";
//}
}
}
if (!string.IsNullOrEmpty(result))