private void ConvertOuterDSHeader(DataSet ds_ret, Guid g_clsoid) { ArrayList attrList = new ArrayList(); ArrayList outList = new ArrayList(); DEResFolder defolder = new DEResFolder { ClassOid = g_clsoid }; DEMetaClass class2 = ModelContext.MetaModel.GetClass(g_clsoid); attrList = this.GetAttributes(class2.Name); outList = ResFunc.GetOuterAttr(defolder); this.ReplaceAttrName(ds_ret, outList, attrList); }
private void InitResInfo() { ArrayList showAttrList = ResFunc.GetShowAttrList(this.curFolder, emTreeType.NodeTree); this.attrList = ResFunc.CloneMetaAttrLst(showAttrList); this.attrSort = ResFunc.GetSortAttrList(this.curFolder); this.attrOuter = ResFunc.GetOuterAttr(this.curFolder); this.clsName = this.curFolder.ClassName; this.InitResStatus(); this.InitSortList(true); this.InitShowAttrLst(); this.SetAttrDataType(); }
private bool CheckOptionByDA() { bool flag = true; DEResFolder defolder = new DEResFolder { Oid = Guid.Empty, ClassOid = this.clsOid, ClassName = this.clsName, Filter = this.FilterConditon.ToString(), FilterString = this.FilterString, FilterValue = this.FilterValue }; ArrayList list = new ArrayList(); ArrayList outerAttr = new ArrayList(); list = ResFunc.CloneMetaAttrLst(ResFunc.GetShowAttrList(defolder, emTreeType.NodeTree)); outerAttr = ResFunc.GetOuterAttr(defolder); try { if (ResFunc.IsOnlineOutRes(defolder.ClassOid)) { ResFunc.GetDataCount(defolder, list, outerAttr, emResourceType.OutSystem); return(flag); } if (ResFunc.IsRefRes(defolder.ClassOid)) { PLSPL plspl = new PLSPL(); DEMetaClass class2 = ModelContext.MetaModel.GetClass(defolder.ClassOid); DEMetaClass class3 = ModelContext.MetaModel.GetClass(class2.RefClass); plspl.GetSPLCount(class3.Name, list, ClientData.LogonUser.Oid, defolder.FilterString, defolder.FilterValue); return(flag); } if (ResFunc.IsTabRes(defolder.ClassOid)) { ArrayList list4 = new ArrayList(); ResFunc.GetDataCount(defolder, list4, outerAttr, emResourceType.Customize); } } catch { return(false); } return(flag); }
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); } }