循环下表体取值,去重组合成
循环下表体取值,去重组合成想要的格式进行赋值到指定字段,参考
var SEntryEntity = this.View.BusinessInfo.GetEntryEntity("单据体标识");
var SEntryRows = this.View.Model.GetEntityDataObject(SEntryEntity);
string str = "";
materialId = "";
materialId2 = "";
if (SEntryRows.Count > 0)
{
for (int i = 0; i < SEntryRows.Count; i++)
{
materialId = Convert.ToString(SEntryRows[i]["MaterialId_Id"]);
str += materialId + ",";
if (i >= 1)
{
int j = i - 1;
materialId2 = Convert.ToString(SEntryRows[j]["MaterialId_Id"]);
if (smaterialId != smaterialId2)
{
str += smaterialId2+",";
}
}
}
}
this.Model.SetValue("指定字段标识",str);
循环下表体取值,去重组合成
本文2024-09-16 23:43:48发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-56420.html