/// <summary> /// Constructs a hierarchical view of the appraisal including the active position and the positionTarget. /// </summary> /// <param name="AccountId"> identifier of the account.</param> /// <remarks> /// Table locks needed: /// Read: Allocation /// Read: Account /// Read: Model /// Read: PositionTarget /// Read: ProposedOrder /// Read: Object /// Read: ObjectTree /// Read: Order /// Read: Scheme /// Read: Security /// Read: TaxLot /// </remarks> public Appraisal(DataModel.AccountRow accountRow, bool includeChildren) { // Clearing out the schema record will exclude any sector information in the outline. this.schemeRow = null; // Recursively build the document outline from the active position. BuildAppraisalSet(accountRow, includeChildren); }
/// <summary> /// Constructs a hierarchical view of the appraisal including the active position and the positionTarget. /// </summary> /// <param name="accountRow">The parent account used to construct the outline.</param> /// <param name="schemeRow">The security classification scheme used to construct the outline.</param> /// <remarks> /// Table locks needed: /// Read: Allocation /// Read: Account /// Read: Model /// Read: PositionTarget /// Read: ProposedOrder /// Read: Object /// Read: ObjectTree /// Read: Order /// Read: Scheme /// Read: Security /// Read: TaxLot /// </remarks> public Appraisal(DataModel.AccountRow accountRow, DataModel.SchemeRow schemeRow, bool includeChildren) { // The scheme record drives the building of the appraisal. this.schemeRow = schemeRow; // Recursively build the document outline from the active position. BuildAppraisalSet(accountRow, includeChildren); }
/// <summary> /// Constructs a hierarchical view of the appraisal including the active position and the positionTarget. /// </summary> /// <param name="AccountId">The account identifier.</param> /// <param name="ModelId">The model identifier.</param> /// <remarks> /// Table locks needed: /// Read: Allocation /// Read: Account /// Read: Model /// Read: PositionTarget /// Read: ProposedOrder /// Read: Object /// Read: ObjectTree /// Read: Order /// Read: Scheme /// Read: Security /// Read: TaxLot /// </remarks> public Appraisal(DataModel.AccountRow accountRow, DataModel.ModelRow modelRow, bool includeChildren) { // Only the sector that are in this scheme are included in the outline. If no scheme is found, there // won't be any security classification data in the outline. int SchemeId = (modelRow.IsSchemeIdNull()) ? accountRow.SchemeId : modelRow.SchemeId; this.schemeRow = DataModel.Scheme.FindBySchemeId(SchemeId); // Add each of the SecurityIdentified in the model to the document outline. foreach (DataModel.PositionTargetRow positionTargetRows in modelRow.GetPositionTargetRows()) { BuildSecurity(accountRow.AccountId, positionTargetRows.SecurityId, positionTargetRows.PositionTypeCode); } // Recursively build the document outline from the active position. BuildAppraisalSet(accountRow, includeChildren); }