Beispiel #1
0
        private void ShowMarketDetails(object arg)
        {
            var item = arg as TradeGroup;

            if (item != null)
            {
                var viewModel = new TradeReportViewModel(item.Items);
                var dialog    = new TradingReportWindow();
                dialog.DataContext = viewModel;
                dialog.ShowDialog();
            }
        }
Beispiel #2
0
        private void ListOrders(object arg)
        {
            var storeItem = arg as LoyaltyStoreItem;

            if (storeItem != null)
            {
                var ordersList = new List <TradeItem>
                {
                    new TradeItem()
                    {
                        Name = storeItem.Name,
                        Data = storeItem.Product.Data
                    }
                };

                var viewModel = new TradeReportViewModel(ordersList);
                viewModel.CurrentItem = viewModel.Commodities.First();
                var dialog = new TradingReportWindow();
                dialog.DataContext = viewModel;
                dialog.ShowDialog();
            }
        }
        private void ListOrders(object arg)
        {
            Commodity commodity = arg as Commodity;

            if (commodity != null)
            {
                var ordersList = new List <TradeItem>
                {
                    new TradeItem()
                    {
                        Name = commodity.Name,
                        Data = commodity.Data
                    }
                };

                var viewModel = new TradeReportViewModel(ordersList);
                viewModel.CurrentItem = viewModel.Commodities.First();
                var dialog = new TradingReportWindow();
                dialog.DataContext = viewModel;
                dialog.ShowDialog();
            }
        }