/// <summary> /// Populates a trading support record with the contents of the entity. /// </summary> /// <param name="baseRecord">The empty record to populate.</param> protected override void PopulateRecord(TradingSupportReference.BaseRecord baseRecord) { TradingSupportReference.WorkingOrderRecord record = baseRecord as TradingSupportReference.WorkingOrderRecord; record.BlotterId = this.BlotterId; record.RowId = this.WorkingOrderId; record.RowVersion = this.rowVersion; record.SecurityId = this.SecurityId; record.WorkingOrderId = this.WorkingOrderId; }
/// <summary> /// Populates a trading support record with the contents of the entity. /// </summary> /// <param name="baseRecord">The empty record to populate.</param> protected override void PopulateRecord(TradingSupportReference.BaseRecord baseRecord) { TradingSupportReference.Entity record = baseRecord as TradingSupportReference.Entity; record.Description = this.Description; record.ImageId = this.ImageId; record.IsHidden = this.IsHidden; record.IsReadOnly = this.IsReadOnly; record.Name = this.Name; record.RowId = this.EntityId; record.RowVersion = this.RowVersion; record.TypeId = this.TypeId; }
/// <summary> /// Populates a trading support record with the contents of the blotter. /// </summary> /// <param name="record">The empty record to populate.</param> protected override void PopulateRecord(TradingSupportReference.BaseRecord record) { base.PopulateRecord(record); (record as TradingSupportReference.Blotter).BlotterId = this.BlotterId; if (record is TradingSupportReference.DebtClass) { TradingSupportReference.DebtClass debtClass = record as TradingSupportReference.DebtClass; if (this.CommissionSchedule != null) { debtClass.CommissionSchedule = new TradingSupportReference.CommissionSchedule(); debtClass.CommissionSchedule.RowId = this.CommissionSchedule.CommissionScheduleId; debtClass.CommissionSchedule.RowVersion = this.CommissionSchedule.RowVersion; debtClass.CommissionSchedule.CommissionTranches = new TradingSupportReference.CommissionTranche[this.CommissionSchedule.CommissionTranches.Count]; for (int tranche = 0; tranche < this.CommissionSchedule.CommissionTranches.Count; ++tranche) { Guid commissionType = DataModel.CommissionType.First(row => row.CommissionTypeCode == this.CommissionSchedule.CommissionTranches[tranche].CommissionType).CommissionTypeId; Guid commissionUnit = DataModel.CommissionUnit.First(row => row.CommissionUnitCode == this.CommissionSchedule.CommissionTranches[tranche].CommissionUnit).CommissionUnitId; debtClass.CommissionSchedule.CommissionTranches[tranche] = new TradingSupportReference.CommissionTranche() { CommissionType = commissionType, CommissionUnit = commissionUnit, EndRange = this.CommissionSchedule.CommissionTranches[tranche].EndRange, RowId = this.CommissionSchedule.CommissionTranches[tranche].CommissionTrancheId, RowVersion = this.CommissionSchedule.CommissionTranches[tranche].RowVersion, StartRange = this.CommissionSchedule.CommissionTranches[tranche].StartRange, Value = this.CommissionSchedule.CommissionTranches[tranche].Value }; } } } }
/// <summary> /// Populate a trading support record with information from this debt class. /// </summary> /// <param name="entityRecord">The record to populate.</param> protected override void PopulateRecord(TradingSupportReference.BaseRecord entityRecord) { TradingSupportReference.DebtClass record = entityRecord as TradingSupportReference.DebtClass; base.PopulateRecord(entityRecord); record.Address1 = this.Address1; record.Address2 = this.Address2; record.BankAccountNumber = this.BankAccountNumber; record.BankRoutingNumber = this.BankRoutingNumber; record.City = this.City; record.CompanyName = this.CompanyName; record.ContactName = this.ContactName; record.DebtRuleId = this.DebtRuleId; record.Department = this.Department; record.Description = this.Description; record.Email = this.Email; record.Fax = this.Fax; record.ForBenefitOf = this.ForBenefitOf; record.Phone = this.Phone; record.Province = this.Province; record.PostalCode = this.PostalCode; record.SettlementTemplate = this.SettlementTemplate; }
/// <summary> /// Populates a trading support record with the contents of the entity. /// </summary> /// <param name="record">The empty record to populate.</param> protected virtual void PopulateRecord(TradingSupportReference.BaseRecord record) { }