Example #1
0
        private Price DecodePrice(XElement itemElement, string storeId)
        {
            string   itemCode      = DecodeItemCode(itemElement);
            float    itemPrice     = FieldConverter.DecodeItemFieldFloat(itemElement, "itemprice");
            DateTime updateTime    = FieldConverter.DecodeItemFieldDateTime(itemElement, "priceupdatedate");
            bool     allowDiscount = FieldConverter.DecodeItemFieldBool(itemElement, "allowdiscount");

            return(new Price()
            {
                StoreId = storeId,
                ItemCode = itemCode,
                PriceValue = itemPrice,
                UpdateTime = updateTime,
                AllowDiscount = allowDiscount
            });
        }
Example #2
0
 private float DecodeQuantity(XElement itemElement)
 {
     return(FieldConverter.DecodeItemFieldFloat(itemElement, "quantity"));
 }