/// <summary> /// Handle the grid requesting tooltip content /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnShowToolTipHandler(object sender, ReportGridtToolTipEventArgs e) { if (e.ReportCell.ReportColumn.ColumnId == "HeatIndexColumn") { if (this.matchToolTipContent == null) { this.matchToolTipContent = new FluidTrade.Guardian.Windows.Controls.MatchPartsUserControl(); } IContent iContent = e.ReportCell.ReportRow.IContent; CreditCardRow creditCardRow = iContent.Key as CreditCardRow; if (creditCardRow == null) { return; } foreach (ConsumerTrustNegotiationRow consumerTrustNegotiationRow in creditCardRow.GetConsumerTrustNegotiationRows()) { if (creditCardRow.CreditCardId == consumerTrustNegotiationRow.CreditCardId) { MatchRow matchRow = consumerTrustNegotiationRow.MatchRow; if (matchRow != null && matchRow.IsHeatIndexDetailsNull() == false) { this.matchToolTipContent.SetDetails(matchRow.HeatIndexDetails); e.ToolTip.Content = this.matchToolTipContent; } break; } } } }
/// <summary> /// Get a match /// </summary> /// <param name="id"></param> /// <returns></returns> public override Records.Match Get(Guid id) { MatchRow row = DataModel.Match.MatchKey.Find(id); Records.Match record = new Records.Match(); if (row != null) { row.AcquireReaderLock(DataModelTransaction.Current); record.BlotterId = row.BlotterId; record.ContraMatchId = row.ContraMatchId; record.ContraOrderId = row.ContraOrderId; record.HeatIndex = row.HeatIndex; if (row.IsHeatIndexDetailsNull() == false) { record.HeatIndexDetails = row.HeatIndexDetails; } record.MatchedTime = row.MatchedTime; record.RowId = row.MatchId; record.RowVersion = row.RowVersion; record.StatusCodeId = row.StatusId; record.WorkingOrderId = row.WorkingOrderId; row.ReleaseLock(DataModelTransaction.Current.TransactionId); } return(record); }