예제 #1
0
    private void SaveListing(string eBayItemID, EBayTemplate template)
    {
        EBayAccess acc        = new EBayAccess();
        EBayItem   item       = GetEBayItemDetailByID(eBayItemID, template);
        ApiContext apiContext = acc.GetApiContext(template.EBayListSite);
        EBayList   eBayList   = new EBayList();

        if (item.Type.Equals("Chinese"))
        {
            eBayList.BuyItNowPrice = ConvertUtilities.ToDecimal(item.Bidding_BuyItNowPrice);
        }
        else
        {
            eBayList.BuyItNowPrice = ConvertUtilities.ToDecimal(item.BuyItNowPrice);
        }

        eBayList.BidPrice = (decimal)item.Bidding_CurrentPrice;

        eBayList.ItemName   = item.Title;
        eBayList.ItemNumber = item.ID;
        eBayList.LastStatus = (EBayList.EBayListStatus)Enum.Parse(typeof(EBayList.EBayListStatus), item.ListingStatus, true);
        eBayList.ListDate   = item.StartTime;
        eBayList.ListType   = (EBayList.EBayListType)Enum.Parse(typeof(EBayList.EBayListType), item.Type, true);
        eBayList.QtyLeft    = item.QuantityLeft;
        eBayList.LastUpdate = DateTime.Now;
        eBayList.ViewUrl    = item.ViewUrl;
        eBayList.Currency   = item.Currency;

        eBayList = DataAccessContextDeluxe.EBayListRepository.Save(eBayList);
    }
예제 #2
0
    private EBayItem GetEBayItemDetailByID(string eBayItemID, EBayTemplate template)
    {
        EBayAccess access = new EBayAccess();

        return(access.GetItemDetail(eBayItemID, access.GetApiContext(template.EBayListSite)));
    }
예제 #3
0
    private EBayItem GetEBayItemDetailByID(string eBayItemID)
    {
        EBayAccess acc = new EBayAccess();

        return(acc.GetItemDetail(eBayItemID, acc.GetApiContext()));
    }