Example #1
0
        public static BasketShipment Load(Int32 basketShipmentId, bool useCache)
        {
            if (basketShipmentId == 0)
            {
                return(null);
            }
            BasketShipment basketShipment = null;
            string         key            = "BasketShipment_" + basketShipmentId.ToString();

            if (useCache)
            {
                basketShipment = ContextCache.GetObject(key) as BasketShipment;
                if (basketShipment != null)
                {
                    return(basketShipment);
                }
            }
            basketShipment = new BasketShipment();
            if (basketShipment.Load(basketShipmentId))
            {
                if (useCache)
                {
                    ContextCache.SetObject(key, basketShipment);
                }
                return(basketShipment);
            }
            return(null);
        }
Example #2
0
        public static bool Delete(Int32 basketShipmentId)
        {
            BasketShipment basketShipment = new BasketShipment();

            if (basketShipment.Load(basketShipmentId))
            {
                return(basketShipment.Delete());
            }
            return(false);
        }