private void AddClass( XmlElement parentXe, string id, string name, string functionName, bool isBase) { if (string.IsNullOrEmpty(id)) { return; } XmlElement xe = this._xmlDoc.CreateElement(FilterXmlService._xmlKeyClass); parentXe.AppendChild(xe); string classId = id; if (isBase) //原数据源Id固定为base { classId = FilterXmlService._xmlKeyBase; } xe.SetAttribute(FilterXmlService._xmlKeyClassID, classId); xe.SetAttribute(FilterXmlService._xmlKeyClassName, name); ReportDataFacade rdf = new ReportDataFacade(this._login); FilterConditionCollection fcc = rdf.RetrieveFilterParas(id, functionName, this._localeId); this.AddFilterItems(isBase, xe, fcc); }
private void AddFilterItems( bool isBase, XmlElement parentXe, FilterConditionCollection fcc) { foreach (FilterCondition fc in fcc) { //扩展的实体只取扩展列,其带有"#DE"标识 if (!isBase && !fc.Content.StartsWith(FilterXmlService._extendedColumnFlag)) { continue; } XmlElement xe = this._xmlDoc.CreateElement(FilterXmlService._xmlKeyItem); parentXe.AppendChild(xe); xe.SetAttribute(FilterXmlService._xmlKeyName, fc.Content); xe.SetAttribute(FilterXmlService._xmlKeyDescription, fc.Description); } }