예제 #1
0
 private void InitOldAttrLstData()
 {
     this.al_OldAttr = this.GetAttributes(this.myCls.Name);
     if (this.b_isRefCls)
     {
         ArrayList c = new ArrayList();
         c = ResFunc.GetFixedAttrList();
         this.al_OldAttr.AddRange(c);
     }
 }
예제 #2
0
        private void FrmFilterData_Load(object sender, EventArgs e)
        {
            ArrayList attrList  = new ArrayList();
            ArrayList attrOuter = new ArrayList();
            ArrayList list3     = new ArrayList();

            try {
                DEMetaAttribute attribute;
                DEMetaClass     class2 = ModelContext.MetaModel.GetClass(this.clsOid);
                attrList = ResFunc.CloneMetaAttrLst(ModelContext.MetaModel.GetAttributes(this.clsName));
                if (this.isOnLineOutRes)
                {
                    DEResFolder defolder = new DEResFolder {
                        ClassOid = this.clsOid
                    };
                    attrOuter = ResFunc.GetOuterAttr(defolder);
                    this.SetAttrDataType(attrList, attrOuter);
                }
                if (class2.IsRefResClass)
                {
                    DEMetaClass refCls        = this.GetRefCls(this.clsOid);
                    ArrayList   attributes    = ModelContext.MetaModel.GetAttributes(refCls.Name);
                    ArrayList   fixedAttrList = ResFunc.GetFixedAttrList();
                    attributes.AddRange(fixedAttrList);
                    attrList = ResFunc.CloneMetaAttrLst(attributes);
                }
                for (int i = 0; i < attrList.Count; i++)
                {
                    attribute = (DEMetaAttribute)attrList[i];
                    if (attribute.IsViewable)
                    {
                        list3.Add(attribute.Label);
                        this.filterAttrs.Add(attribute);
                    }
                }
                if (this.isOnLineOutRes)
                {
                    PLOuterResource resource = new PLOuterResource();
                    ArrayList       list7    = new ArrayList();
                    attrOuter = resource.GetOuterResAttrs(this.clsOid);
                    ArrayList list8 = new ArrayList();
                    for (int j = 0; j < this.filterAttrs.Count; j++)
                    {
                        bool flag = false;
                        attribute = (DEMetaAttribute)this.filterAttrs[j];
                        foreach (DEOuterAttribute attribute2 in attrOuter)
                        {
                            if (attribute2.FieldOid == attribute.Oid)
                            {
                                list7.Add(attribute2);
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            list8.Add(attribute);
                        }
                    }
                    foreach (DEMetaAttribute attribute3 in list8)
                    {
                        this.filterAttrs.Remove(attribute3);
                        list3.Remove(attribute3.Label);
                    }
                    if (list7.Count > 0)
                    {
                        this.cobParamName.Tag = list7;
                    }
                }
                if (list3.Count > 0)
                {
                    this.cobParamName.Properties.Items.AddRange(list3.ToArray());
                }
            } catch (Exception exception) {
                PrintException.Print(exception);
            }
        }