コード例 #1
0
        // Add New Seller Market Entry to Auction
        public void AddSellerMarketEntry(MarketEntryFormViewModel viewModel, string userId)
        {
            var marketEntry = MarketEntry.CreateSellerEntry(userId, EntryType.Supply,
                                                            Id, viewModel.FinalProductId, viewModel.EntryQuantity,
                                                            viewModel.EntryPrice, viewModel.DeliveryDate);

            MarketEntries.Add(marketEntry);
        }
コード例 #2
0
        // Add New Buyer Market Entry to Auction
        public void AddBuyerMarketEntry(MarketEntryFormViewModel viewModel, string userId)
        {
            var marketEntry = MarketEntry.CreateBuyerEntry(userId, EntryType.Demand,
                                                           Id, viewModel.ProductId, viewModel.ProductQualityId,
                                                           viewModel.EntryQuantity, viewModel.EntryPrice, viewModel.DeliveryDate,
                                                           viewModel.DeliveryLocation);

            MarketEntries.Add(marketEntry);
        }