Ejemplo n.º 1
0
 private void LoadNodeTree(Guid m_oid, TreeNode thenode)
 {
     for (int i = 0; i < this.al_master.Count; i++)
     {
         if (((Guid)this.al_master[i]) == m_oid)
         {
             for (int j = 0; j < this.csb2sbs.Count; j++)
             {
                 this.csb2sb = this.csb2sbs.Item(j);
                 if (((Guid)this.al_sbl[i]) == this.csb2sb.PLM_LEFTOBJ)
                 {
                     string nodeCode = this.GetNodeCode(this.csb2sb.PLM_RIGHTOBJ);
                     if (nodeCode.Trim().Length > 0)
                     {
                         TreeNode node = new TreeNode(nodeCode)
                         {
                             Tag = this.csb2sb.PLM_RIGHTOBJ
                         };
                         thenode.Nodes.Add(node);
                         this.LoadNodeTree(this.csb2sb.PLM_RIGHTOBJ, node);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 private bool IsNoExitRightObject(Guid g_m_id)
 {
     for (int i = 0; i < this.csb2sbs.Count; i++)
     {
         this.csb2sb = this.csb2sbs.Item(i);
         if (this.csb2sb.PLM_RIGHTOBJ == g_m_id)
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 3
0
 private bool IsHasLeftObject(Guid g_i_id)
 {
     for (int i = 0; i < this.csb2sbs.Count; i++)
     {
         this.csb2sb = this.csb2sbs.Item(i);
         if (this.csb2sb.PLM_LEFTOBJ == g_i_id)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
 public UCResTree()
 {
     this.csb2sb      = new DECusRelation();
     this.strRootCode = "1";
     this.strRelName  = "SB2SB";
     this.strSBLTAB   = "SBL";
     this.al_master   = new ArrayList();
     this.al_sbl      = new ArrayList();
     this.al_name     = new ArrayList();
     this.g_root_mid  = Guid.Empty;
     this.b_start     = true;
     this.InitializeComponent();
 }
Ejemplo n.º 5
0
        private ArrayList GetChildMasterIDLst(Guid i_oid)
        {
            ArrayList list = new ArrayList();

            for (int i = 0; i < this.csb2sbs.Count; i++)
            {
                DECusRelation relation = this.csb2sbs.Item(i);
                if (relation.PLM_LEFTOBJ == i_oid)
                {
                    list.Add(relation.PLM_RIGHTOBJ);
                }
            }
            return(list);
        }
Ejemplo n.º 6
0
        private Guid GetRightTreeParentID(Guid g_m_id)
        {
            Guid empty = Guid.Empty;

            for (int i = 0; i < this.csb2sbs.Count; i++)
            {
                this.csb2sb = this.csb2sbs.Item(i);
                if (this.csb2sb.PLM_RIGHTOBJ == g_m_id)
                {
                    return(this.csb2sb.PLM_LEFTOBJ);
                }
            }
            return(empty);
        }
Ejemplo n.º 7
0
        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);
                        }
                    }
                }
            }
        }
Ejemplo n.º 8
0
 public bool Add(DECusRelation Item)
 {
     this.arrItems.Add(Item);
     return(true);
 }