private void editAuction() { SellView edit = new SellView { DataContext = new SellViewModel(this.CurrentAuction) }; edit.ShowDialog(); this.refreshCurrAuction(); }
private void newAuction() { SellView sell = new SellView { DataContext = new SellViewModel(new Auction()) }; sell.ShowDialog(); this.loadAuctions(); }
void SellExecute() { var sellView = new SellView(); sellView.ShowDialog(); // Blocking //Update auctionlist this.Auctions = new ObservableCollection <AuctionViewModel>(); foreach (var auction in this._auctionService.GetAll()) { auctions.Add(new AuctionViewModel(auction)); } }
private void ShowSellViewExecute() { var sellView = new SellView(); sellView.ShowDialog(); var allAuctions = auctionService.GetAll(); var newAuctions = allAuctions.Where(a => auctions.All(vm => vm.Auction != a)); foreach (var auction in newAuctions) { var auctionVm = new AuctionViewModel(auction); auctions.Add(auctionVm); } }
private void AddNewAuctionAction() { var sellView = new SellView(); sellView.ShowDialog(); // Blocking // Find & add new auction var allAuctions = this.auctionService.GetAll().ToList(); var newAuctions = allAuctions.Where(a => this.auctions.All(vm => vm.Auction != a)); foreach (var auction in newAuctions) { var auctionVm = new AuctionViewModel(auction); this.auctions.Add(auctionVm); } }
private void SellButtonClick(object sender, RoutedEventArgs e) { var sellView = new SellView(); sellView.ShowDialog(); // Blocking }