private ArrayList GetChildMID(Guid g_mid, string strSBLTAB, string strRelName) { ArrayList list = new ArrayList(); ArrayList masterOids = new ArrayList(1); ArrayList revNums = new ArrayList(1); masterOids.Add(g_mid); revNums.Add(0); Guid curView = ClientData.UserGlobalOption.CurView; foreach (DEBusinessItem item in PLItem.Agent.GetBizItemsByMasters(masterOids, revNums, curView, ClientData.LogonUser.Oid, BizItemMode.BizItem)) { if (item.Iteration.LinkRelationSet.GetRelationBizItemList(strRelName) == null) { DERelationList list5 = PLItem.Agent.GetLinkRelations(item.IterOid, strSBLTAB, strRelName, ClientData.LogonUser.Oid); item.Iteration.LinkRelationSet.RelationBizItemLists[strRelName] = list5; if (list5.Count > 0) { for (int i = 0; i < list5.Count; i++) { DERelation2 relation = new DERelation2(); relation = (DERelation2) list5[i]; list.Add(relation.RightObj); } } } } return list; }
private void InitObject() { this.csb2sbs = new DECusRelationLst(); this.al_master.Clear(); this.al_sbl.Clear(); ArrayList itemMasters = PLItem.Agent.GetItemMasters(this.strSBLTAB, ClientData.LogonUser.Oid); ArrayList masterOids = new ArrayList(itemMasters.Count); ArrayList revNums = new ArrayList(itemMasters.Count); foreach (DEItemMaster2 master in itemMasters) { masterOids.Add(master.Oid); revNums.Add(0); } Guid curView = ClientData.UserGlobalOption.CurView; foreach (DEBusinessItem item in PLItem.Agent.GetBizItemsByMasters(masterOids, revNums, curView, ClientData.LogonUser.Oid, BizItemMode.BizItem)) { if (item.Iteration.LinkRelationSet.GetRelationBizItemList(this.strRelName) == null) { DERelationList list5 = PLItem.Agent.GetLinkRelations(item.IterOid, this.strSBLTAB, this.strRelName, ClientData.LogonUser.Oid); item.Iteration.LinkRelationSet.RelationBizItemLists[this.strRelName] = list5; this.al_master.Add(item.MasterOid); this.al_sbl.Add(item.Iteration.Oid); this.al_name.Add(item.Name); if (list5.Count > 0) { for (int i = 0; i < list5.Count; i++) { DERelation2 relation = new DERelation2(); DECusRelation relation2 = new DECusRelation(); relation = (DERelation2)list5[i]; relation2.PLM_LEFTOBJ = item.IterOid; relation2.PLM_RIGHTOBJ = relation.RightObj; this.csb2sbs.Add(relation2); } } } } }