/// <summary> /// Creates a common element for the AppraisalDocument. /// </summary> /// <param name="name">The local name of the node.</param> /// <param name="appraisalDocument">The parent document.</param> public AppraisalElement(AppraisalDocument appraisalDocument) : base("Appraisal", appraisalDocument) { // The top level account information is used to add the user data to the top level of the appraisal. ClientMarketData.AccountRow accountRow = appraisalDocument.AccountRow; // Add any top-level data associated with this account (such as aggregate risk, account level quantitative // calculations, etc. if (accountRow != null) { if (!accountRow.IsUserData0Null()) { AddAttribute("UserData0", accountRow.UserData0.ToString()); } if (!accountRow.IsUserData1Null()) { AddAttribute("UserData1", accountRow.UserData1.ToString()); } if (!accountRow.IsUserData2Null()) { AddAttribute("UserData2", accountRow.UserData2.ToString()); } if (!accountRow.IsUserData3Null()) { AddAttribute("UserData3", accountRow.UserData3.ToString()); } if (!accountRow.IsUserData4Null()) { AddAttribute("UserData4", accountRow.UserData4.ToString()); } if (!accountRow.IsUserData5Null()) { AddAttribute("UserData5", accountRow.UserData5.ToString()); } if (!accountRow.IsUserData6Null()) { AddAttribute("UserData6", accountRow.UserData6.ToString()); } if (!accountRow.IsUserData7Null()) { AddAttribute("UserData7", accountRow.UserData7.ToString()); } } }