public override void LoadFromXml(System.Xml.XmlElement xmlEl) { base.LoadFromXml(xmlEl); string prompt = xmlEl.GetAttribute("PR"); this._prompt = (prompt == "1"?true:false); string formatString = xmlEl.GetAttribute("FS").Trim(); this._format = (formatString == null || formatString == "")?FormatEnum.Default:(FormatEnum)(int.Parse(formatString)); foreach (System.Xml.XmlElement childEl in xmlEl.ChildNodes) //calculated member references { if (childEl.Name == "D") // dimension { throw new NotImplementedException(); } else if (childEl.Name == "H") // hierarchy { string uniqueName = childEl.GetAttribute("UN"); string ignoreError = childEl.GetAttribute("IE"); Hierarchy hier = Schema.Hierarchies[uniqueName]; if (hier == null && ignoreError != "1") { throw new InvalidMemberException("Invalid object: " + uniqueName); } _mdxParameters.Add(hier, false); } else if (childEl.Name == "L") // level { string uniqueName = childEl.GetAttribute("UN"); string ignoreError = childEl.GetAttribute("IE"); Level lev = Schema.Levels[uniqueName]; if (lev == null && ignoreError != "1") { throw new InvalidMemberException("Invalid object: " + uniqueName); } _mdxParameters.Add(lev, false); } else if (childEl.Name == "M") // member { string hierUN = childEl.GetAttribute("H"); string ignoreError = childEl.GetAttribute("IE"); DataMember dmem = null; Hierarchy hier = null; try { if (hierUN != "") { hier = Schema.Hierarchies[hierUN]; if (hier == null && ignoreError != "1") { throw new InvalidMemberException("Invalid object: " + hier); } } dmem = DataMember.GetFromXml((hier == null?this.Hierarchy:hier), childEl); } catch (InvalidMemberException imexc) { if (ignoreError != "1") { throw imexc; } } _mdxParameters.Add(dmem, false); } } }
private void OnChangeMember(DataMember mem, bool isCalc) { // event this.OnBeforeChange(this); }