private void DisplayDealView(object obj) { SelectedObsInstruPosition = (ObsInstruPosition)obj; if (SelectedObsInstruPosition == null) { return; } ObsDeals.Clear(); foreach (var deal in _deals) { if (deal?.InstrumentId == SelectedObsInstruPosition?.InstruRic) { ObsDeals.Add(deal); } } var positionDetails = new PositionDetailsWin { DataContext = this }; positionDetails.Show(); }
public void RemoveDeal(object obj) { _dbManager.RemoveDeal(SelectedDeal.DealId); CloseAction(); _currentPosDico.Clear(); ObsPositions.Clear(); ObsDeals.Clear(); LoadCurrentDeals(); foreach (var deal in _deals) { if (deal?.InstrumentId == SelectedObsInstruPosition?.InstruRic) { ObsDeals.Add(deal); } } }