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