private void UpdateCounts(StagingEbayItem stagingEbayItem, StagingEbayBatchImport stagingEbayBatchImport)
        {
            /***ebay Listing Type values
                **AdFormat
                    * Advertisement to solicit inquiries on listings such as real estate. Permits no bidding on that item, service, or property. To express interest, a buyer fills out a contact form that eBay forwards to the seller as a lead. This format does not enable buyers and sellers to transact online through eBay and eBay Feedback is not available for ad format listings.
                **Auction
                    * Competitive-bid on-line auction format. Buyers engage in competitive bidding, although Buy It Now may be offered as long as no valid bids have been placed. Online auctions are listed on eBay.com; they can also be listed in a seller's eBay Store if the seller is a Store owner.
                **AuctionsWithBIN
                    * Same as Auction format, but Buy It Now is enabled. AuctionsWithBIN changes to Auction if a valid bid has been placed on the item. Valid bids include bids that are equal to or above any specified reserve price.
                **Classified
                    * Classified Ads connect buyers and sellers, who then complete the sale outside of eBay. This format does not enable buyers and sellers to transact online through eBay and eBay Feedback is not available for these listing types.
                **FixedPrice
                * A fixed-price listing. Auction-style bidding is not allowed. On some sites, this auction format is also known as "Buy It Now Only" (not to be confused with the Buy It Now option available with competitive- bidding auctions). Fixed-price listings appear on eBay.com; they can also be listed in a seller's eBay Store if the seller is a Store owner.
            ***/
            switch (stagingEbayItem.ListingInfoListingType.ToLower())
            {
                case EbayListingTypeAuctionInLower:
                    stagingEbayBatchImport.Auctions++;
                    break;
                case EbayListingTypeAuctionWithBinInLower:
                    stagingEbayBatchImport.AuctionsWithBIN++;
                    break;
                case EbayListingTypeClassifiedInLower:
                    stagingEbayBatchImport.Classified++;
                    break;
                case EbayListingTypeFixedPriceInLower:
                    stagingEbayBatchImport.FixedPrice++;
                    break;
                case EbayListingTypeStoreInventory:
                    stagingEbayBatchImport.StoreInventory++;
                    break;
            }

            stagingEbayBatchImport.Imported++;
        }
 public void UpdateStagingEbayLoadBatch(StagingEbayBatchImport batch, bool commit = false)
 {
     istgEbayBatchImportsRepository.Update(batch);
     if (commit)
     {
         istgEbayBatchImportsRepository.SaveChanges();
     }
 }
 private void SetBatchDefaults(StagingEbayBatchImport stagingEbayBatchImport)
 {
     if (stagingEbayBatchImport != null)
     {
         stagingEbayBatchImport.StartedOn = DateTime.Now;
         stagingEbayBatchImport.InProcess = true;
         stagingEbayBatchImport.TotalKeywordMatched = 0;
         stagingEbayBatchImport.ToBeProcessed = 0;
         stagingEbayBatchImport.Auctions = 0;
         stagingEbayBatchImport.AuctionsWithBIN = 0;
         stagingEbayBatchImport.Classified = 0;
         stagingEbayBatchImport.FixedPrice = 0;
         stagingEbayBatchImport.StoreInventory = 0;
         stagingEbayBatchImport.Failed = 0;
         stagingEbayBatchImport.Duplicates = 0;
         stagingEbayBatchImport.Imported = 0;
         stagingEbayBatchImport.NoListingType = 0;
     }
 }