private bool LoadByPrimaryKeyDynamic(System.Int32 id)
        {
            ShippingServiceQuery query = new ShippingServiceQuery();

            query.Where(query.Id == id);
            return(this.Load(query));
        }
        protected void InitQuery(ShippingServiceQuery query)
        {
            query.OnLoadDelegate = this.OnQueryLoaded;

            if (!query.es2.HasConnection)
            {
                query.es2.Connection = ((IEntityCollection)this).Connection;
            }
        }
Beispiel #3
0
        public static ShippingService Find(int storeId, ShippingProviderType providerType)
        {
            var q = new ShippingServiceQuery();

            q.Where(q.StoreId == storeId, q.ShippingProviderType == (short)providerType);

            var service = new ShippingService();

            if (service.Load(q))
            {
                return(service);
            }
            return(null);
        }
Beispiel #4
0
        public static List <ShippingServiceRateType> GetList(int storeId)
        {
            //SELECT
            //rt.*
            //FROM DNNspot_Store_ShippingServiceRateType rt
            //INNER JOIN DNNspot_Store_ShippingService s ON rt.ShippingServiceId = s.Id
            //WHERE s.StoreId = 1

            var rt = new ShippingServiceRateTypeQuery("rt");
            var s  = new ShippingServiceQuery("s");

            rt.Select(rt).InnerJoin(s).On(rt.ShippingServiceId == s.Id).Where(s.StoreId == storeId);
            rt.OrderBy(rt.DisplayName.Ascending);

            var collection = new ShippingServiceRateTypeCollection();

            collection.Load(rt);

            return(collection.ToList());
        }
 public bool Load(ShippingServiceQuery query)
 {
     this.query = query;
     InitQuery(this.query);
     return(Query.Load());
 }